Hi i have user parse_as_user here is a small example it works for sql/pl sql
CREATE OR REPLACE PROCEDURE SYS.RUN_AS_USER (
P_USERNAME IN VARCHAR2,
P_SQL IN VARCHAR2)
IS
V_CUR INTEGER;
V_RESULT INTEGER;
V_UID NUMBER;
BEGIN
SELECT USER_ID INTO V_UID FROM DBA_USERS WHERE
USERNAME=UPPER(P_USERNAME);
V_CUR := DBMS_SQL.OPEN_CURSOR;
SYS.DBMS_SYS_SQL.PARSE_AS_USER(
V_CUR,
P_SQL,
DBMS_SQL.NATIVE,
V_UID);
V_RESULT := DBMS_SQL.EXECUTE(V_CUR);
DBMS_SQL.CLOSE_CURSOR(V_CUR);
END;
/
> Hi All,
> Does anyone know how Oracle makes use of the BECOME USER role ? Is it
> during imports ? Is there any way of using it with SQL or PL/SQL ?
> Regards,
> Rob
>
> P.S. If anyone is interested I've produced a modified version of Statspack
> for Oracle 7.3 on Unix. You can get it by visiting the Download section at
> www.coracle.com - don't worry it's free ! To install or produce a report
> use the sql scripts that have a 73 suffixed to those you'd use to install
> statspack under 8i.
>
>
> --------
> Oracle documentation is here: http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
> To unsubscribe: send a blank email to oracledba-[Email Address Removed] To subscribe: send a blank email to oracledba-[Email Address Removed] Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> Tell yer mates about http://www.farAwayJobs.com
> By using this list you agree to these terms:http://www.lazydba.com/legal.html
>
>
-----------------------------------------------
Runbox Mail Manager - www.runbox.com
Free online email application
Oracle LazyDBA home page