日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Oracle技术之ASM上恢复STANDBY数据库出现ORA-15173错误

發布時間:2025/3/15 数据库 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Oracle技术之ASM上恢复STANDBY数据库出现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

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



oracle視頻教程請關注:http://u.youku.com/user_video/id_UMzAzMjkxMjE2.html

轉載于:https://blog.51cto.com/19880614/1239173

總結

以上是生活随笔為你收集整理的Oracle技术之ASM上恢复STANDBY数据库出现ORA-15173错误的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。