cancel
Showing results for 
Search instead for 
Did you mean: 

What is SQL trace tool?

Former Member
0 Kudos

Please try to help me in answering this question

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi seetha,

this may help you,

Checking Database Access with SQL Trace Usage Certain combinations of database software, table

contents, and database Customizing can result in unnecessarily high access times. This is also the case

for outdated database statistics. This can have a negative effect on the performance of the mass

simulation.

Therefore, within the performance optimization of the mass simulation, you can use the Trace Requests (ST05) transaction to check database access and access times in the production system.

Procedure

1. In the production system, create a small number of simulation indexes (30 indexes, for example).

2. Call the Trace Requests (ST05) transaction. To do this, go to the SAP Easy Access Menu

and choose Tools ® ABAP Workbench ® Test ® ST05 SQL Trace.

3. Activate the trace. You can also do this in the production system as this function only logs

database accesses that have already been executed.

4. Bill the small number of simulation indexes.

5. Deactivate the SQL trace and display the list of accesses.

The list contains the executed database accesses and the access times Longer than average access times are marked in red. If a table contains a large amount of accesses marked in red, repeat the analysis. If the long runtimes continue, it may be necessary to perform a database

tuning for this table.

reward if helpful,

regards,

sravanthi.

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

in continuation to it

the SQL trace tool lets you examine the database calls of reports and transactions.this tool shows u:

->the sql statements that your application uses.

->which values the system uses for specific database accesses and changes

->how system translates ABAP OPEN SQL commands(such as select) into standard sql commands.

->where ur application makes unnecessary database access or repeated accesess.

-?where your application positions commit sataements.

->what database accesess or changes occur in the update section of ur application

->which index and with what caost it is used for the data retrieval.

NOTE:only one user can use the trace tool at a time.so it is very important to switch off the tool as soon as execution is over.

regards,

sravanthi

Former Member
0 Kudos

SQL trace(ST05) provides the developer with the ability to analyse database select statements. Simply execute ST05 to turn on SQL trace, then execute the statement/program you want to analyse. Now turn off SQL trace using ST05 and click on list trace to view the details.

You can also perform traces on other items such as authorisation objects.

Authorisation trace analysis 1. Open two sessions

2. Execute transaction ST01 in one of the sessions

3. Select the authorisation checkbox, note the other traces

you can perform (SQL, RFC, Table Buffer etc)

4. Click the 'Trace On' button

5. Within your other session execte the transaction/report

you want to trace or get the user in question to do it

6. Return to the session where you turned the trace on and

click on 'Trace Off' otherwise it will continue to record

all athorisation checks

7. Click on the 'Analysis' button

8. Enter appropriate data into selection screen such as

Username, type of trace records (i.e. Authorization check)

9. Click on the Execute button.

10. Report displaying trace results will now be displayed

http://www.sapdevelopment.co.uk/perform/perform_sqltrace.htm

Some useful transaction related to this are ..

ST01 SAP system trace

ST02 Buffer statistics.

ST03 Workload analysis.

ST04 Database performance analysis.

ST05 SQL trace .

ST06 Operating system monitor ...

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

Check the below links

http://help.sap.com/saphelp_erp2005/helpdata/en/d1/801f89454211d189710000e8322d00/content.htm

http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html

Regards,

Maha