RMAN-05535 AND ORA-00312
在通過duplicate 命令建立physical standby庫時,遇到這個問題:
[[email protected] dbs]$ rman target / auxiliary sys/[email protected]
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Sep 4 01:20:10 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: PROD (DBID=237046118)
connected to auxiliary database: PROD (not mounted)
RMAN> duplicate target database
2> for standby
3> from active database
4> DORECOVER nofilenamecheck
5> spfile
6> set db_unique_name='prodx'
7> set log_archive_dest_1='location=/arch142 VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=prodx'
8> set log_archive_dest_2='SERVICE=prodb ASYNC LGWR VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=prodb'
9> set standby_file_management='AUTO'
10> set fal_server='prodb'
11> set fal_client='prodx'
12> set control_files='/oradata/prod/control01.ctl'
13> set memory_target='0'
14> set sga_target='600M';
Starting Duplicate Db at 04-SEP-13
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=10 device type=DISK
..........................省略部分..............................
starting media recovery
archived log for thread 1 with sequence 7 is already on disk as file /arch142/arch_825207784_1_7.arc
archived log for thread 1 with sequence 8 is already on disk as file /arch142/arch_825207784_1_8.arc
archived log file name=/arch142/arch_825207784_1_7.arc thread=1 sequence=7
archived log file name=/arch142/arch_825207784_1_8.arc thread=1 sequence=8
media recovery complete, elapsed time: 00:00:00
Finished recover at 04-SEP-13
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 1 thread 1: '/oradata/prod/redo01.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 2 thread 1: '/oradata/prod/redo02.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 3 thread 1: '/oradata/prod/redo03.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 4 thread 0: '/oradata/prod/std_redo04.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 5 thread 0: '/oradata/prod/std_redo05.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 6 thread 0: '/oradata/prod/std_redo06.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
ORACLE error from auxiliary database: ORA-19527: physical standby redo log must be renamed
ORA-00312: online log 7 thread 0: '/oradata/prod/std_redo07.log'
RMAN-05535: WARNING: All redo log files were not defined properly.
Finished Duplicate Db at 04-SEP-13
起初我認為2端的目錄是完全一樣的,不用加log_file_name_convert引數進行轉換制定,查詢文件後發現,即使2端的檔名和目錄是一致的,也需要加上log_file_name_convert引數,即:加上:
log_file_name_convert='/oradata/prod','/oradata/prod'
修改後的duplicate命令見下:
duplicate target database
for standby
from active database
DORECOVER nofilenamecheck
spfile
set db_unique_name='prodx'
set log_archive_dest_1='location=/arch142 VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=prodx'
set log_archive_dest_2='SERVICE=prodb ASYNC LGWR VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=prodb'
set standby_file_management='AUTO'
set fal_server='prodb'
set fal_client='prodx'
set control_files='/oradata/prod/control01.ctl'
set log_file_name_convert='/oradata/prod','/oradata/prod'
set memory_target='0'
set sga_target='600M';