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

Thread: Trace session

  1. #1
    Join Date
    Jan 2002
    Posts
    474
    If I run the appication and I want to trace what's running from that session, how can I do that ???

    I can't use ALTER SESSION SET SQL_TRACE =TRUE b/c I run from the application. I really need to find out what running from the application

    Thanks


  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    get the sid and serial# from v$session and run this query
    Code:
    select sql_text from v$sqltext_with_newlines 
    where (hash_value,address) in( 
    select sql_hash_value,sql_address from v$session 
    where sid=&sid and serial#=&Serial) 
    order by address,piece
    Sanjay

  3. #3
    Join Date
    Oct 2000
    Posts
    467
    execute dbms_system.set_sql_trace_in_session(sid, serial, TRUE);

    where sid and serial no. will be from v$session.

    run it with FALSE to stop tracing for that session.

    Vinit

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