Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Works but PL/SQL hangs
"Ana C. Dent" wrote:
> Amir wrote:
> > When I issue a statement to fetch some data from the remote database
> > on the SQL prompt it works fine, as given below
> >
> > SQL> select trans_no from XYZ_at_remotedb;
> >
> > But when I embbed the same query in PL/SQL block it hangs and does not
> > complete
> >
> > declare
> > x varchar2(50);
> > begin
> > select trans_no into x from XYZ_at_remotedb;
> > end;
> >
> >
> > What could be the reason?
> >
> > ~~Amir
>
> I suspect that it is a "permissions" problem.
>
> Access to an object which are obtained via a ROLE
> will work as desired using SQL*PLUS.
> However access to an object when using PL/SQL
> can ONLY be accomplished when the invoker has
> been explicitly GRANTed access to the object.
>
> SQL*Net complicates the situation and if there are
> version differences between the local & remote sessions
> this too can impact the results.
I suspect so too but it should return an error message ... not just hang.
The permissions is certainly worth checking first. But a deeper search may be required.
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sat May 03 2003 - 09:33:36 CDT
![]() |
![]() |