Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with v$mystat on trigger
I'm trying to build a trigger which gets the current session SID to
put it into a specific table.
This is my code :
Create trigger TRIGGER_4 after logon on schema
Declare
pxsid NUMBER(10);
Begin
select distinct sid into pxsid from v$mystat;
insert into G_SESSION (SID,USER_PX,JOB_PX) values
(pxsid,'toto','titi');
End;
When I try to run this code with SQL*plus, the following message appears (translation of a french message):
Warning : Trigger created with compilation errors
This message is linked to the 'select distinct sid into pxsid from
$mystat;' line.
(The problem appears even if I'm connected as system/manager)
Can you help me ?
thank you.
Sylvain Favard
Network Mapping Facilities
58 rue Georges Denizot
34097 Montpellier cedex 5
FRANCE
tel : 04.99.236.223
mail : s.favard_at_nmf.fr
Received on Thu Jan 03 2002 - 10:52:52 CST