Show TOC

Creating Database TracesLocate this document in the navigation structure

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

Context

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

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

Procedure

  • Starting the Database Trace
    1. Select the database in the explorer tree.

    2. In the context menu of the database, choose Start of the navigation path Administration Tasks Next navigation step Database Trace Next navigation step Options... End of the navigation path

    3. Select the trace options.

      Area

      Property

      Description

      Options

      -

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

      Advanced

      Trace Session

      Database sessions that are to be included in the database trace

      • All sessions

      • Current session

      • Session

        Enter the ID of the database session.

      Stop on Error

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

    4. 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 Start of the navigation path Administration Tasks Next navigation step Database Trace Next navigation step Options... End of the navigation path

    2. Choose Deselect All.

    3. Choose Finish.

  • Generating the Database Trace Log File
    1. In the context menu of the database, choose Start of the navigation path Administration Tasks Next navigation step Database Trace Next navigation step Generate... End of the navigation path

    2. Choose the properties that you want to display in 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

      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

      Deactivates the database trace after the log file was 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 Start of the navigation path Administration Tasks Next navigation step Database Trace Next navigation step Clear... End of the navigation path

Next Steps

SAP Note 837385 Information published on SAP site

Database Administration, Traces