Home » SQL & PL/SQL » SQL & PL/SQL » view creation error (oracle 10g,win xp)
view creation error [message #322514] Sat, 24 May 2008 00:21 Go to next message
swas_fly
Messages: 220
Registered: March 2008
Location: Bhubaneswar
Senior Member
SQL> ed
Wrote file afiedt.buf

  1  create or replace view test_123
  2  as
  3  select e.EMPNO,e.ENAME,d.deptno,d.dname
  4  from emp e,dept d
  5* where e.deptno=d.deptno
SQL> /
create or replace view test_123
                       *
ERROR at line 1:
ORA-01031: insufficient privileges



Why i am getting this error?
Re: view creation error [message #322516 is a reply to message #322514] Sat, 24 May 2008 00:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
CREATE VIEW, Prerequisites:
Quote:
The owner of the schema containing the view must have the privileges necessary to either select, insert, update, or delete rows from all the tables or views on which the view is based. The owner must be granted these privileges directly, rather than through a role.

Regards
Michel
Re: view creation error [message #322526 is a reply to message #322516] Sat, 24 May 2008 02:14 Go to previous messageGo to next message
Littlefoot
Messages: 20895
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Right; although, on the other hand, perhaps user (who is trying to create a view) lacks in CREATE VIEW privilege.
Re: view creation error [message #322530 is a reply to message #322526] Sat, 24 May 2008 02:39 Go to previous message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Yes, could be simply that, often forget the obvious. Wink

Regards
Michel
Previous Topic: To Display Preferred Column
Next Topic: Using rowid to insert
Goto Forum:
  


Current Time: Mon Dec 05 21:25:02 CST 2016

Total time taken to generate the page: 0.20615 seconds