Re: Errors with select * from v$session

From: Arye Ben-Menachem <arye_at_netvision.net.il>
Date: Mon, 5 Jul 1999 21:13:11 +0200
Message-ID: <7lqscr$dil$1_at_news.netvision.net.il>


M. ARNAMI wrote in message <7lq0ar$gde$1_at_calais.pt.lu>...
>Hello,
>Does anyone know how to select from v$session in oracle procedure script !
>I work with Personal Oracle7.3.4 on Win95
>
>The portion of script is :
>
>
>Create or replace procedure get_unite(unite_id_in IN OUT char ,
user_id_in
>IN OUT char) is
> isLocked boolean := false ;
>curr_stat char(1) ;
>by_user_id char(8) ;
>in_poste char(10) ;
>c BINARY_INTEGER := 0;
>
>begin
>
> select statut, user_id, poste into curr_stat, by_user_id, in_poste
> from UNITE where unite_id=unite_id_in FOR UPDATE ;
>
> if curr_stat = '1' then
>
> select count(*) into c from v$session
> where rtrim(client_info) =
>rtrim(by_user_id)||rtrim(in_poste);
>
> if c > 0 then isLocked := true ; end if;
>
> end if ;
>
>........
>
>end get_unite;
>/
>
>I have error following error after compilation with no system user:
>
>Errors for PROCEDURE GET_UNITE:
>LINE/COL ERROR
>---------------------------------------------------------------------------
-
>----
>13/29 PLS-00201: identifier 'SYS.V_$SESSION' must be declared
>13/1 PL/SQL: SQL Statement ignored
>
>
>
>
>
You must grant select on SYS.V_$SESSION to user runinin/compiling the procedure PL/Sql dose'nt recognize privliges to Roles (Public neither other role)

Arye Ben-Menachem
DBA Received on Mon Jul 05 1999 - 21:13:11 CEST

Original text of this message