Change Authid to CURRENT_USER

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Senior Member
Posts: 96
Joined: Fri Aug 24, 2007 7:17 am

Change Authid to CURRENT_USER

Postby Guru3i » Mon Aug 13, 2012 4:31 pm

Hi Tim,


We need to change Authid to Current_user for nearly 2500 procedure/packges. From the journals and oracle forums i find this cant be done through a global setting or through any of the parameter or any setting which will make sure all procedures/packages fires with authid current_user mode. Is that we will have to open each and every procedure/package to include Authid and recompile it.

If thats so it will be a humongous effort to do it for all of my source code. Can we have this automated in some manner or the other to avoid this huge effort by changing any sys internals or any data dictionary objects.

Thanks and expecting a favorable reply.

Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK

Re: Change Authid to CURRENT_USER

Postby Tim... » Mon Aug 13, 2012 4:46 pm


Sorry. It has to be done the old fashioned way... :(

I guess you could write something to pull out the source of each object from the USER_SOURCE view, parse it to identify where to add the AUTHID clause, add it and compile the new source. I don't think I would trust such a method though. You need to consider the impact of each change, so this is not something that should be automated in my opinon.


Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website:
My blog:

Return to “Oracle SQL and PL/SQL Development”

Who is online

Users browsing this forum: No registered users and 1 guest