Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: trace via logon trigger

RE: trace via logon trigger

From: Ken Payton <Ken.Payton_at_choicepointprg.net>
Date: Thu, 13 May 2004 10:09:19 -0400
Message-ID: <91E3FFBB780D6945B8A5D90569A74461CA2F86@bobwpmsg001.choicepoint.net>


Thanks, this gave me what I needed. I was doing a schema level = logon_trigger, but my problem was with the quotes. Using the chr(39) to = generate my quotes solved the problem. =20

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Riyaj Shamsudeen Sent: Thursday, May 13, 2004 9:58 AM
To: oracle-l_at_freelists.org
Subject: RE: trace via logon trigger

This should work...
create or replace trigger set_system_event after logon on database
declare
v_user dba_users.username%TYPE:=3Duser;
sql_stmt1 varchar2(256) :=3D'alter session set events '||chr(39)||'10046 trace name context forever, level 12'||ch r(39);
begin
  if (v_user=3D'XXXX') THEN

      execute immediate sql_stmt1;
  end if;
end;
/

Thanks
Riyaj "Re-yas" Shamsudeen
Certified Oracle DBA

-----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:56 AM
To: oracle-l_at_freelists.org
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 = =3D
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 =3D 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:
         . ( * @ % & =3D3D - + ; < / > at in is mod not rem return
         returning <an exponent (**)> <> or !=3D3D or ~=3D3D >=3D3D =
<=3D3D <> =3D
and or

         like between into using || bulk

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Stephen.Lee_at_DTAG.Com Sent: Thursday, May 13, 2004 9:49 AM
To: oracle-l_at_freelists.org
Subject: RE: trace via logon trigger

> -----Original Message-----
> does not start the session tracing.

>=3D20
> 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_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://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_at_freelists.org put
'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://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_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://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_at_freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Thu May 13 2004 - 09:13:38 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US