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: How to monitor the progress of a SQL command?

Re: How to monitor the progress of a SQL command?

From: <sybrandb_at_my-deja.com>
Date: Thu, 01 Feb 2001 13:23:53 GMT
Message-ID: <95bo12$h8r$1@nnrp1.deja.com>

In article <8pai7tc4r63o0imeoh6ln3u5492hkt8k29_at_4ax.com>,   Dino Hsu <dino1_at_ms1.hinet.net> wrote:
> Dear all,
>
> When we are running a SQL command in a SQL Plus window, the program
> stops responding and enters a pending state until it completes.
> However, if this is a long process, we don't know either the
> percentage of completion nor the expected comletion time, it can be
> confusing and annoying. Is there any way of doing this? Thanks in
> advance.
>
> Regards,
> Dino
>

Sure.
You need to have the sid and the serial# of the process (at least the sid). You can get the sid by
select sid from v$session where audsid=userenv('sessionid') Then you can query v$session_wait
v$sess_io
and v$sqlarea.
V$sqlarea contains the sqlstatement and progress info The current sqlstatement is kept by
sql_address and sql_hash_value in v$session. Both columns act as key to v$sqlarea.

Hth,

--
Sybrand Bakker, Oracle DBA

All standard disclaimers apply
------------------------------------------------------------------------


Sent via Deja.com
http://www.deja.com/
Received on Thu Feb 01 2001 - 07:23:53 CST

Original text of this message

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