<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SQL Trace..? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399477#M534344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the links -&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3355130"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3011158"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jun 2007 09:53:38 GMT</pubDate>
    <dc:creator>amit_khare</dc:creator>
    <dc:date>2007-06-06T09:53:38Z</dc:date>
    <item>
      <title>SQL Trace..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399475#M534342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wt is SQL TRACE...?&lt;/P&gt;&lt;P&gt;explain in detail...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 09:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399475#M534342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T09:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trace..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399476#M534343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ST05: SQL trace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.create a small ABAP/4 program that contains only the select statement. Before proceeding, test it to ensure that it works. &lt;/P&gt;&lt;P&gt;2.Open that program in the editor so that it is ready and waiting to execute. &lt;/P&gt;&lt;P&gt;3.Open a new session using the menu path System-&amp;gt;Create session. &lt;/P&gt;&lt;P&gt;4.Run transaction ST05 (enter /nst05-zero-five, not oh-five-in the Command field, or choose the menu path System-&amp;gt;Utilities-&amp;gt;SQL Trace). The Trace SQL Database Requests screen is displayed. &lt;/P&gt;&lt;P&gt;5.If the Trace SQL Status Information box reads Trace SQL is switched off, go to step 7. &lt;/P&gt;&lt;P&gt;6.At this point, the Trace SQL Status Information box contains Trace SQL switched on by, followed by the user id who turned on the trace and the date and time it was started. You must switch it off before you can proceed. If the trace was started within the past hour, it is possible that it is still being used. Contact the indicated user or try again later. If the trace was started hours or days ago, the user probably left it on by mistake and it can be safely turned off. To turn off the trace, press the Trace Off pushbutton. The message in the Trace SQL Status Information box should now read Trace SQL is switched off. &lt;/P&gt;&lt;P&gt;7.Press the Trace On pushbutton. The Trace SQL Database Requests dialog box is displayed. The DB-Trace for User field should contain your user ID. If your user ID is not in this field, enter it now. &lt;/P&gt;&lt;P&gt;8.Press the OK button. You are returned to the Trace SQL Database Requests screen and the status information reads Trace SQL switched on by, indicating that you turned on the trace. &lt;/P&gt;&lt;P&gt;9.Switch back to the window containing your editor session (the one with your program waiting to execute). &lt;/P&gt;&lt;P&gt;10.Press F8 to run your program. (Only press F8, do not do anything else, do not even press the Back button.) &lt;/P&gt;&lt;P&gt;11.When your program has run and the hourglass is no longer displayed, switch back to the trace window. &lt;/P&gt;&lt;P&gt;12.Press the Trace Off pushbutton. The status information reads Trace SQL is switched off. &lt;/P&gt;&lt;P&gt;13.Press the List Trace pushbutton. The Trace SQL Database Requests dialog box is displayed. The fields on this screen will already contain values. &lt;/P&gt;&lt;P&gt;14.Press the OK button. You might need to wait a little while, at most a couple of minutes. The Trace SQL: List Database Requests screen is displayed. &lt;/P&gt;&lt;P&gt;15.Type %sc in the Command field and press the Enter key. The Find dialog box is displayed. &lt;/P&gt;&lt;P&gt;16.Type the name of the table you are tracing in the Search For field. (This is the table named in the select statement in your ABAP/4 program.) &lt;/P&gt;&lt;P&gt;17.Press the Find button. A search results list should be displayed with your table name highlighted. &lt;/P&gt;&lt;P&gt;18.Click on the first highlighted table name. You are returned to the Trace SQL: List Database Requests screen. Your cursor is positioned on the first line containing your table name. To the right of it, in the Operation column, should be the word PREPARE, OPEN, or REOPEN. &lt;/P&gt;&lt;P&gt;19.Press the Explain SQL button on the Application toolbar. The Show Execution Plan for SQL Statement screen is displayed. &lt;/P&gt;&lt;P&gt;20.Scroll down to the execution plan. The index used will be displayed in blue.&lt;/P&gt;&lt;P&gt;&amp;amp;#8195;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 09:52:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399476#M534343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T09:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trace..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399477#M534344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the links -&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3355130"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="3011158"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward all helpful replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 09:53:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399477#M534344</guid>
      <dc:creator>amit_khare</dc:creator>
      <dc:date>2007-06-06T09:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trace..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399478#M534345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Prashanth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The transaction for SQL trace is &amp;lt;b&amp;gt;ST05&amp;lt;/b&amp;gt;.&lt;/P&gt;&lt;P&gt;I use this transaction most frequently if I need to from which DB tables data are read or in which DB tables data are written when executing a certain function (e.g. function module, BAPI, transaction).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, BAPIs usually use specific structures for external exposure at their interface which have almost nothing to do with the DB tables where data are finally stored. To find out the relevant DB tables you can use the SQL trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reading a SQL trace is just a matter of experience. Next to the relevant DB tables you will see plenty of technical DB tables that are not relevant for your trace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 09:54:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399478#M534345</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2007-06-06T09:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQL Trace..?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399479#M534346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well using SQL trace&lt;/P&gt;&lt;P&gt;like as follows:&lt;/P&gt;&lt;P&gt;Goto transaction ST05. Press TRACE ON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Execute your transaction .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Come back to this screen and click TRACE OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then check the trace details.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="-------------------" /&gt;&lt;P&gt;You end up getting unnecessary details&lt;/P&gt;&lt;P&gt;Lets say you have to analyze your particular SQL query,&lt;/P&gt;&lt;P&gt;1. put a breakpoint at the select statement and execute the transaction , as it stops at your breakpoint , run SQL trace in seperate session.&lt;/P&gt;&lt;P&gt;2. Trace ON&lt;/P&gt;&lt;P&gt;3. Execute the select statement.&lt;/P&gt;&lt;P&gt;4. Trace OFF&lt;/P&gt;&lt;P&gt;5. Analyze.&lt;/P&gt;&lt;P&gt;In this way you can analyze your particular select query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls check links like:&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/17/358df9c9fee2469105731e10756921/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/17/358df9c9fee2469105731e10756921/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_bw30b/helpdata/en/d1/801f89454211d189710000e8322d00/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_bw30b/helpdata/en/d1/801f89454211d189710000e8322d00/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html" target="test_blank"&gt;http://www.sapbrain.com/TOOLS/SQLTRACE/SQL_TRACE.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL Trace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And click on list trace to view the details.&lt;/P&gt;&lt;P&gt;Authorization trace analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Open two sessions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Execute transaction ST01 in one of the sessions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Select the authorization checkbox, note the other traces&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can perform (SQL, RFC, Table Buffer etc)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. Click the 'Trace On' button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Within your other session execute the transaction/report&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you want to trace or get the user in question to do it&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. Return to the session where you turned the trace on and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;click on 'Trace Off' otherwise it will continue to record all authorization checks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. Click on the 'Analysis' button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. Enter appropriate data into selection screen such as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Username, type of trace records (i.e. Authorization check)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. Click on the Execute button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. Report displaying trace results will now be displayed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2007 09:55:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/sql-trace/m-p/2399479#M534346</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-06T09:55:57Z</dc:date>
    </item>
  </channel>
</rss>

