1.3 SAP HANA Database Explorer and SQL Console
The SAP HANA cockpit provides the SAP HANA database explorer so you can connect to an SAP HANA database and work with catalog objects at runtime. From the SAP HANA cockpit homepage, click the Browse Database Objects tile to access the SAP HANA database explorer, as shown in Figure 1.16. You can also access the SQL console directly from this page by clicking the Execute SQL tile.
Figure 1.16 Browse Database Objects and Execute SQL Tiles
Alternatively, you can access the SQL console when connected to a registered SAP HANA database. On the System Overview page, as shown in Figure 1.17, you’ll see two links on the top right: Open SQL Console and Manage Databases.
Figure 1.17 Open SQL Console Link Used to Access the SQL Console from the SAP HANA Cockpit System Overview Page
Click the Open SQL Console link to navigate directly to the SAP HANA database explorer, connect to the registered system, and launch the SQL console in a single step. Technically, this link also takes you to the SAP HANA database explorer in addition to opening the SQL console.
Within the SAP HANA database explorer interface, you can add connections by clicking the plus icon (+) in the pane below the SAP HANA Database Explorer heading. You have several Database Types available to choose from: SAP HANA database, SAP HANA database (Multitenant), or Cockpit Resource. Select the Cockpit Resource option to connect to an SAP HANA database using the SAP HANA cockpit registration information. To connect to classic SAP HANA database objects, select the SAP HANA database or SAP HANA database (Multitenant) options and enter the connection information for the desired database.
For each connection, you’ll be provided with a graphical list of various catalog object types, as shown in Figure 1.18. For example, if you’re searching for a table, click the table option under Catalog and then use the schema selection bar and search bar in the pane below to locate a table by name within the selected schema. Once you locate an object in the list, double-click that object to reveal its metadata or right-click the object to open a popup window containing options for interacting with the selected object.
As you further look below the Catalog folder in the connected database, you’ll see a Host Diagnostic Files folder. Expand the subfolders below this node until you locate the folders named after each SAP HANA database service. For example, the Name Server and Index Server folders will appear. Within each of these folders, you’ll find various .trc files (trace files) specific to the service’s folder. Double-click the file to open and view its contents in a tab to the right of the SAP HANA database explorer interface. Security administrators often need to view these files when troubleshooting security configurations or when users are unable to access content.
Figure 1.18 SAP HANA Database Explorer Found in the SAP HANA Cockpit
You should now have a basic understanding of the SAP HANA database explorer within the SAP HANA cockpit.
More Information on the SAP HANA Database Explorer
For more information on the SAP HANA database explorer, refer to the SAP HANA Database Explorer Guide, available at http://s-prs.co/v498201.
Once you’ve established a connection to the database, you can access the SQL console where you can execute SQL statements. To launch the SQL console, select an existing database connection from the list found in the SAP HANA database explorer. Click the icon with the word SQL located to the top right of the data list, as shown in Figure 1.19. A new tab will appear to the right with the label SQL console and possibly a number.
Within this tab is the SQL console. Enter the desired SQL then click the run icon (green play button). You can also press the (F8) button to run the SQL command. The results of the SQL statement will appear below the entered statement, as shown in Figure 1.19.
Figure 1.19 Accessing and Using the SQL Console within the SAP HANA Cockpit
You should now have a basic understanding of the steps necessary to access the SAP HANA database explorer and the SQL console. As security administrators, you’ll use the SQL console to execute security specific statements. The SAP HANA database explorer is useful when you need to locate a catalog object in the database and view its metadata. You’ll also use the SAP HANA database explorer to access .trc files that can contain security-specific trace information.