Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Connect to diff user in PL/SQL
A copy of this was sent to Tom Best <tom.best_at_bentley.com>
(if that email address didn't require changing)
On Thu, 17 Jun 1999 16:45:04 -0400, you wrote:
>Is there a way to connect to a different user and proceed issuing SQL
>statements within a PL/SQL procedure? This is what I tried, and I get
>Invalid SQL Statement at tunr time:
>
> v_GeneralSQL := 'connect ' || v_username || '/' || v_userpwd;
> v_GeneralCursor := DBMS_SQL.OPEN_CURSOR;
> DBMS_SQL.PARSE (v_GeneralCursor, v_GeneralSQL, DBMS_SQL.V7);
> v_Dummy := DBMS_SQL.EXECUTE(v_GeneralCursor);
> DBMS_SQL.CLOSE_CURSOR(v_GeneralCursor);
>
>Thanks.
>Tom Best
chicken and egg problem.
in order to run plsql in the database -- you need to be logged in. You cannot 'login' again in plsql.
you can log in from client side plsql (such as that in forms and reports for example) but not from plsql in the database.
See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'... Mirrored (and more current) at http://govt.us.oracle.com/~tkyte/
Current article is "Fine Grained Access Control", added June 8'th
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA--