Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: trace via logon trigger
I've used the following trigger successfully in the past, under Oracle =
8.1.7. You need to grant ALTER SESSION directly to the trigger owner. =
In hindsight, it would probably be better to update it to "after logon =
on schema" (don't recall why I did it this way), but it works fine =
as-is.
BEGIN
username :=3D sys_context('USERENV','SESSION_USER');
if username =3D 'LLWEBC' then
execute immediate 'ALTER SESSION SET EVENTS ''10046 TRACE NAME =
CONTEXT FOREVER, LEVEL 4''';
end if;
END;
/
----- <snip> -----
It would probably=20
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Ken Payton
Sent: Thursday, May 13, 2004 8:44 AM
To: oracle-l_at_freelists.org
Subject: trace via logon trigger
Anyone have any tips on setting up a logon trigger for initiating a =3D
10046 event. I tried the following but although it shows no errors it =
=3D
does not start the session tracing.
execute immediate 'alter session set events ''10046 trace name context =
=3D
forever, level 4'' ';
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.htmlput 'unsubscribe' in the subject line.
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to: oracle-l-request_at_freelists.org
![]() |
![]() |