How to use Sql Tracer

Hi ,
How to use SQL Tracer..(ST05).
Thanks,
Subbu

Hi,
ST05: SQL trace
1.create a small ABAP/4 program that contains only the select statement. Before proceeding, test it to ensure that it works.
2.Open that program in the editor so that it is ready and waiting to execute.
3.Open a new session using the menu path System->Create session.
4.Run transaction ST05 (enter /nst05-zero-five, not oh-five-in the Command field, or choose the menu path System->Utilities->SQL Trace). The Trace SQL Database Requests screen is displayed.
5.If the Trace SQL Status Information box reads Trace SQL is switched off, go to step 7.
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.
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.
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.
9.Switch back to the window containing your editor session (the one with your program waiting to execute).
10.Press F8 to run your program. (Only press F8, do not do anything else, do not even press the Back button.)
11.When your program has run and the hourglass is no longer displayed, switch back to the trace window.
12.Press the Trace Off pushbutton. The status information reads Trace SQL is switched off.
13.Press the List Trace pushbutton. The Trace SQL Database Requests dialog box is displayed. The fields on this screen will already contain values.
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.
15.Type %sc in the Command field and press the Enter key. The Find dialog box is displayed.
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.)
17.Press the Find button. A search results list should be displayed with your table name highlighted.
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.
19.Press the Explain SQL button on the Application toolbar. The Show Execution Plan for SQL Statement screen is displayed.
20.Scroll down to the execution plan. The index used will be displayed in blue.
Jogdand M B

Similar Messages

  • How using sql trace event  10128 level 1&2

    hi all,i want ask about sql trace event 10128. how using sql trace event 10128 level 1&2??
    when I've enabled sql trace event 10128 level 2,and i execution query then appears error
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00942: table or view does not exist
    where the fault lies??
    i'm using
    ALTER SYSTEM SET timed_statistics=TRUE;
    ALTER SESSION SET EVENT '10128 TRACE NAME CONTEXT FOREVER, LEVEL 2';

    But nothing issue with me on 10g on windows xp:
    SQL> ALTER SYSTEM SET timed_statistics=TRUE;
    System altered.
    SQL> ALTER SESSION SET EVENT '10128 TRACE NAME CONTEXT FOREVER, LEVEL 2';
    ALTER SESSION SET EVENT '10128 TRACE NAME CONTEXT FOREVER, LEVEL 2'
    ERROR at line 1:
    ORA-00927: missing equal sign
    SQL> ALTER SESSION SET EVENTS
      2      '10128 trace name context forever, level 2';
    Session altered.
    SQL>HTH
    Girish Shamra
    Edited by: Girish Sharma on Dec 9, 2009 11:46 AM
    This is not "EVENT" .. it is "EVENTS"

  • I am using sql trace , please tel me where i can get the value for mode of lock and type of resource.

    hi,
       I am using sql trace , it has cols like mode and type , but they have numbers , is there any place where i can get the metadata of these values
    yours sincerley

    I have already found, but the problem is, i have to put cases to show lock in fornt of numbers , what i wanted
    is if i could get this mapping any where in database like( metadata is kept) , then i have to put only join.
    Q2) I have one more question in which col of the event, i can have lock request status , like weather it is 
    granted or wait.
    yours sincerly
    Q1. You can create a table from the data in the link that
    Ashwin Menon posted, and use simple JOIN in order to replace the numbers with the Mode
    Q2. Please check this great blog:
    http://aboutsqlserver.com/2011/05/26/locking-in-microsoft-sql-server-part-4-how-to-detect-blocking/
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • How to use sql query in java ?

    i don't know how to use sql query in java code.
    who can give me some advice?
    thanks

    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How to use SQL functions in the queries

    hey guys i wanna know how to use SQL functions in the queries is it possible or not .

    Hi,
    Wat exactly that set values are?
    those from sql query?
    How to use count():
    The COUNT() function returns the number of rows that matches a specified criteria.
    SQL COUNT(column_name) Syntax
    The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column:
    SELECT COUNT(column_name) FROM table_name
    SQL COUNT(*) Syntax
    The COUNT(*) function returns the number of records in a table:
    SELECT COUNT(*) FROM table_name
    SQL COUNT(DISTINCT column_name) Syntax
    The COUNT(DISTINCT column_name) function returns the number of distinct values of the specified column:
    SELECT COUNT(DISTINCT column_name) FROM table_name
    The IN function helps reduce the need to use multiple OR conditions.
    The syntax for the IN function is:
    SELECT columns
    FROM tables
    WHERE column1 in (value1, value2, .... value_n);

  • How to Use SQL Query having IN Clause With DB Adapter

    Hi,
    I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
    Thanks

    invoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter

  • How to use Sql Loader in Unix Environmant

    Hi All,
    Can anyone explain me please how to use sql Loader in unix environment.
    Actually i have one control file i want to run that file in Unix how can i achive please explain me
    Thank's

    Hi Kuljeet,
    Thank you for your replay
    I just put my control file into the Unix Environmant that's fime
    and when i trying to entering the following cmd in Unix environment i am getting this error
    sqlldr username/password@string control='unix_pathname'i am not sure about the path name my question is
    1) Do i need to give the Local file Path Or Unix Path
    This is  the error in Sql Loader:
    SQL*Loader: Release 10.2.0.4.0 - Production on Mon Sep 24 13:14:23 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-500: Unable to open file (/bx167a/riskbatch/rdwdbat/sample_upl.upl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    Could you please correct me
    Thank's

  • How to use SQL() function while writing scripts in BODS 4.0

    How to use SQL() function while writing scripts in BODS 4.0

    Hello,
    I think you want to post your question to the [Data Integration and Data Quality Management|Data Services and Data Quality; forum. This forum is for other BusinessObjects SDK development questions.
    Sincerely,
    Dan Kelleher

  • How to use SQL Developer Debugger

    I'm using SQL Developer Version 3.2.20.09 and want to use its debugger option. I tried to get "how to use SQL Developer Debugger" by using google.ca but didn't get any tutorial. I really appreciate if someone suggest me any good and simple tutorial regarding SQL Developer Debugger, Thanks in advance.

    Hello,
    you can find a tutorial here:
    http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/devdays2012/mod2_sqldev/mod2_sqldev.html
    Joop

  • How to use Sql data source from Essbase 9.3.1

    Hi All,
    How to use Sql data source from Essbase 9.3.1 for ASO cube.Are there any rules and limitations for that.
    Do we need to create any data source connection for this purpose. If there please let me know the dteps to create that connection.
    Regards

    Yes you need to create one DSN connection and you have to use DSN name and login details at the time of building/loading of the outline.
    Create DSN
    Goto Administrative tools -> DataSources (ODBC) and add the DSN name and specify the Server name of SQL and login details and database.
    goto data prep editor and click on File Menu and Click on Open SQL option Next window opens.
    There you have to enter the details of the DSN connection and SQL query to build/load.
    Thanks,
    Prathap

  • How to use forms trace file for performance tuning

    I am trying to use forms trace file in order to find cause of forms application performance problem.
    I have read the document B14032-03 where is described how to turn on tracing and how to convert binary trace file to xml or html format. However these xml/html files are useless because they only contain series of forms events, without possibility for grouping or sorting. Actually, they are like to database raw trace file. I need some tool, like tkprof for database trace, that will process xml/html file and generate some more useful format.
    Further, I have tried to load forms trace file into relational database tables in order to use SQL for performance problem investigation. I have followed procedure described in document A92175-01, but without success.
    Is there any way to process xml/html file with grouping, orderering or summing event duration or way to load either binary, xml or html trace file into structured data in database.

    Al-Salamu Alikum user630033
    It's not : elegant at all to thank people 4 No help,it's not their problem that u don't search enough, or u don't have access to db.
    We should always say thank ,or 'Jazak Allah Khiern' on both cases even they could or couldn't help u.
    Finally,i expect ' an appologize or even a thankful word ' and the kindness i am sure u had to publish the solution u found in order to share it with people who had same problem or at least to give them the info to get the appreciation or the thanksful word u deserve.
    Rem.Never give a bad feedback to people who tried to help u.
    Regards,
    Abdetu..

  • How to use SQL OVER and PARTITION BY in OBIEE Expression Builder??

    Hi there,
    I want to create a new logical coulmn with the following SQL query.
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )
    How to use the OVER and PARTITION BY in OBIEE Expression Builder??
    Thanks in Advance

    hi bipin,
    We cant use by in Expression builder(rpd) .But use the same formula like this in Fx of answers
    SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) >OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )SUM(Inventory Detail.Qty by Detail,ITEM,Mydate)/SUM(qty by detail,item)
    First check the numerator whether it was giving correct results or not then go with denominator
    compare the results with sql that u have
    Let me know if that does work
    thanks,
    saichand.v
    Edited by: Saichand Varanasi on Jul 27, 2010 9:27 PM
    Edited by: Saichand Varanasi on Jul 27, 2010 9:28 PM

  • How to use sql variables in jdbc send adapter??

    Hi,
    i wanna use a variable in the sql statement in the jdbc send adapter.
    i know i can key sql statement in the "Query SQL Statement" in the jdbc send adapter.but i dont know how to use variables in the sql statement.
    i mean, for example, the sql statement is "SELECT * FROM t_student WHERE READFLAG = 0", but now i wanna instead of "0"(the value of the READFLAG) using a variable.
    and if i can use a variable to replace the "0"(the value of the READFLAG above sql statement), then how can i send a value to the variable??
    request help in the regard.
    thx in advance.
    Brian

    Hi,
    Use the place holders to pass the data at runtime. Check the below structure for more details.
    Hope this helps.
    Thanks and Regards,
    Kalpesh
    <root>
      <stmt>
        <Student action="SQL_QUERY">
          <access> SELECT * FROM t_student WHERE READFLAG = '$FLAG$ </access>
          <key>
            <FLAG>0</FLAG>
          </key>
        </Student>
      </stmt>
    </root>

  • How to use SQL Procedure in SDK

    Hi Experts
    I have a form with grid. It is not attached with UDO to save data. I am using SQL Query (oRecordset.DoQuery() )to update and add records of this grid to the table. if there is ten rows then I have to insert records one be one . If five records are updated and after that there is some problem and rest of records does not update in the table. I want to use RollBack command of SQL so that all updated record must removed. Can i use SQL Procedure for that . If I can then how can I transfer all grid data to Sql procedure.  Plz give your suggestion.
    Thanks
    Regards
    Gorge

    Hi,
    I guess u can use oCompany.StartTransaction  and end transaction after that u can commit or rollback.
    Vasu Natari.

  • How to set SQL trace in OCI session ?

    Hello,
    In a SQL*Plus session, I can use the SQL statement "alter session set sql_trace=true;" to set SQL trace in that session only. I assume I could execute the same SQL statement from C code in an OCI client and achieve the same goal.
    However, if I cannot change the code of this OCI client, is there a way to set SQL trace for that single session alone, without changing the C code? Say, through an environment variable, configuration file, etc.?
    Thanks.

    I am not aware of a way to selectively enable the server-side tracing without modifying the client code.
    There is client tracing available by setting the environment variable EVENT_10842 as follows:
    "server=<>;user=<>;stmt=<>;level=<>;interval=<>"
    e.g.
    setenv EVENT_10842 "server=inst1,inst2;user=scott,system;stmt=all;level=15"
    Where:
    "server" is a comma separated list or "all"
    "user" is a comma separated list or "all"
    "stmt" can be INSERT,UPDATE,DELETE,SELECT or "all"
    The following levels are supported:
    1 - Trace all server attach and server detach calls for servers listed in "server" attribute of the environment variable.
    2 - Trace all session begin, logon, session end, logoff calls for the users listed in "user" attribute of the environment variable.
    3 - Trace all prepare, execute, fetch calls for the specified statement types listed in "stmt" attribute of environment variable.
    4 - Trace all Bind, Define, Describe calls.
    5 - Trace all OCI LOB calls
    7 - Get statistical info on all connection pooling /connection related calls
    8 - Get statistical info on all session info
    9 - Get statistical info on all handle info
    10 - Get statistical info on time taken in execute and fetch calls
    11 - Get statistical info on transaction related calls
    15 - Trace all calls with statistical info.

Maybe you are looking for

  • Optimal use of iTunes with Apple TV and Time Capsule

    I'm undertaking a major "infrastructure" upgrade. This will involve Time Capsule and Apple TV. My current environment consists of 1 PowerBook and 1 Desktop PC running WIN XP. I'm running on a wireless network based off of an old Linksys Gateway (G-Ca

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

  • Cannot connect my mic+headphones to the sound card.any he

    I can connect the mic wire to the sound card(creative sound blaster audigy 5.)?but i dont have another exit for my headphones wire, so i can talk but i cant hear anything in the headphones - the sound is coming only from the speakers.is there anyway

  • Scoping violation in sub-query

    I created a sql in Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 to query Oracle Purchasing tables. The user wants to know an estimate of the number of business days it takes to approve a release once it is created. I created a subquery a

  • DPX export settings for DCP creation

    I have a short film that's been accepted to a major festival that requires a DCP, and I want to create the DCP professionally.  I would like to provide a true 24p DPX master to the DCP company. My final film is a 4K sequence at 23.976.  I have duplic