Getting bind variables from a sql trace
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Getting bind variables from a sql trace

  1. #1
    Join Date
    Aug 2000
    Posts
    143

    Question

    Im using the set_sql_trace_in_session package to trace/debug an application problem. Does anyone know of a way of getting the bind variables from the trace.

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    yea you have to set sql_trace at level 4

    Code:
    alter session set events '10046 trace name context forever, level 4'
    
    if itīs remote session you have to use oradebug or dbms_system but I forgot the syntax for dbms_system (itīs smth dbms_system.set_ev )
    
    PROCEDURE SET_EV
     Argument Name                  Type                    In/Out Default?
     ------------------------------ ----------------------- ------ --------
     SI                             BINARY_INTEGER          IN
     SE                             BINARY_INTEGER          IN
     EV                             BINARY_INTEGER          IN
     LE                             BINARY_INTEGER          IN
     NM                             VARCHAR2                IN
    But if itīs remote session oradebug is easier I guess

  3. #3
    Join Date
    Feb 2001
    Posts
    389
    use event 10046 with level 8 or use package dbms_system.set_ev with level 8.

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I think level 8 doesnt give bind variable, it gives session waits, you can use either level 4 or 12 (level 12 is level 4+8, both bind variables and session waits)


    Hmm nice holiday tomorrow here in madrid

  5. #5
    Join Date
    Aug 2000
    Posts
    143
    Thanks guys.
    what does the 10046 represent?


  6. #6
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    10046 is equivalent to SQL_TRACE, itīs just the event number

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