Re: Cannot read from sys.v_$session

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 15 Jan 2004 12:12:20 -0800
Message-ID: <2687bb95.0401151212.3c70c181_at_posting.google.com>


chris_jack_at_msn.com (Chris Jack) wrote in message news:<648c9f62.0401150759.7f571f6b_at_posting.google.com>...
> I have done the following as dbo:
>
> grant select on sys.v_$session to dbo;
> create or replace view z as select * from sys.v_$session ;
>
> But the second command gives me:
> ERROR at line 1:
> ORA-00942: table or view does not exist
>
> I can select directly from sys.v_$session by
> select * from sys.v_$session;
>
> What do I have to do/grant permission wise to be able to create a view
> or PL/SQL function which accesses sys.v_$session?
>
> Regards
> Chris (chris_jack_at_msn.com)

Because as the procedure or view owner you can grant access to your object to others, but because you reference objects owned by third parties you must have a direct grant on the foreign object and have the avility to grant access to others (with grant option). See the DBA Administration manual and SQL manual sections on managing object privileges.

HTH -- Mark D Powell -- Received on Thu Jan 15 2004 - 21:12:20 CET

Original text of this message