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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Connect to another user in pl/sql block

Re: Connect to another user in pl/sql block

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 24 Aug 2000 20:50:46 +0200
Message-ID: <967151396.27431.3.pluto.d4ee154e@news.demon.nl>

You can't.
If you are planning to use a distributed database, there are better techniques to accomplish.
There shouldn't be any problem in creating a database link and executing whatever you want remotely.
begin
myproc_at_remotedb(param1, param2);
end;
will run at the remote site without problems. Please read up on distributed databases and database links in your docs.

Hth,

Sybrand Bakker, Oracle DBA

"Joanna C" <joannac_at_peregrine.ie> wrote in message news:8o3ids$gci$1_at_kermit.esat.net...
> hi guys,
>
> I need to connect to another user inside a pl/sql block. Eg. I am userA.
 In
> the pl/sql stored procedure, I need to then connect as UserB. By doing so,
 I
> will be running a UserB session rather than UserA.
>
> Is there a way of solving this problem?
>
> I know we can do CONNECT <username>/<Password>@<SID> in sql*plus.
>
> I do not know how to do it through pl/sql stored procedure.
>
> Using DBMS_SQL does not help. Is there any Oracle package which I can use?
>
> Any assistance is greatly appreciated.
>
> Thank you
>
> Regards,
> Joanna
>
>
Received on Thu Aug 24 2000 - 13:50:46 CDT

Original text of this message

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