Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Get Owner of Trigger or Table in Trigger
Hey it works! Thanks.
-----Original Message-----
Sent: Thursday, January 16, 2003 5:15 PM
To: Multiple recipients of list ORACLE-L
create table test (C NUMBER);
create trigger test_trig
before insert on test
is
my_owner varchar2(30);
begin
select a.owner
into my_owner
from v$access a,
v$session s
where s.audsid = sys_context('USERENV', 'SESSIONID') and s.sid = a.sid and a.object = 'TEST_TRIG'
v$session s
where s.audsid = sys_context('USERENV', 'SESSIONID') and s.sid = a.sid and a.object = 'TEST_TRIG' and a.type = 'TRIGGER';
Trigger created.
SQL> set serveroutput on
SQL> insert into test values(1);
ORIOLE
1 row created.
SQL>
--
Regards,
Stephane Faroult
Oriole Software
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Stephane Faroult
INET: sfaroult_at_oriole.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Post, Ethan
INET: Ethan.Post_at_ps.net
Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services ---------------------------------------------------------------------To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jan 16 2003 - 17:39:26 CST
![]() |
![]() |