RMAN Backup Fails Because of Control File Enqueue: Diagnosis
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:
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 obtains the enqueue.
RMAN 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:
•After you see the first message stating "RMAN-08512: waiting for snapshot controlfile enqueue", start a new SQL*Plus session on the target database: $sqlplus
'SYS/passwd@db_name AS SYSDBA'
•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
--- ---- -------------------- ------------------------- ---------------- ---------
785 SYS
rman@exad (TNS V1-V3) backup full datafile: ch5 0000007 STARTED 24-OCT-16
Backup Fails Because of Control File Enqueue: 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 after the job creating the enqueue completes
- Cancel the job creating the enqueue
Commonly, enqueue situations occur when a job is writing to a tape drive, but the tape drive is waiting for a new cassette to be inserted. If you start a new job in this situation, then you will probably receive the enqueue message because the first job cannot complete until the new tape is loaded.
Reference :
https://docs.oracle.com/cd/B10501_01/server.920/a96566/rcmtroub.htm