建立STANDBY数据库时在ASM上恢复主库的数据文件出现ORA-15173错误

建立STANDBY数据库时,在ASM上恢复主库的数据文件出现了ORA-15173错误。

主库和备库都是单实例数据库,不过都使用ASM作为存储方式。

在备库上利用主库的备份进行restore database操作,碰到了这个错误:

[oracle@localhost data]$ rman target /

Recovery Manager: Release 10.2.0.3.0 - Production on Sat Feb 12 14:43:29 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: MOBILEDB (DBID=3009911466, not open)

RMAN> restore database;

Starting restore at 12-FEB-11

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: sid=1086 devtype=DISK

file 22 is excluded from whole database backup

file 25 is excluded from whole database backup

file 28 is excluded from whole database backup

file 30 is excluded from whole database backup

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to +ORADG/mobiledb/datafile/system.260.649168943

restoring datafile 00002 to +ORADG/mobiledb/datafile/undotbs1.261.649168949

restoring datafile 00003 to +ORADG/mobiledb/datafile/sysaux.262.649168951

restoring datafile 00004 to +ORADG/mobiledb/datafile/users.264.649168953

restoring datafile 00005 to +ORAG2/mobiledb/datafile/club_stat.dbf

restoring datafile 00006 to +ORAG2/mobiledb/datafile/club_statindx.dbf

.

.

.

restoring datafile 00068 to +ORADG/mobiledb/datafile/users.328.652899937

channel ORA_DISK_1: reading from backup piece /rman_backup/data/df_MOBILEDB_5042_1_1

ORA-19870: error reading backup piece /rman_backup/data/df_MOBILEDB_5042_1_1

ORA-19504: failed to create file "+ORAG2/mobiledb/datafile/club_stat.dbf"

ORA-17502: ksfdcre:4 Failed to create file +ORAG2/mobiledb/datafile/club_stat.dbf

ORA-15173: entry 'mobiledb' does not exist in directory '/'

failover to previous backup

creating datafile fno=1 name=+ORADG/mobiledb/datafile/system.260.649168943

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 02/12/2011 14:50:44

ORA-01180: can not create datafile 1

ORA-01110: data file 1: '+ORADG/mobiledb/datafile/system.260.649168943'

导致这个错误的原因是RESTORE操作不会自动创建非数据库所属的目录,虽然根据控制文件中存储的位置,控制文件应该恢复到mobiledb目录中,但是由于standby数据库和primary数据库的db_unique_name并不相同,因此实际RESTORE之后,数据文件会放在standby数据库db_unique_name对应的名称MOBILEDB_N目录下,对于MOBILEDB_N目录以及其下的DATAFILE、ONLINELOG等目录,RESTORE操作会自动创建,但是mobiledb及其下的目录,RESTORE并不会自动创建,即使这个目录并不会写入内容。

解决方法也很简单,只需要通过asmcmd手工创建对应的目录结构即可:

[oracle@localhost ~]$ export ORACLE_SID=+ASM

[oracle@localhost ~]$ asmcmd

ASMCMD> cd +oradg

ASMCMD> mkdir mobiledb

ASMCMD> cd mobiledb

ASMCMD> mkdir datafile

ASMCMD> ls

datafile/

ASMCMD> cd ..

ASMCMD> ls

MOBILEDB_N/

mobiledb/

ASMCMD> cd +orag2

ASMCMD> mkdir mobiledb

ASMCMD> cd mobiledb

ASMCMD> mkdir datafile

ASMCMD> exit

再次运行RESTORE DATABASE命令,问题解决。

RMAN> restore database;

Starting restore at 12-FEB-11

using channel ORA_DISK_1

file 22 is excluded from whole database backup

file 25 is excluded from whole database backup

file 28 is excluded from whole database backup

file 30 is excluded from whole database backup

本文URL:http://www.bianceng.cn/database/Oracle/201410/45637.htm

channel ORA_DISK_1: starting datafile backupset restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

restoring datafile 00001 to +ORADG/mobiledb/datafile/system.260.649168943

restoring datafile 00002 to +ORADG/mobiledb/datafile/undotbs1.261.649168949

restoring datafile 00003 to +ORADG/mobiledb/datafile/sysaux.262.649168951

restoring datafile 00004 to +ORADG/mobiledb/datafile/users.264.649168953

restoring datafile 00005 to +ORAG2/mobiledb/datafile/club_stat.dbf

restoring datafile 00006 to +ORAG2/mobiledb/datafile/club_statindx.dbf

.

.

.

restoring datafile 00068 to +ORADG/mobiledb/datafile/users.328.652899937

channel ORA_DISK_1: reading from backup piece /rman_backup/data/df_MOBILEDB_5042_1_1

channel ORA_DISK_1: restored backup piece 1

piece handle=/rman_backup/data/df_MOBILEDB_5042_1_1 tag=TAG20110212T113309

channel ORA_DISK_1: restore complete, elapsed time: 01:28:47

failover to previous backup

Finished restore at 12-FEB-11

时间: 2024-07-31 11:50:34

建立STANDBY数据库时在ASM上恢复主库的数据文件出现ORA-15173错误的相关文章

oracel数据库Solaris rm datafile recovery—利用句柄误删除数据文件恢复

今天早上接到有客户恢复请求,他一不小心在solaris系统中使用rm -rf oradata命令把一个分区下面的所有数据文件全部删除了.现在不知道怎么办,请求我们给予支持.上去检查发现比较幸运,数据库没有crash,看来直接考虑使用句柄进行恢复 root@CNISORCLSVR # uname -a SunOS CNISORCLSVR 5.9 Generic_112233-08 sun4u sparc SUNW,Sun-Fire-880 root@CNISORCLSVR # ps -ef|gre

linux oracle rac expdp导出数据库,在节点1执行导出但是数据文件保存在了节点2上

问题描述 linux oracle rac expdp导出数据库,在节点1执行导出但是数据文件保存在了节点2上 linux oracle rac expdp导出数据库,在节点1(机器1)执行导出,数据文件保存在了节点2(机器2)上,怎么指定导出到哪个节点(哪台机器)的目录下?或者让两个节点的目录下都有导出的数据文件.

在open状态下恢复丢失的数据文件

    在open状态下恢复丢失的数据文件,这个实验比较简单,要注意数据库必须1)数据库必须是归档状态2)数据库在数据文件丢失前做过全备份 .次实验模拟test.dbf 意外丢失. 一 实验前的准备.建立一个名为yang的表,插入数据,并提交.归档日志. SQL> conn system/yang as sysdba已连接.SQL> create table yang (num number) tablespace test; 表已创建. SQL> insert into yang va

asm和file system之间数据文件的转换

How to move a datafile from a file system to ASM Moving a datafile from the file system can be achived in two ways. i. While the database is shutdown (in mount stage). ii. While the database is running (with the selected tablespace offline). (数据文件实现文

Oracle中如何设置EXCLUDE后STANDBY数据库只读表空间的恢复

在STANDBY数据库利用RMAN恢复主库上EXCLUDE的只读表空间,碰到了问题. 数据库恢复完成,但是恢复被主库EXCLUDE的只读表空间时,发现无法进行恢复: RMAN> restore tablespace clubstat2_bak; Starting restore at 14-FEB-11 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=1094 devtype=DISK file 22 is excluded from

如何恢复只有完好数据文件的oracle数据库

1.重新创建初始化文件,重要的参数包括 control_files,db_name,instance_name,background_dump_dest,core_dump_dest,user_dump_dest,\db_block_size=8192,db_cache_size,db_domain,large_pool_size,pga_aggregate_target,shared_pool_size,sort_area_size,undo_management,undo_retention

在mount状态下恢复数据文件system表空间

数据字典(包含数据库本身以及存储的所有对象的基本信息)存放在SYSTEM表空间中.当数据库处于open状态时,如果system表空间所对应的数据文件出现介质失败,当在其数据文件上进行IO时操作时,数据库会自己关闭:当数据库处于关闭状态时,如果system表空间所对应的数据文件出现介质失败,数据库将不能打开.打开时会出现如下错误: ORA-01157: 无法标识/锁定数据文件 1 - 请参阅 DBWR 跟踪文件ORA-01110: 数据文件 1: 'F:\APP\YANG\ORADATA\ORAC

页面上动态添加一行数据,如何下次在进入页面时,展示出我上次添加的数据(注意:不用数据库)

问题描述 页面上动态添加一行数据,如何下次在进入页面时,展示出我上次添加的数据(注意:不用数据库) 我在页面上动态添加一行数据,保存之后,如何下次在进入页面时,展示出我上次添加的数据(注意:不用数据库) 解决方案 直接在页面上的value=""这里写你的测试值 解决方案二: 用一个ajax添加试试

手动建立 Oracle9i 数据库

oracle|数据|数据库 手动建立 Oracle9i 数据库(转载) (原文刊登于2002年03月Linuxer杂志)                             作者: 何致億, 美商甲骨文公司台湾分公司特约顾问   前几期我们分别探讨 Oracle9i 核心要素与数据库实体组成,相信大家对于 Oracle9i 数据库服务器已经具有一定程度的了解了.本期我将介绍手动建置 Oracle9i 数据库的步骤与相关注意事项.   本文内容将涵盖下列主题: n          建立数据库