Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Change Authid to CURRENT_USER

ramarunJul 27 2012 — edited Jul 27 2012
Hello All,

By default any procedure, package created is compiled with Authid Definer Rights. How to change the default setting/behavior of this feature i.e. How to change this to Authid Current_User for a set of 1000 procedures and packages. Various journals and forums in web advice that it cannot be changed dynamically.

We tried executing it through Sys_context But couldnt succeed. There is come catch in this or are we missing some thing basically.
--Executing this 
dbms_session.set_context('USERENV','CURRENT_USER',user);

--Returns the error
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SESSION", line 101
ORA-06512: at line 1
Request the PRO's to help and participate.

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 24 2012
Added on Jul 27 2012
6 comments
2,039 views