ORA-19573&rman restore失败

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';
}

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16179598/viewspace-626174/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/16179598/viewspace-626174/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值