Show TOC

 SQL Trace AnalysisLocate this document in the navigation structure

The SQL Trace part of the Performance Trace tool allows you to see how the OPEN SQL statements that you use in ABAP programs are converted to standard SQL statements (see Embedded SQL) and the parameters with which the embedded SQL statements are passed to the database system.

Overview

From the time you turn on the trace function to the time you turn it off again, all database activity occurring either for a specific user or for an entire system is recorded. The SAP System takes OPEN SQL statements and converts them in to embedded SQL statements that it passes to the database and makes the results available. The embedded SQL statement and its parameters are recorded in the SQL Trace file. The results of the SQL statement, like return code, number of entries retrieved, inserted, or deleted by the database are recorded in the SQL Trace file as well. The log file also contains the runtime of the statement and the place in the application program, respectively transaction, from which it was called which enables additional analyses (supported by the SQL Trace function).

 

From the recorded SQL trace you can deduce:

  • which SQL statements your application carries out
  • which values the system uses for specific database accesses and changes
  • how the system translates ABAP OPEN SQL commands (such as SELECT) into standard SQL commands
  • where your application positions COMMIT statements
  • where your application makes repeated database accesses
  • what database accesses or changes occur in the update section of your application