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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/90618/viewspace-754386/