Home » SQL & PL/SQL » SQL & PL/SQL » can't create a view from v$session
can't create a view from v$session [message #24725] Mon, 03 March 2003 10:09 Go to next message
Daniele Rattellini
Messages: 38
Registered: August 2002
Member
when I try to execute this statement:

create view myview as
select * from v$session

oracle answers me with this error
ORA-00942: table or view does not exist

I tried v$session, v_$session, sys.v$session, sys.v_$session, but nothing works.

does anyone help me, please?

thanks

daniele
Re: can't create a view from v$session [message #24726 is a reply to message #24725] Mon, 03 March 2003 10:32 Go to previous messageGo to next message
Ivan
Messages: 180
Registered: June 2000
Senior Member
By default, the Dynamic Performance Views are accessible only to the SYS user, or users with SYSDBA role.
Re: can't create a view from v$session [message #24731 is a reply to message #24725] Mon, 03 March 2003 11:36 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Re: can't create a view from v$session [message #24737 is a reply to message #24725] Tue, 04 March 2003 01:27 Go to previous messageGo to next message
Daniele Rattellini
Messages: 38
Registered: August 2002
Member
You probably misunderstood my problem : I can view v$session when I execute this statement "Select * from v$session", but I can't create a view which contains v$session. For example if I try to run the statement "Create or replace view MyView as Select * from v$session" Oracle doesn't allow me to do it;

thanks in advance.
Daniele
Re: can't create a view from v$session [message #24740 is a reply to message #24737] Tue, 04 March 2003 05:53 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
the base table for v$SESSION is v_$session.
if u have the select priv on V_$session, 
then u can create a view on v$session.
todd has given a link to Asktiom which gives a lot more information.
mag@itloaner1_local > connect sys/sys
Connected.
mag@itloaner1_local >  grant select on v_$session to scott;

Grant succeeded.

mag@itloaner1_local > connect scott/tiger
Connected.

mag@itloaner1_local > create or replace view  mysession as select * from v$session;

View created.

Re: can't create a view from v$session [message #34897 is a reply to message #24740] Sun, 09 January 2005 18:33 Go to previous message
Thanarak From Thailand
Messages: 1
Registered: January 2005
Junior Member
Thank you.
Previous Topic: How to tune a complex VIEW
Next Topic: UNIX neccesary for oracle
Goto Forum:
  


Current Time: Fri Apr 10 14:26:56 CDT 2026