Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Connecting to different user from within a package

RE: Connecting to different user from within a package

From: Pardee, Roy E <roy.e.pardee_at_lmco.com>
Date: Mon, 21 Apr 2003 08:37:40 -0800
Message-ID: <F001.00585E29.20030421083740@fatcity.com>


My understanding is that by default, packages execute w/the security context of the owning user (that is, any executing user enjoys all the privs granted directly to the owning user, for the duration of the call). You can indicate that they should instead run as the calling user by specifying AUTHID CURRENT_USER in the package definition.

So, I would think that if you created a package as SYS, and separated out those portions you wanted to run as the executing user into a separate package created with AUTHID CURRENT_USER, you'd have a chance at getting what you want.

HTH,
-Roy

Roy Pardee
Programmer/Analyst
SWFPAC Lockheed Martin IT
Extension 8487

-----Original Message-----

Sent: Friday, April 18, 2003 3:42 PM
To: Multiple recipients of list ORACLE-L

Hi All,
This question may have been asked before, but i will ask it anyway since i could not find the answer to it...how do we connect to a different user from within a package, for example if i am executing a package while connected to scott user, i want to connect as system user from within the package and then reconnect as scott user. Any guidelines ? Murtaza.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Murtaza Habib
  INET: murtazah_at_msoft.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Pardee, Roy E
  INET: roy.e.pardee_at_lmco.com
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services

---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Mon Apr 21 2003 - 11:37:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US