ORA-19573&rman restore失敗

season0891發表於2013-02-20

ORA-19573: cannot obtain string enqueue for datafile string
Cause: 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 - in this case, the file must be offline or the database must be closed.
 If the type is 'read-only', then you are attempting to back up or copy this file while the database is in NOARCHIVELOG mode.
Action: 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.

RMAN> restore
2> tablespace users;

Starting restore at 28-JAN-10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /tpdata/database/oradata/test/users01.dbf
channel ORA_DISK_1: reading from backup piece /tpdata/TEST_13.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/28/2010 06:25:09
ORA-19870: error reading backup piece /tpdata/TEST_13.dbf
ORA-19573: cannot obtain exclusive enqueue for datafile 4

RMAN>


由於:
the file must be offline or the database must be closed.
然後:
shutdown immediate;
並且startup forcee mount;


RMAN> restore tablespace users;

recover tablespace users;

Starting restore at 28-JAN-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=154 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=153 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 /tpdata/database/oradata/test/users01.dbf
channel ORA_DISK_1: reading from backup piece /tpdata/TEST_13.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/tpdata/TEST_13.dbf tag=TAG20100128T051957
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
Finished restore at 28-JAN-10

RMAN>
Starting recover at 28-JAN-10
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting incremental datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00004: /tpdata/database/oradata/test/users01.dbf
channel ORA_DISK_1: reading from backup piece /tpdata/TEST_17.dbf
channel ORA_DISK_1: restored backup piece 1
piece handle=/tpdata/TEST_17.dbf tag=TAG20100128T052116
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

starting media recovery
media recovery complete, elapsed time: 00:00:02

Finished recover at 28-JAN-10

RMAN>
RMAN>

最後alter database open;

或者:
run {
startup force mount;
restore tablespace users;
recover tablespace users;
sql 'alter database open';
}


如果是資料檔案介質失敗,非system表空間的資料檔案,可以直接在open狀態下restore和recover
例子:

run {
sql 'alter database datafile 4 offline';
restore datafile 4;
recover datafile 4;
sql 'alter database datafile 4 online';
}

 come from: http://space.itpub.net/16179598/viewspace-626174

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-754386/,如需轉載,請註明出處,否則將追究法律責任。

相關文章