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

Urgent : How to do the SQL trace analysis

Former Member
0 Likes
827

Hi Floks,

How to do the SQL Trace analysis and any another tools is there to test abap programming then this tools runtime analysis,extended Programming Checking,Code inspector .How to utilize that tools .please forward me

thanks

suresh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
745

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

5 REPLIES 5
Read only

Former Member
0 Likes
746

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

Read only

Former Member
0 Likes
745

HI,

<b>SQL Trace Use:</b>

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.

<b>

Features</b>

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.

<b>Activities</b>

Typically, you should use the SQL Trace when you need to check the behavior of a particular application. This is the following scenario:

Look at the below links, you will get the idea

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

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

Read only

Former Member
0 Likes
745

goto st05...activate the sql trace...execute ur program...now deactivate the trace...check the trace log which shows as a list...Here u can analyze which statements are taking what time....

alos, use se30 to analyze the performance of ur program

Read only

Former Member
0 Likes
745

Hi,

For SQL trace :ST05

Runtime analysis : SE30

Extende programcheck: go to program in menu bar (se38) and select check and click extende program chk and excute, here we can know the erros and warnings

Regs

Rams

Read only

Former Member
0 Likes
745

Hi Suresh,

SQl trace & SE30 (Run time analysis) helps one with analyzing the SQL statements. Analysis of your SQL statements means

- No of records fetched

- Time taken for fetching all the records

- Indexes-full range scan or search based on secondary indexes , etc.

- 'Cost' of each SQL query

Extended program check or code inspector checks the SQL statements as part of ABAP progeam ( for eample, SELECTs inside LOOPs) and doesnt give any performance related sugestions.

<u>On SE30</u>

- Execute the transaction , click on the databse bar which would show all database fetches,net time taken for each fetch,total no of records fetched and so many other informations

<u>On SQL trace</u>

As mentioned before, have a breakpoint in the SQL and run the trace,ST05.It gives you the following info

- Time taken for each SQL fetch(open SQl)

- The open SQL statement could be copied and pasted in the "analyze SQl" editor which gives the "Estimated Costs" of the fetch. I also shows you the indexes your SQl has used in a diagramatic way.

There are many more things other than this. Kindly let me know if you would like to know more with your email ID.

Thanks,

Partha.

<u></u>