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

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

From: M. ARNAMI <m.arnami_at_skynet.be>
Date: Mon, 5 Jul 1999 17:25:07 +0200
Message-ID: <7lqiv3$nmi$1@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 - 10:25:07 CDT

Original text of this message

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