When RMAN needs to back up or resynchronize from the control file, it first
creates a snapshot or consistent image of the control file. If one RMAN job is
already backing up the control file while another needs to create a new snapshot
control file, then you may see the following message:
RMAN-08512: waiting for snapshot controlfile enqueue
Under normal circumstances, a job that must wait for the control file enqueue
waits for a brief interval and then successfully retrieves the enqueue.
Recovery Manager makes up to five attempts to get the enqueue and then fails the
job. The conflict is usually caused when two jobs are both backing up the control
file, and the job that first starts backing up the control file waits for service
from the media manager.
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-10
To kill active session
Run
select vs.sid, vs.username, vs.osuser, vs.process fg_pid,
vp.spid bg_pid
from v$session vs, v$process vp
where vs.paddr = vp.addr
/
If you get something like:
SID USERNAME OSUSER FG_PID BG_PID
---- --------------- ---------- --------- ---------
10 JULIAN JULIAN 1965:6969 1234
run in unix as the oracle user
kill -9 1234
Комментариев нет:
Отправить комментарий