Procedure documentationCreating Database Traces Locate this document in the navigation structure

 

When you activate the database trace, the system logs all database kernel messages. The log file database trace helps you identify errors that occurred, for example, when SQL statements were processed.

Note Note

Activating the database trace has a negative effect on performance with SAP liveCache databases. This is not the case with SAP MaxDB databases.

End of the note.

Prerequisites

You are logged on to the database as database system administrator or as a DBM operator with server authorization for starting and stopping the database trace.

More information: Glossary, Server Permission

Procedure

Starting the Database Trace
  1. In the context menu of the database, choose   Database Trace   Options...  

  2. Select the trace options.

    Database Trace: Options

    Area

    Property

    Description

    Options

    -

    Options

    You can set a trace level for each option. The higher the trace level, the more detailed the information which is recorded for this option by the database trace.

    Advanced

    Trace Session

    Database session to be recorded by the database trace

    • All sessions

    • Current session

    • Session

      Enter the ID of the database session to be recorded.

    Stop on Error

    If you specify an error number, the system stops the database trace when this error occurs.

  3. To start the trace, choose Finish.

Stopping the Database Trace

After you have performed the database actions you want to analyze, stop the database trace:

  1. In the context menu of the database, choose   Database Trace   Options...  

  2. Choose Deselect All.

  3. Choose Finish.

Generating the Database Trace Log File
  1. In the context menu of the database, choose   Database Trace   Generate...  

  2. Choose the properties that you want to display in the log file.

    Database Trace: Options for Generating the Log File

    Option

    What Is Written to the Log File

    a

    Trace outputs of the order interface

    b

    Trace outputs of the data record interface

    k

    Trace outputs of the table interface

    m

    Message buffer

    e

    Number of the trace page and the position of the block on the page for the order interface and the message buffer

    s

    Information about the processing strategy

    t

    Results of internal time measurements

    x

    Additional trace outputs

    Database Trace: Further Options for Generating the Log File

    Option

    Description

    Flush before generate database trace

    Before the system generates the log file, it writes all the information contained in the working memory to the database trace.

    Open database trace file after generation

    Once the system has generated the log file for the database trace, the file is displayed in Database Studio.

    Deactivate database trace after generation

    The database trace is deactivated once the log file has been generated (if you have not already deactivated it).

  3. To generate the log file, choose Finish.

Displaying the Database Trace Log File

To display the database trace (Database Trace (Readable) file), proceed as described in section Displaying Configuration and Log Files.

Initializing the Database Trace

You delete all database trace information that the system has collected so far.

In the context menu of the database, choose   Database Trace   Clear...  

More Information

SAP Note 837385

Database Administration, Traces