This should work... create or replace trigger set_system_event after logon on database declare v_user dba_users.username%TYPE:=user; sql_stmt1 varchar2(256) :='alter session set events '||chr(39)||'10046 trace name context forever, level 12'||ch r(39); begin if (v_user='XXXX') THEN execute immediate sql_stmt1; end if; end; / Thanks Riyaj "Re-yas" Shamsudeen Certified Oracle DBA -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Ken Payton Sent: Thursday, May 13, 2004 8:56 AM To: oracle-l@xxxxxxxxxxxxx Subject: RE: trace via logon trigger yes, it works outside the trigger. I believe it's my pl/sql, not my strongest point. I am getting errors = when building my trigger. create or replace trigger kpayton.logon_trigger after logon on kpayton.schema begin execute immediate 'alter session set events ''10046 trace name context = forever, level 4'' '; exeptions when others then null; end; / Errors for TRIGGER KPAYTON.LOGON_TRIGGER: 2/48 PLS-00103: Encountered the symbol "10046" when expecting one of the following: . ( * @ % & =3D - + ; < / > at in is mod not rem return returning <an exponent (**)> <> or !=3D or ~=3D >=3D <=3D <> = and or like between into using || bulk -----Original Message----- From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Stephen.Lee@xxxxxxxx Sent: Thursday, May 13, 2004 9:49 AM To: oracle-l@xxxxxxxxxxxxx Subject: RE: trace via logon trigger > -----Original Message----- > does not start the session tracing. >=20 > execute immediate 'alter session set events Does the user have alter session privilege? ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- -- Attached file included as plaintext by Ecartis -- -- Desc: Signature The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If the reader of this message is not the intended recipient, you are hereby notified that your access is unauthorized, and any review, dissemination, distribution or copying of this message including any attachments is strictly prohibited. If you are not the intended recipient, please contact the sender and delete the material from any computer. ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request@xxxxxxxxxxxxx put 'unsubscribe' in the subject line. -- Archives are at //www.freelists.org/archives/oracle-l/ FAQ is at //www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------