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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL Question : How to understand which statement Oracle is executing

Re: PL/SQL Question : How to understand which statement Oracle is executing

From: Richard <roxl_at_ozemail.com>
Date: Sun, 13 Jun 1999 23:50:03 +1000
Message-ID: <CKO83.988$fR5.5179@ozemail.com.au>

One problem with DBMS_OUTPUT is that the output only gets written after the program completes. Sooo... you may want to be a bit more sneaky and use one of the inbuilt DBMS packages to register your app with Oracle. This lets the DBA/developer know what action is being performed at different points in time. You should be able to check status in this case via V$SESSION.

To be honest, I can't remember the syntax for this (and my code's at work, so I can't check), but it seems like the simplest solution. Other methods are to fire off messages via Oracle pipes, or just collect timing stats/logic for each SQL statement (I've done this through code when I don't have access to Oracle trace logs). These would probably involve more effort though.

Regards,

Richard Gowan

smfrank_at_my-deja.com wrote in message <7jrne0$nld$1_at_nnrp1.deja.com>...
>The easiest way to determine where a procedure gets hung up is to use
>DBMS_OUTPUT to put an output line on the screen...This is the easiest
>way to debug.
>
>Good luck,
>SF
>
>
>
>In article <928904575.15279.0.pluto.d4ee154e_at_news.demon.nl>,
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>> look at v$open_cursor from a second session.
>> You will need to get the sid for the first session
>> by something like
>> select sid, program from v$session
>> where type = 'USER' and schemaname = '<your schema>'
>>
>> Hth,
>>
>> Sybrand Bakker, Oracle DBA
>>
>> Dogan Cibiceli wrote in message <375DB1F8.60D590EB_at_gwl.com>...
>> >Hi,
>> > This is rather a simple question. I have an anoymous pl/sql block
>and
>> >it is processing some temp tables. During its execution it seems, it
>> >stops at some point for some reason because I see no updates to the
>temp
>> >table. How can I understand where it is at during execution ? any
>bright
>> >ideas, any internal tables I can look at ? Thanks in adv.
>> >
>> >D
>> >
>>
>>
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
Received on Sun Jun 13 1999 - 08:50:03 CDT

Original text of this message

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