Home » RDBMS Server » Security » privilages
privilages [message #3291] Wed, 18 September 2002 01:14 Go to next message
harish agarwal
Messages: 38
Registered: September 2002
Member
Hello sir

I created one package name tab1 which creates table,delete table,insert rows etc..
I am working as system/manager

The package body is--
create package body tab1 as
procedure createtab(tabname varchar2)
as
begin
execute immediate 'create table '||tabname||' (name varchar2(20),age number)';
end;
procedure deletetab(tabname varchar2)
as
begin
execute immediate 'delete table '||tabname;
end;
procedure inserttab(tabname varchar2,name varchar2,age number) as
begin
execute immediate 'insert into '||tabname||' values(:1,:2)' using name,age;
end;
procedure deleterow(tabname varchar2,condition varchar2) as
begin
execute immediate 'delete from '||tabname||'where '||condition;
end;
end;

Now i called the procedure --

call tab1.createtab('team1');

It's giving error--

ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYSTEM.TAB1", line 5
ORA-06512: at line 1

thank u
harish
Re: privileges [message #3300 is a reply to message #3291] Wed, 18 September 2002 10:21 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
As we discuss here over and over, the owner of a procedure must have the explicit privileges granted - they cannot come from a role (like they do even with SYSTEM).
Previous Topic: database security
Next Topic: URGENT - Grant DBA PRIVS TO USER
Goto Forum:
  


Current Time: Tue Oct 26 06:52:00 CDT 2021