RMAN controlled tablespace or Whole Database restores will fail when the database is open. This can also occur if the database is open during restore of a control file from a manual backup, but only when not using recovery catalog.
Symptoms:
The error messages displayed in the backup job will be similar to the following:
channel nvrch1: reading from backup piece HOSTNAME:#PIECE NUMBER:HOSTNAME:PIECE IDENTIFIER:BACKUP IDENTIFIER...
released channel: nvrch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at MM/DD/YYYY HH:MM:SS
ORA-27192: skgfcls: sbtclose2 returned error - failed to close file
ORA-19511: Error received from media manager layer, error text:
An error happened during job.
ORA-19870: error reading backup piece HOSTNAME:#PIECE NUMBER:HOSTNAME:PIECE IDENTIFIER:BACKUP IDENTIFIER...
ORA-19573: cannot obtain exclusive enqueue for datafile 1
Recovery Manager complete.
The database must be in a mount state to perform RMAN controlled restores of Whole Database, individual tablespaces, or control files when not using recovery catalog.
To bring the database to mount state, you must first shut it down, then startup the database to mount state, but not open.
There are a number of ways to perform this operation through SQLPLUS, RMAN or the Database Control GUI. Please refer to Oracle’s database and RMAN documentation for instructions for your environment.