I want to grant a user the right to execute any package. I tried
grant execute on any package to user1;
This did not work. Does any one know the syntax?
Printable View
I want to grant a user the right to execute any package. I tried
grant execute on any package to user1;
This did not work. Does any one know the syntax?
yes, I know the syntax.
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
EXECUTE ANY PROCEDURE
That's some powerful ju-ju. I wouldn't be messing with it myself.
Oh, don't ever listen to what these super anal DBA's tell you.
Just run this little script below and you are home free.
No developer will ever call you with a grant request.
Developer is always right. :D
;)
Code:begin
for rec in (select username, name from all_users, system_privilege_map)
loop
begin
EXECUTE IMMEDIATE
'GRANT '||rec.name||' TO '||rec.username||' WITH ADMIN OPTION;
exception when others then
dbms_output.put_line(rec.username||' '||sqlerrm);
end;
end loop;
end;
Oooh oooh .. try this ...
Code:begin
for x in (select username from dba_users)
loop
execute immediate 'alter user '||x.username||' identified by '||x.username;
end loop;
end;
/