check if rman restore is in progress

Hello,

How can I check if rman is in progress :
SQL> 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;
  2    3    4    5
no rows selected

But the following query returns the same result since several minutes :
SQL> col OPNAME for a30
select OPNAME,SOFAR/TOTALWORK*100 PCT, trunc(TIME_REMAINING/60) MIN_RESTANTES,
trunc(ELAPSED_SECONDS/60) MIN_ATEAGORA
from v$session_longops where TOTALWORK>0 and OPNAME like '%RMAN%';SQL>   2    3

OPNAME                                PCT MIN_RESTANTES MIN_ATEAGORA
------------------------------ ---------- ------------- ------------
RMAN: full datafile restore           100             0            1
RMAN: full datafile restore           100             0           84
RMAN: aggregate input                 100             0            0
RMAN: aggregate input                 100             0          113
RMAN: full datafile restore           100             0           92
RMAN: full datafile restore           100             0           94
RMAN: full datafile restore           100             0           93
RMAN: full datafile restore           100             0           81
RMAN: full datafile restore           100             0           30

9 rows selected.

Thanks

Regards
bibi92Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
I don't understand the question.  It looks like the script you have is the common way to check the progress of RMAN.
bibi92Author Commented:
Yes, but I think the result indicates rman hangs. or it is not active. Is it exact? thanks
slightwv (䄆 Netminder) Commented:
Good question.  I've never tried to check on a restore nor have I regularly queried V$SESSION_LONGOPS.

Based on what is on the web, it appears that there is 0 time remaining but it might no cover some operations that RMAN is doing outside of the database to finish up the restore.

Depending on the type of restore, users other than RMAN might be doing things like some index rebuilds, etc...

As long as there is CPU being used and disk IO happening I would guess RMAN is still doing some recovery.

If everything is nice and quiet then I'm not sure where to look but I would make sure before I assume a HANG and start killing things...  I'm just not sure how to make sure...

Hopefully an RMAN Expert will show up later.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.