Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic SQL privilege

Status
Not open for further replies.

NuWood

Programmer
Mar 14, 2002
44
GB
Hi

I am having trouble with the EXECUTE IMMEDIATE statement. I am generating a CREATE VIEW command which works great as an annonymous block. When I put the same code into a package I get ORA-1031 insufficient privileges error which talks about trying to change the user and password. The view needs to be in them same schema as the package and the call is made from the same schema.
 
Hi everyone

I have forgotten the requirement to explicitly GRANT privilege to the user when run from within a procedure etc....

i.e GRANT CREATE VIEW TO MYUSER;

is needed when you want to create a view from within a procedure using DBMS_SQL or EXECUTE IMMEDIATE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top