‎2007 Feb 05 9:36 AM
Hi Friends,
Can you explain me in detail what is SQL Trace? how it will be useful related with performace tuning.
Regards,
Dinesh
‎2007 Feb 05 9:42 AM
Hi,
SQL Trace
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
‎2007 Feb 05 9:39 AM
Hi
Tcode is ST05.
You select sto5 and select Trace on.....
then execute ur program
then come and select trace off and list trace
it will give you list of summary of select statements ...like what index is being used and sum of execution time of sql individual select statements etc.
Hope it will be useful.
‎2007 Feb 05 9:40 AM
Hi Dinesh,
Once your program is up.
If you notice performance issue, you can perform an SQL trace :
1 - ST05
2 - Activate trace
3 - Run your prog.
4 - Deactivate trace & display it !
You'll see accessed tables, with runtime, etc...
Erwan
‎2007 Feb 05 9:40 AM
HI,
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.
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2007 Feb 05 9:40 AM
SQL-Trace, available in ST05.
Actually you can trace the real DataBase data-flow.
you can see what table he uses to get the info (sometimes needed).
you can see what command takes how much time. means what commands you better improve.
you can see if there´s an array-fetch done or if there are a lot of (non-performant) select singles.
and so on...
‎2007 Feb 05 9:41 AM
Hi
Tcode is ST05.
You select sto5 and select Trace on.....
then execute ur program
then come and select trace off and list trace
it will give you list of summary of select statements ...like what index is being used and sum of execution time of sql individual select statements etc.
Hope it will be useful.
‎2007 Feb 05 9:42 AM
Hi,
SQL Trace
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
‎2007 Feb 05 9:52 AM
Hi ,
Using this you can evaluate the query performance .
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
Regards
Renjith Kumar
‎2007 Feb 05 10:36 AM
Hi,
goto transection code ST05 and click on Activate Trace button then execute ur program
then click on Deactivate Trace button and click on Display Trace button
You shall see accessed tables with runtime.
reward point if useful.