System Environment:
Operating System: AIX 5300-08
Oracle: Oracle 10.2.0.1.0
Error:
RMAN> restore datafile 4;
Starting restore at 20-MAY-14
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: sid = 139 devtype = DISK
Channel ORA_DISK_1: starting datafile backupset restore
Channel ORA_DISK_1: specifying datafile (s) to restore from backup set
Restoring datafile 00004 to/u01/app/oracle/oradata/prod/users01.dbf
Channel ORA_DISK_1: reading from backup piece/backup/inc0_PROD_2qp8omr6_1_1
RMAN-00571: ========================================================== ==============================
RMAN-00569: ==================== error message stack follows ==========================
RMAN-00571: ========================================================== ==============================
RMAN-03002: failure of restore command at 05/20/2014 12:19:41
ORA-19870: error reading backup piece/backup/inc0_PROD_2qp8omr6_1_1
ORA-19573: cannot obtain exclusive enqueue for datafile 4
I always thought that there was a backup problem and the backup data file was not found!
It turns out that the DataBase is under open, and you forgot to offline the datafile, causing this low-level error. After offline the data file, the problem is solved!
-------------------------------------- Split line --------------------------------------
Recommended reading:
RMAN: Configure an archive log deletion policy
Basic Oracle tutorial-copying a database through RMAN
Reference for RMAN backup policy formulation
RMAN backup learning notes
Oracle Database Backup encryption RMAN Encryption
-------------------------------------- Split line --------------------------------------