Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

How to know how much work done for a session

ezhilarasan_1
Occasional Advisor

How to know how much work done for a session

Hi,

I got the below script from Metalink to know about How much work done for a RMAN session.
Likewise can we find out for each session of other jobs. Because users are oftently asking like how much ( presentage %) work done and
how long estimated time ..

How to answer them !! can we use the below SQL
formula for any job ? Please reply me.

-----------------------------------
To calculate the progress of an RMAN job, run the following query in SQL*Plus while the RMAN job is executing:

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*100,2) "% COMPLETE"
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%'
AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK;
-----------------------------------

Thanks
Ezhil
1 REPLY
Yogeeraj_1
Honored Contributor

Re: How to know how much work done for a session

hi,

To monitor the progress of backups, copies, and restores, you can query the view V$SESSION_LONGOPS.

The query should work fine.

To determine which events are being waited for, you can query V$SESSION_WAIT.
e.g.
SELECT sid, seconds_in_wait AS sec_wait, event FROM v$session_wait
WHERE wait_time = 0
ORDER BY sid;

If you want to tune performance, see: http://download-east.oracle.com/docs/cd/A81042_01/DOC/server.816/a76992/toc.htm

hope this helps!
regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)