Re: trace every SQL statement of a specific user

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Thu, 6 Mar 2008 05:14:13 -0800 (PST)
Message-ID: <4d6cfe1c-facf-44a4-be3f-27928ead20de@8g2000hse.googlegroups.com>


One can do that from database side via logon trigger, so tracing will be started regardless from whatever place user connects.

CREATE OR REPLACE TRIGGER on_logon
AFTER LOGON
on gints.schema
declare
  v varchar2 (100) := 'alter session set events ''10046 trace name context forever, level 12'''
begin
  execute immediate v;
end;
/

So as soon as gints would connect to db tracing would be started.

For your favourote way of tracing as well as what levels mean you can look in my paper Alternative ways to activate trace at http://gplivna.eu/papers/oracle_trace.htm

Gints Plivna
http://www.gplivna.eu Received on Thu Mar 06 2008 - 07:14:13 CST

Original text of this message