Re: PS/SQL Procedure (Error)

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 28 Jan 2002 05:27:38 -0800
Message-ID: <a20d28ee.0201280527.66ea543_at_posting.google.com>


"Geoffrey" <g.dufour_at_swing.be> wrote in message news:<3c550966$0$75153$ba620e4c_at_news.skynet.be>...
> Here is the error I get when compiling the procedure :
>
> PROCEDURE Mydb.TEST
> On line: 4
> PLS-00201: identifier 'SYS.V_$SESSION' must be declared
>
> Do you have an idea ?
>
>
> "Jens" <jens_at_faeustl.de> a écrit dans le message de news:
> f2b4018f.0201250446.3b7b369_at_posting.google.com...
> > "Geoffrey" <g.dufour_at_swing.be> wrote in message
 news:<3c502b63$0$75157$ba620e4c_at_news.skynet.be>...
> > > Hi,
> > >
> > > Can you tell me why this script does not work ?
> > >
> > > (I have the right system privileges)
> > >
> > > =======================================================================
> > >
> > > CREATE OR REPLACE PROCEDURE test IS
> > >
> > > thesid NUMBER := 0;
> > >
> > > BEGIN
> > >
> > > Select sid into thesid from v$session where program = 'blablabla' and
 status
> > > != 'KILLED';
> > >
> > > END test;
> > >
> > > /
> > >
> > > quit;
> > >
> > > =======================================================================
> > >
> > > Regards.
> >
> > Hi,
> > the procedure works fine. But if there is no hit, you get a no data
> > found exception. You have to catch it. The same if there is more than
> > one hit.
> >
> > Jens

Privilege through a role.
This question is being answered almost daily. Please search the archives

Regards

Sybrand Bakker
Senior Oracle DBA Received on Mon Jan 28 2002 - 14:27:38 CET

Original text of this message