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: How perform select * from V$SESSION in Oracle procedure !!

Re: How perform select * from V$SESSION in Oracle procedure !!

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 5 Jul 1999 18:32:16 +0200
Message-ID: <931192291.22055.0.pluto.d4ee154e@news.demon.nl>


You need to grant select on v$_session directly to the user running this procedure. Personally I wouldn't want that and from your 'portion of script' it is unclear what you try to accomplish.

Hth,

Sybrand Bakker, Oracle DBA

M. ARNAMI <m.arnami_at_skynet.be> wrote in message news:7lqiv3$nmi$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
> Thank you for your aid
>
> 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
>
> M. ARNAMI
>
>
>
Received on Mon Jul 05 1999 - 11:32:16 CDT

Original text of this message

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