Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I cancel a rman job from command line?

jamie2teachApr 24 2009 — edited Apr 27 2009
Hello to all,

I am having some problems with a rman job that is running via OEM-GC. I get an error message regading the SPFILE and control file being locked due to another job accessing it. I found this in the RMAN ref guide:


To determine which job is holding the conflicting enqueue:

1. After you see the first RMAN-08512: waiting for snapshot controlfile enqueue message, start a new SQL*Plus session on the target database:

% sqlplus sys/sys_pwd@prod1

2. Execute the following query to determine which job is causing the wait:

SELECT s.sid, username AS "User", program, module, action, logon_time "Logon", l.*
FROM v$session s, v$enqueue_lock l
WHERE l.sid = s.sid and l.type = 'CF' AND l.id1 = 0 and l.id2 = 2;

You should see output similar to the following (the output in this example has been truncated):

SID User Program Module Action Logon
--- ---- -------------------- ------------------------- ---------------- ---------
9 SYS rman@h13 (TNS V1-V3) backup full datafile: c1 0000210 STARTED 21-JUN-99

Solution

After you have determined which job is creating the enqueue, you can do one of the following:

* Wait until the job creating the enqueue completes

* Cancel the current job and restart it once the job creating the enqueue completes

* Cancel the job creating the enqueue

So with this in mind; How do I cancel the job from RMAN command line!!!

This is my output by the way:

SID User PROGRAM MODULE ACTION Logon ADDR KADDR SID TY ID1 ID2 LMODE REQUEST CTIME BLOCK
475 SYS rman@gemsdb.darlington.infoserve.com (TNS V1-V3) backup full datafile 0000018 STARTED16 23-APR-09 00000023EB8D488 000000023EB8D4A8
475 CF 0 2 4 0 113123 0

Any help will be gratefully received

Thanks to all that reply
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2009
Added on Apr 24 2009
5 comments
3,969 views