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: access another user's data in a stored procedure - BECOME USER pr

Re: access another user's data in a stored procedure - BECOME USER pr

From: Suzy Vordos <lvordos_at_qwest.com>
Date: Mon, 29 Apr 2002 14:46:31 -0800
Message-ID: <F001.004529C7.20020429144631@fatcity.com>

For 3), you might hit a problem with executing PL/SQL. The error is PLS-00201 which appears to be related to bug 1724703 with current_schema. The workaround is to create a public synonym.

"Magaliff, Bill" wrote:
>
> I'm writing a stored procedure to be run by the dba. I want to provide the
> ability to manipulate data from a schema specified at runtime. I have the
> schema owner as an input variable, but I see three possible way to do this:
>
> 1) have the dba verify that all necessary DML privs on that schema are
> granted to the user running the proc, and that synonyms are properly defined
> - therefore there's no need to put a schema qualifier in front of every
> object name in the proc
>
> 2) verify all DML privs as above, put DO put a schema qualifier in
> front of every object name in the proc - no need, therefore, to have the
> synonyms (although they won't hurt)
>
> 3) grant BECOME USER to the running user, and issue ALTER SESSION SET
> CURRENT_SCHEMA before running the proc.
>
> Option 3 seems the easiest to code, but I'm not sure about this particular
> priv - some of the info on MetaLink seems to indicate this priv is only
> valid for importing, but not sure.
>
> anyone have any experience with this priv, or willing to provide general
> feedback on how to proceed? I'm relatively new to this and am also in
> search of guidelines to follow when writing this sort of stuff.
>
> many thanks.
>
> bill
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Magaliff, Bill
> INET: Bill.Magaliff_at_lendware.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> 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.com
-- 
Author: Suzy Vordos
  INET: lvordos_at_qwest.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 29 2002 - 17:46:31 CDT

Original text of this message

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