Home » SQL & PL/SQL » SQL & PL/SQL » View has erorrs
View has erorrs [message #360820] Mon, 24 November 2008 01:38 Go to next message
saiphani723
Messages: 36
Registered: July 2006
Location: Hyderabad
Member
I created a view in sys user and create public synonym and gave the grants
./fa/5334/0/
and when i am trying to query from the another user it is giving the following error
select * from user_session
*
ERROR at line 1:
ORA-04063: view "ADMIN.USER_SESSION" has errors

can anybody tell me the solution.
  • Attachment: create.png
    (Size: 5.03KB, Downloaded 176 times)
Re: View has erorrs [message #360826 is a reply to message #360820] Mon, 24 November 2008 01:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Read the message, you didn't create it in SYS schema.

Never create your objects in SYS schema, grant the necessary privileges to your user.

Regards
Michel
Re: View has erorrs [message #360843 is a reply to message #360826] Mon, 24 November 2008 02:18 Go to previous messageGo to next message
saiphani723
Messages: 36
Registered: July 2006
Location: Hyderabad
Member
Thanks for your reply.

When i am trying to give grants on v$session to another user it is not allowing.

Can u pls help on this.
Re: View has erorrs [message #360848 is a reply to message #360843] Mon, 24 November 2008 02:31 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Because you don't use the correct syntax.

Regards
Michel
Re: View has erorrs [message #360853 is a reply to message #360848] Mon, 24 November 2008 02:45 Go to previous messageGo to next message
saiphani723
Messages: 36
Registered: July 2006
Location: Hyderabad
Member
following commad i used
./fa/5335/0/
  • Attachment: gran.png
    (Size: 1.86KB, Downloaded 133 times)
Re: View has erorrs [message #360857 is a reply to message #360853] Mon, 24 November 2008 02:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You cannot grant "all" to v$, you can only grant "select", is this not what the message says?

In addition, syntax is:
grant select on v_$session

And use copy and paste in text format and code tags not images. Today I can read it, most often I can't because they are blocked by our proxy/firewall.

Regards
Michel


Re: View has erorrs [message #360863 is a reply to message #360857] Mon, 24 November 2008 02:56 Go to previous message
saiphani723
Messages: 36
Registered: July 2006
Location: Hyderabad
Member
Thanq michel.
It is working.
Previous Topic: Index Check
Next Topic: string manipulation
Goto Forum:
  


Current Time: Sun Dec 04 02:13:19 CST 2016

Total time taken to generate the page: 0.04506 seconds