Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Tracing ref_cursors
Manish wrote:
>
> > You need to invoke the plsql from java, not have the plsql invoke the java, in
> > this case.
>
> I'm not sure I understood your response.
>
> My requirement is:
>
> I'd like to write a stored proc that takes any ref_cursor and prints
> out its contents to dbms_output.
>
> Since PL/SQL cannot do this, I thought maybe I could pass the
> ref_cursors to a Java class that can. You say that this is not
> possible, so it would seem that my requirement cannot be fulfilled.
>
> Cheers,
> Manish
>
> Thomas Kyte <tkyte_at_us.oracle.com> wrote in message news:<9unmf302tdo_at_drn.newsguy.com>...
> > In article <18b0424d.0112051859.2a05f067_at_posting.google.com>,
> > manish.shah_at_emagine-int.com says...
> > >
> > >Hi,
> > >
> > >I call a lot of PL/SQL stored procs that return ref_cursors, from a
> > >Java application server.
> > >
> > >To help me debug, I'd like to write a stored proc that takes any
> > >ref_cursor and prints out its contents to dbms_output.
> > >
> > >The dba's said it was not possible to do this in PL/SQL,
> >
> > thats correct
> >
> > >so I wrote a
> > >Java class to do it instead -
> > >
> > >public class Tracer {
> > >
> > > public static void traceResultSet(ResultSet rs);
> > >
> > >}
> > >
> > >I can't work out how to call this from PL/SQL and pass in a
> > >ref_cursor. Any help appreciated.
> > >
> >
> > the java must call the plsql -- the java can get the ref cursor BACK, it cannot
> > get the ref cursor passed to it.
> >
> > You need to invoke the plsql from java, not have the plsql invoke the java, in
> > this case.
> >
> > >Cheers,
> > >Manish
What do you mean 'print out it's contents'? Do you mean the data, or
the SQL the ref cursor is a part of?
-- Ron Reidy Oracle DBA Reidy Consulting, L.L.C.Received on Thu Dec 06 2001 - 18:53:41 CST
![]() |
![]() |