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

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

posted @   seasonzone  阅读(373)  评论(0编辑  收藏  举报
编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
点击右上角即可分享
微信分享提示