Affected NV Version: All
OS Version: All
Plugin version: All
Oracle RMAN Restore Fails with error code
Error :: ORA-19573: cannot obtain exclusive enqueue for datafile 4
Enqueues are shared memory structures (locks) that serialize access to database resources. They can be associated with a session or transaction. Enqueue names are displayed in the LOCK_TYPE column of the DBA_LOCK and DBA_LOCK_INTERNAL data dictionary views.
A resource uniquely identifies an object that can be locked by different sessions within an instance (local resource) or between instances (global resource). Each session that tries to lock the resource will have an enqueue on the resource.
There are more then 40 Oracle enqueues:
In the error Error :: ORA-19573: We are concerned with the File Access Enqueue.
The file access enqueue could not be obtained for a file specified in a backup, copy or restore operation.
If the enqueue type shown is 'shared', then the file is the input file for a backup or copy.
If the type is 'exclusive', then the file is the output file for a datafile copy or restore which is attempting to overwrite the currently active version of that file.
If the type is 'read-only', then you are attempting to back up or copy this database while the database is in NOARCHIVELOG mode.
Wait until the conflicting operation is complete, then retry the copy or backup.
If the database is in NOARCHIVELOG mode, then all files being backed up must be closed cleanly.
The log for a restore job contains the following errors-
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-03002: failure of restore command at 01/23
In the example above "ORA-19573: cannot obtain exclusive enqueue for datafile 4", NetVault Restore Job was trying to restore a database overwriting an ONLINE DATABASE.
To accomplish that, the database must be offline or the database must be closed.
Another solution is to either Rename or Relocate the database by right clicking the database selecting Rename, and then giving a different name or location to the database in the Restore frame.