Home » RDBMS Server » Security » execute any privilege
execute any privilege [message #164291] Wed, 22 March 2006 16:05 Go to next message
matysek
Messages: 1
Registered: March 2006
Location: Prague
Junior Member
can anyone tell me why does not work the following?

logged as sys:
create user mara identified by mara;
grant create session to mara;
grant execute any porcedure to mara;

after logging as mara i wanted to execute following:

declare
uid number;
sqltext varchar2(100) := 'alter user system identified by hacker';
myint integer;
begin
select user_id into uid from all_users where username like 'SYS';
myint:=sys.dbms_sys_sql.open_cursor();
sys.dbms_sys_sql.parse_as_user(myint,sqltext,dbms_sql.native,UID);
sys.dbms_sys_sql.close_cursor(myint);
end ;

it does not work - i got error:identifier 'SYS.DBMS_SYS_SQL' must be declared

to make it work i had to extra grant execute on dbms_sys_sql to mara

does it mean that execute any procedure does not apply to all procedures?
thanks a lot
Re: execute any privilege [message #165586 is a reply to message #164291] Fri, 31 March 2006 00:20 Go to previous message
kmsalih
Messages: 197
Registered: March 2006
Senior Member
Hi,

Login as sys as sysdba and issue the command
SQL> grant execute on dbms_sys_sql to mara;

Reason is that dbms_sys_sql is a Package.
Also not belongs to PUBLIC.

And you are trying to parse a statement which the user don't have privilige.




Rgds
SALIH KM
Cool
Previous Topic: RMAN backup error
Next Topic: Using sticky bit on Oracle directory & umask
Goto Forum:
  


Current Time: Wed Dec 11 20:01:44 CST 2024