Home » SQL & PL/SQL » SQL & PL/SQL » Execute Immediate
Execute Immediate [message #38765] Mon, 13 May 2002 11:46 Go to next message
MS
Messages: 11
Registered: September 2000
Junior Member
hi

EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt NUMBER)';

When trying to create a table using Execute Immediate from PL/SQL I get the error mesg .
ORA-01031 - Insufficient Privileges.
(I can update table..though)

1. I have DBA privileges on this schema.
2. Oracle 8.1.7 on WIN NT.

Thanks and Rgds
Re: Execute Immediate [message #38766 is a reply to message #38765] Mon, 13 May 2002 11:51 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
At sqlplus prompt, I guess you can create the table, but not in a stored proc? Privs through ROLES are OK for sqlplus, but not the stored proc.
You need the privilege to be granted directly to your user.
Re: Execute Immediate [message #38768 is a reply to message #38765] Mon, 13 May 2002 12:44 Go to previous message
Rick Cale
Messages: 111
Registered: February 2002
Senior Member
How do you have DBA privs,ie. via a role? Grant explicit create table privs then retry. The user creating the table must have quota on the tablespace and not via the resource role.
Previous Topic: generating sequence/primary key based on dept (a column)type
Next Topic: Inserting special characters
Goto Forum:
  


Current Time: Fri Apr 26 03:46:40 CDT 2024