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 -> Problem with v$mystat on trigger

Problem with v$mystat on trigger

From: sylvain favard <s.favard_at_nmf.fr>
Date: 3 Jan 2002 08:52:52 -0800
Message-ID: <ad0f6b40.0201030852.46da97f3@posting.google.com>


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

Original text of this message

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