Results 1 to 3 of 3

Thread: Sql Trace

  1. #1
    Join Date
    Jun 2003
    Posts
    294

    Exclamation Unanswered: Sql Trace

    Hello, actually I'm having some tuning problems and I would like to know how to trace every action of a user/schema, and not just for 1 specific session but for every session of this user for taking a tkprof later.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    create a LOGON trigger.
    IF ( USER = 'JOE')
    THEN
    ALTER SESSION SET SQL_TRACE = TRUE;
    ENDIF
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    or issue this as sysdba:
    PHP Code:
    /*  Log in as SYS                                  */
    /* To trace a remote session just paste the output */
    /* into your sqlplus session.                      */

    select
    'execute sys.dbms_system.set_ev('|| sid ||','|| serial# ||',10046,12, '''');'
    from v$session
    where username 
    =  '&&username';


    /* to turn off: */

    select
    'execute sys.dbms_system.set_sql_trace_in_session('|| sid ||'  ,'|| serial# ||',FALSE);'
    from v$session
    where username 
    =  '&&username'
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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