Home » RDBMS Server » Security » Problem in creating view in toad (windows xp)
Problem in creating view in toad [message #399843] Fri, 24 April 2009 04:44 Go to next message
srikanth331
Messages: 9
Registered: April 2009
Location: USA
Junior Member
Hi all,
I'm unable to create view in my system using toad. can anyone sugest me what is wrong with the below code. should i use any grant command before running it. if it is then how should i write it. the error it is showing is ORA-01031: insufficient privileges.. THanks in advance

create or replace view empvu30
as select ename,sal,empno
from emp
where deptno=30;

Thanks,
Sajja.
Re: Problem in creating view in toad [message #399853 is a reply to message #399843] Fri, 24 April 2009 04:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
A privileged user should grant CREATE VIEW to the user who is now unable to create a view.
Re: Problem in creating view in toad [message #399878 is a reply to message #399853] Fri, 24 April 2009 06:17 Go to previous messageGo to next message
srikanth331
Messages: 9
Registered: April 2009
Location: USA
Junior Member
I executed the following stmts in toad.. if any wrong in it pls suggest me...
GRANT ALL PRIVILEGES ON emp
TO PUBLIC;
create or replace view empvu30
as select ename,sal,empno
from emp
where deptno=30;
but i'm getting the same error...

thanks,
sajja.
Re: Problem in creating view in toad [message #399884 is a reply to message #399843] Fri, 24 April 2009 06:27 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Did you read and fulfill ALL the prerequisites listed in CREATE VIEW page in documentation?
I bet not.

Regards
Michel
Re: Problem in creating view in toad [message #399985 is a reply to message #399884] Fri, 24 April 2009 16:01 Go to previous messageGo to next message
srikanth331
Messages: 9
Registered: April 2009
Location: USA
Junior Member
Hi Michel,
I'm a student. I'm practicing this for my interest. I just need some suggestions and help how to create this views. can u please tell me what's wrong in it....
Thanks,
Sajja.
Re: Problem in creating view in toad [message #399988 is a reply to message #399985] Fri, 24 April 2009 16:33 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
OK, so what does your
GRANT ALL PRIVILEGES ON emp TO PUBLIC;
have to do with you being unable to create a view?

Please, search the documentation for CREATE VIEW. Read the "Prerequisites" section. What does it say? What did you do, and what did you NOT do from the prerequisites list?
Previous Topic: Microsoft, Oracle issue patches for slew of holes
Next Topic: Role with execute package and drop table
Goto Forum:
  


Current Time: Fri Mar 29 04:29:06 CDT 2024