Re: Access V$ Tables from stored procedure
From: Mark Styles <lambic_at_msn.com>
Date: 1996/09/19
Message-ID: <51r77n$7hc_at_pheidippides.axion.bt.co.uk>#1/1
Date: 1996/09/19
Message-ID: <51r77n$7hc_at_pheidippides.axion.bt.co.uk>#1/1
Roderick Prince <rrprince_at_comdisco.com> wrote:
>Attempting to define access the V$ dynamic tables like V$_SESSION table
>from within a stored procedure leads an error when I attempt to store
>the procedure. The error returned is PLS_00201:
>identifier 'SYS.V$_SESSION' must be declared.
>
>Any ideas on how I can access these tables?
You need to either create the procedure as the owner of the table (i.e sys), or explicitly grant access to the table to the user who will own the procedure.
Normally these tables are granted through roles, and unfortunately role grants are not used in procedure compilation (anybody know if there is a good reason for this btw??). Received on Thu Sep 19 1996 - 00:00:00 CEST