DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: TRACE ON/OFF ???

  1. #1
    Join Date
    Mar 2002
    Posts
    171
    Can someone here please explain what is TRACE ON/OFF used for? Please explain the basics and how it is used. Expecting some feedback from the gurus.

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Depends, what are you talking about?

    If you are trying to trace somebody else's session, you can:
    exec sys.dbms_system.set_sql_trace_in_session(sid, serial#, true);

    This will start a SQL trace of the session and produce a trace file in the server's udump directory. You can then use tkprof to format this output to see which of your queries is misbehavin...

    To turn tracing off, use:
    exec sys.dbms_system.set_sql_trace_in_session(sid, serial#, false);

    There are other levels of detail you can get with dbms_system.set_ev, but unless you know and understand the consequences, I wouldn't recommend using them.

    You can set tracing on for your whole instance by setting an init.ora parameter, sql_trace (I think).

    You can also set tracing on for YOUR session by issuing:
    ALTER SESSION SET SQL_TRACE=TRUE;


    [Edited by marist89 on 03-19-2002 at 09:48 AM]
    Jeff Hunter

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by Mr.Hanky
    Jeff; Is that a typo? You have the syntax identical for turning tracing on and off?
    ????
    Jeff Hunter

  4. #4
    Join Date
    Jan 2001
    Posts
    3,134

    Wink

    I was framed!! Shame on you!!

    MH
    I remember when this place was cool.

  5. #5
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Jeff Hunter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width