The SQL Trace function is an on-demand log of selected SQL statements that are issued against the database through the Open SQL Engine. The SQL Trace can be switched on or off dynamically. The log format is database independent. Besides the SQL statement text, each log record contains information about the point in time when the statement was executed, its duration, its input parameters and results (where applicable) as well as context information.
Features
The SQL Trace is especially useful for:
Development
SQL Trace can help JDO, enterprise beans, servlet and JSP developers to learn which kind of database accesses their code produces.
1. Performance analysis
Typically, performance issues are caused by inefficient database accesses. In this case SQL Trace can be used to show the issued SQL statements and their duration, thus helping to identify inefficient SQL statements.
Activities
Typically, you should use the SQL Trace when you need to check the behavior of a particular application. This is the following scenario:
…
You launch the SQL Trace application.
You activate the SQL Trace.
You run the application that you want to trace.
You deactivate the SQL Trace.
You set filters optionally.
You evaluate the trace.
You can also evaluate a trace that already exists.
The SQL Trace also provides functions for file administration.
SQL Trace is less suitable for detecting general performance issues. Therefore, we do not recommend that you keep it constantly activated, as it consumes additional resources.
Initial Screen
Calling
You can call the initial screen of the test tool using transaction code ST05 or by choosing Test ® Performance Trace in the ABAP Workbench.
Functions
The following functions are available on the initial screen:
Select trace:
· Select the trace mode SQL Trace, Enqueue Trace, RFC Trace, or Table Buffer Trace. You can select mutliple trace modes simultaneously.
Select trace function:
· Start the trace recording.
· Stop the trace recording.
· Branch to trace list, detailed list, or time-sorted list.
· Branch to Explain SQL to analyze an SQL statement without an explicit trace file.
Trace files are managed by the system. Thus they can be saved, like any other object; saved trace files can be displayed and deleted.
Trace Status
A trace can only be activated once on any application server. The Trace Status display informs you whether another user in the system has already activated a particular trace.
Features
The SQL Trace is especially useful for:
Development
SQL Trace can help JDO, enterprise beans, servlet and JSP developers to learn which kind of database accesses their code produces.
1. Performance analysis
Typically, performance issues are caused by inefficient database accesses. In this case SQL Trace can be used to show the issued SQL statements and their duration, thus helping to identify inefficient SQL statements.
Activities
Typically, you should use the SQL Trace when you need to check the behavior of a particular application. This is the following scenario:
…
You launch the SQL Trace application.
You activate the SQL Trace.
You run the application that you want to trace.
You deactivate the SQL Trace.
You set filters optionally.
You evaluate the trace.
You can also evaluate a trace that already exists.
The SQL Trace also provides functions for file administration.
SQL Trace is less suitable for detecting general performance issues. Therefore, we do not recommend that you keep it constantly activated, as it consumes additional resources.
Initial Screen
Calling
You can call the initial screen of the test tool using transaction code ST05 or by choosing Test ® Performance Trace in the ABAP Workbench.
Functions
The following functions are available on the initial screen:
Select trace:
· Select the trace mode SQL Trace, Enqueue Trace, RFC Trace, or Table Buffer Trace. You can select mutliple trace modes simultaneously.
Select trace function:
· Start the trace recording.
· Stop the trace recording.
· Branch to trace list, detailed list, or time-sorted list.
· Branch to Explain SQL to analyze an SQL statement without an explicit trace file.
Trace files are managed by the system. Thus they can be saved, like any other object; saved trace files can be displayed and deleted.
Trace Status
A trace can only be activated once on any application server. The Trace Status display informs you whether another user in the system has already activated a particular trace.