Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

sql trace

Former Member
0 Likes
606

how to use sql trace plz send me step by step?

what is use?

5 REPLIES 5
Read only

Former Member
0 Likes
552

ST05 -> SQL Trace can be used for performing SQL statement analysis..

Check this link..

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

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
552

Hi,

go to st05

click on SQL trace check box

click on Trace On button on the right hand side

click om explain one SQL request and give a sql statement

click on explain button

it ll give you the output.

Well using SQL trace

like as follows:

Goto transaction ST05. Press TRACE ON.

Execute your transaction .

Come back to this screen and click TRACE OFF.

Then check the trace details.

-


You end up getting unnecessary details

Lets say you have to analyze your particular SQL query,

1. put a breakpoint at the select statement and execute the transaction , as it stops at your breakpoint , run SQL trace in seperate session.

2. Trace ON

3. Execute the select statement.

4. Trace OFF

5. Analyze.

In this way you can analyze your particular select query

Pls check links like:

http://help.sap.com/saphelp_nw04/helpdata/en/17/358df9c9fee2469105731e10756921/frameset.htm

http://help.sap.com/saphelp_bw30b/helpdata/en/d1/801f89454211d189710000e8322d00/frameset.htm

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

Regards,

Priyanka.

Read only

Former Member
0 Likes
552

Hi

Well using SQL trace

like as follows:

Goto transaction ST05. Press TRACE ON.

Execute your transaction .

Come back to this screen and click TRACE OFF.

Then check the trace details.

-


You end up getting unnecessary details

Lets say you have to analyze your particular SQL query,

1. put a breakpoint at the select statement and execute the transaction , as it stops at your breakpoint , run SQL trace in seperate session.

2. Trace ON

3. Execute the select statement.

4. Trace OFF

5. Analyze.

In this way you can analyze your particular select query

Pls check links like:

http://help.sap.com/saphelp_nw04/helpdata/en/17/358df9c9fee2469105731e10756921/frameset.htm

http://help.sap.com/saphelp_bw30b/helpdata/en/d1/801f89454211d189710000e8322d00/frameset.htm

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

http://help.sap.com/saphelp_47x200/helpdata/en/d1/801f7c454211d189710000e8322d00/content.htm

________________

SQL Trace

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

And click on list trace to view the details.

Authorization trace analysis

1. Open two sessions

2. Execute transaction ST01 in one of the sessions

3. Select the authorization checkbox, note the other traces

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

4. Click the 'Trace On' button

5. Within your other session execute 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 authorization 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

GO THROUGH THIS

Tools provided for Performance Analysis

Following are the different tools provided by SAP for performance analysis of an ABAP object

Regards Rk

Read only

Former Member
0 Likes
552

Hi Sheik,

Go through this info.

ools provided for Performance Analysis

Following are the different tools provided by SAP for performance analysis of an ABAP object

Run time analysis transaction SE30

This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.

SQL Trace transaction ST05

The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.

The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on the SPFLI table in our test program is mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.

The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.

To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.

******Rewards some points.

Rgds,

P.Naganjana Reddy

Read only

alison_lloyd
Active Participant
0 Likes
552

to get the most out of the results go to trace list - combined table accesses (or summarise in previous versions) then aggregate. given any problem accesses then lookm at the detail.