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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with v$mystat on trigger

Re: Problem with v$mystat on trigger

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 3 Jan 2002 10:07:39 -0800
Message-ID: <a126lb02q5r@drn.newsguy.com>


In article <ad0f6b40.0201030852.46da97f3_at_posting.google.com>, s.favard_at_nmf.fr says...
>
>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):
>

see
http://osi.oracle.com/~tkyte/Misc/RolesAndProcedures.html

>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

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Thu Jan 03 2002 - 12:07:39 CST

Original text of this message

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