Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Connect to another user in pl/sql block
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
![]() |
![]() |