Diagnostics 
The Diagnostics section comprises the following sections:
The DBA audit log records all actions that make changes to the database. For example, starting, stopping, and reconfiguring services, changes to parameters in configuration files, deletion of trace files, and table imports.
The following information is displayed about available audit logs:
Field |
Description |
|---|---|
Date |
Start date of the action |
Time |
Start time of the action |
System |
Target system on which the action was performed |
Action |
Type of action (name of the action in DBA Cockpit) |
Command |
Type of command (for example, ADD, DELETE, or EDIT) |
Object |
Name of the modified object (for example, database or tablespace name) |
User |
Name of the SAP user who performed the action |
From System |
System from which the action was performed |
Missing Tables and Indexes shows the differences between the database in the SAP system and the ABAP dictionary. For example, tables in the database, which are not in the ABAP dictionary.
Missing Tables and Indexes can be helpful, for example, to check whether an installation was performed correctly. You can determine which indexes are missing, and check the consistency of database objects and ABAP Dictionary objects.
Note
The Missing Tables and Indexes function is only available for local systems or for ABAP systems, for which an additional RFC destination has been assigned. It is not available for remote systems.
To access Missing Tables and Indexes, start DBA Cockpit and choose
The following information from the last consistency check is displayed:
Section |
Description |
|---|---|
Objects missing from the database |
Objects that are defined in the ABAP Dictionary, but not found in the database |
Unknown objects in the ABAP Dictionary |
Objects that are found in the database, but not defined in the ABAP Dictionary |
Inconsistent objects |
Results of the detailed comparison of the ABAP Dictionary and the database |
Other checks |
Different checks are performed here: Check whether the primary index of tables defined in the ABAP Dictionary was created uniquely on the database. Check for objects in the SAP system tables that cannot be described at all or that cannot be completely described in the ABAP Dictionary. If inconsistencies in these objects are detected, they are also displayed here with additional information about the type of inconsistency. |
Optional indexes |
Mismatch between ABAP Dictionary and database regarding secondary indexes |
Note
Information displayed is not up-to-the-minute. Last check displays the date of the last update. As a result, the data could be up to several days old. Any issues may have been resolved in the meantime.
To update: choose Refresh. This may take some time.
EXPLAIN shows the execution plan for SELECT, INSERT, UPDATE, or DELETE statements, providing information about the internal processes.
You can upload SQL statements from a file and save the EXPLAIN results to a file.
To upload a file, choose Load local file.
To save the EXPLAIN results to a file, choose Save as local file.
To analyze the statement, choose EXPLAIN.
Note
When you perform an EXPLAIN, the SQL statements are not executed.
You can use the SQL Editor to execute SQL statements, including complex statements.
Note
In releases earlier than SPS07: The SQL Editor supports only read statements.
UPDATE and DELETE statements are not supported.
You can display a table view, a view, or a monitoring view.
Specify schema or a table name.
You can use wildcard characters.
Select Tables, Views, or Monitoring Views.
Choose Display/Find.
From the results overview, double-click a row to display more information.
The tabs Properties (General info) / Columns / Indexes display detailed information.
For example, DBA Cockpit displays the estimated maximum size in memory for a table and its size on disk.
To send the currently displayed table to an SQL statement in the SQL editor, choose Send to SQL Editor.
A SQL statement is generated. You can edit the SQL statement first before you execute it.
Use the Diagnosis Files tab for SAP HANA databases that are offline (cannot be reached by SQL).
Diagnosis files hold a mixture of diagnosis, error, and information messages.
To display a file in the list, double-click the file.
You can use SAP HANA studio to display the diagnosis files.
More information: SAP HANA Database – Administration Guide
You can select a series of individual diagnosis files and merge them into a local database table.
Merging diagnosis files can be helpful if you are analyzing errors, as it allows you to review both trace and log files at the same time.
Note
If no diagnosis files traces were merged, the Merged Diagnosis Files overview is empty.
To merge the diagnosis files, choose Merge Trace Files into Local DB Table. The local database table is emptied and then the diagnosis files are merged into it.
Once the database table has been created, you can use the filtering options and timeframe slider to drill down and analyze further.
For example, to search for traces from a specific date, choose Read from Local DB Table. The overview of traces is updated. The timestamp of the last record in the database table shows you if up-to-date traces are displayed.
Note
Merging diagnosis files can take a long time depending on the size and number of files to be merged.
SQL Database Connectivity (SQLDBC) is a runtime environment for the development of database applications and database interfaces. Using SQLDBC, applications can access SAP HANA databases, execute SQL statements, and edit data. SQLDBC consists of the runtime library libSQLDBC, the software development kit SQLDBC SDK and the tool sqldbc_cons. SQLDBC offers a range of trace options.
To access the SQLDBC trace tool from DBA Cockpit, choose .
Caution
Traces impact performance. Use traces only for troubleshooting and problem analysis.
To activate the SQLDBC trace:
Start DBA Cockpit (transaction DBACOCKPIT) and choose .
Select the required process.
Choose one of the following options:
Trace |
Description |
SQL (Switch on SQL trace) |
SQL Statements (simplest trace, adequate for most analyses) |
Short (Switch on short trace) |
Method calls |
Long (Switch on long trace) |
Method calls with call parameters (most comprehensive trace) |
Packet (Switch on packet trace) |
Communication packages |
Specify the size of the trace file.
The trace files contain a file named sqldbctrace-<pid>.prt, where <pid> is the process ID.
The trace files are overwritten cyclically.
To deactivate the trace, select the process for writing to the trace and then select Switch Off.
Additional Functions
To specify the size of the trace file, choose .
Select the required trace file to analyze the trace and choose Display File.
Start DBA Cockpit (transaction DBACOCKPIT) and choose .
To activate the trace, select the required trace component and choose Activate Trace.
Further options:
Task |
Steps |
To activate more trace components while the trace is running |
Select the trace components and choose Activate Trace again. |
To activate the trace on a particular level |
Select the required trace component and choose Activate Trace (Level). You can change the default value for the trace level. The higher the trace level, the more detailed the information collected by the database trace will be. |
To write the database trace for all database sessions |
Choose For All Sessions. |
To only write the database trace for a particular database session |
Select Only for Session with Number and enter the session number. |
To initialize the trace, choose Initialize Trace.
After initialization, only the database actions are logged.
To deactivate the trace, choose Deactivate Trace.
This deactivates any trace components that are selected.
Further options:
Task |
Steps |
To switch off the database trace manually |
Select Manual Only. |
To set the database trace to switch off automatically when a particular error occurs |
Select Automatically with an Error Code and enter the database error code |
Note
If you have configured the database trace such that it is only written for a particular database session or is deactivated automatically, a warning message appears to draw these options to your attention.
To analyze the database trace:
Choose Flush Trace Buffer.
The information still remaining in the buffer is written to the trace.
Choose Analyze Trace.
To back up the database trace you have displayed, choose Save to Local File.
This prevents it from being overwritten by the next trace analysis.
To view a prepared trace again, choose Display Trace.
The backup catalog stores information about the data and log backups that were executed for the current database. These include backups that were scheduled using the DBA Planning Calendar as well as using other tools such as SAP HANA studio.
To switch the display between data and log backups, choose Complete Data Backup or Log Backup.
The data backups are divided into entries for the nameserver and the index server, and are sorted into blocks for each system. For distributed systems, the blocks show the entries for all the services for each participating system. The log backups are not displayed in blocks as there is only one log backup.
To specify the number of rows to display, enter the number in ROWNUM and choose Refresh.
You can also display information about executed backups from the DBA Planning Calendar. From the DBA Planning Calendar, double-click a completed backup. In the dialog box, go to the Program Log tab. Here, you can see information from the backup catalog.
More information:
This section displays information about blocked transactions, table locks, and record locks.
Here, you can find out what objects are locked, and on what level. For example, the number of the transaction that caused the locks. You can use this information to find out more under .
In a SAP HANA system, transaction DB01 (Analyze Exclusive Lockwaits) opens Diagnostics: Locks: Blocked Transactions in DBA Cockpit.