Procedure documentation Activating the Database Trace Function Locate the document in its SAP Library structure

Use

The Database Manager gives you the option of enabling the database trace function if errors occur.

Note

Use this function when asked to do so by your Structure linkSAP DB Support organization. We would not recommend that you activate the database trace function unless it is really necessary, because it seriously affects the performance of the Structure linkdatabase instance.

Disable the database trace function as soon as the actions needed for the analysis have been logged.

The database trace documents all reactions of the database kernel to database statements. This also means that it can be used not only to trace errors that occur when statements are processed but also to provide a more exact classification of inconsistencies caused, for example, by hardware errors. If the database trace is enabled, you should be running the database instance with the smallest load possible, and only those actions needed to reproduce the error should be performed on the database instance.

Procedure

You can execute the log functions below either individually or in a combination that you can define yourself.

Logging Database Statements in General

Choose Instance ® Check ® Kernel Trace.
On the Options tab page, select the required database trace options in the list. If the options support the selection of a trace level, the system default value is displayed in the column Level.

If you then choose KernelTrace ® Selected Items ON, you activate the database trace for the selected database trace options with the system default value for the trace level.

If you want to change the trace level for the selected database trace options, choose KernelTrace ® Selected Items ON with Level... You are now able to choose a different trace level. The higher the trace level, the greater amount of detail is provided in the information collected by the database trace.

Choose KernelTrace ® Selected Items OFF to deactivate the database trace.

Logging Database Statements in a Specific User Session

Choose Instance ® Check ® Kernel Trace.

The database trace is written for all user sessions by default. The default setting can be changed:

To do this, choose the Advanced tab page and select Trace session. Then choose whether the database trace is to be written for the current session or for a specific user session. In this case, enter the session ID of the desired user session.

Note

To locate the session ID of a user session, choose Instance ® Information ® Sessions.

Choose KernelTrace ® Set Advanced Options.

Logging the Occurrence of Specific Errors

Choose Instance ® Check ® Kernel Trace.

On the Advanced tab page, select Stop on error. Enter the code of the error whose occurrence is to stop the creation of the database trace.

Then choose KernelTrace ® Flush to write the information still contained in the buffer to the trace and therefore update the database trace before the log file is created.

Creating and Displaying the Database Trace Log

Choose Instance ® Check ® Kernel Trace.

On the Protocol tab page, select the required options.

Then choose Kernel Trace ® Flush to write the information still contained in the buffer to the trace and thus update the database trace before the log file is created.

Choose KernelTrace ® Make Protocol. The database trace is then converted to a legible format. To open the log, choose Instance ® Check ® Diagnosis Files. Select the Kernel Trace Protocol file and choose DiagnosisFiles ® View.