duplicate target database for standby;Starting Duplicate Db at 09-JUN-15allocated channel: ORA_AUX_DISK_1c..."/>
溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

處理 Dataguard 與 rman RMAN-05501

發(fā)布時(shí)間:2020-07-16 15:02:09 來(lái)源:網(wǎng)絡(luò) 閱讀:762 作者:wangluochongzi 欄目:關(guān)系型數(shù)據(jù)庫(kù)

Dataguard 備庫(kù)恢復(fù)時(shí)報(bào)rman-05501


RMAN>  duplicate target database for standby;


Starting Duplicate Db at 09-JUN-15

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=345 device type=DISK


contents of Memory Script:

{

   restore clone standby controlfile;

}

executing Memory Script


Starting restore at 09-JUN-15

using channel ORA_AUX_DISK_1


channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: copied control file copy

input file name=/u01/oradata_backup/full_backup/db.ctl

output file name=/opt/oracle/database/oradata/db/control01.ctl

output file name=/opt/oracle/database/fast_recovery_area/db/control02.ctl

Finished restore at 09-JUN-15


contents of Memory Script:

{

   sql clone 'alter database mount standby database';

}

executing Memory Script


sql statement: alter database mount standby database

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

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

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

RMAN-03002: failure of Duplicate Db command at 06/09/2015 16:54:16

RMAN-05501: aborting duplication of target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f18.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f17.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f16.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f15.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f14.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f13.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f12.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f11.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f10.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f09.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f08.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f07.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f06.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f05.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f04.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/warehouse_f05.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/warehouse_f04.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/warehouse_f03.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/warehouse_f02.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/warehouse_f01.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f03.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f02.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/adv_ts_main_f01.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/users01.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/undotbs01.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/sysaux01.dbf conflicts with a file used by the target database

RMAN-05001: auxiliary file name /opt/oracle/database/oradata/db/system01.dbf conflicts with a file used by the target database


原因:

主庫(kù)和備庫(kù)的datafile目錄一樣,且在初始化參數(shù)中沒(méi)有添加 *.db_file_name_convert和*.log_file_name_convert兩個(gè)參數(shù)。所以在這里duplicate 時(shí)需要加上 nofilenamecheck;


SQL> shutdown immediate;

ORA-01109: database not open



Database dismounted.

ORACLE instance shut down.


SQL> startup pfile='/u01/oradata_backup/standby.pfile' nomount;

ORACLE instance started.


Total System Global Area 3.1935E+10 bytes

Fixed Size                  2268992 bytes

Variable Size            2.8119E+10 bytes

Database Buffers         3758096384 bytes

Redo Buffers               55840768 bytes

SQL> create spfile='/opt/oracle/database/product/11.2.0/db_1/dbs/initdkhlstd.ora' from pfile='/u01/oradata_backup/standby.pfile';


File created.


[oracle@wx ~]$ rman target sys/dk2014_oracle@db  auxiliary /


Recovery Manager: Release 11.2.0.4.0 - Production on Tue Jun 9 17:03:10 2015


Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.


connected to target database: db (DBID=4232991297)

connected to auxiliary database: db (not mounted)


RMAN>  duplicate target database for standby nofilenamecheck;


Starting Duplicate Db at 09-JUN-15

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=296 device type=DISK


contents of Memory Script:

{

   restore clone standby controlfile;

}

executing Memory Script


Starting restore at 09-JUN-15

using channel ORA_AUX_DISK_1


channel ORA_AUX_DISK_1: restoring control file

channel ORA_AUX_DISK_1: copied control file copy

input file name=/u01/oradata_backup/full_backup/db.ctl

output file name=/opt/oracle/database/oradata/db/control01.ctl

output file name=/opt/oracle/database/fast_recovery_area/db/control02.ctl

Finished restore at 09-JUN-15


contents of Memory Script:

{

   sql clone 'alter database mount standby database';

}

executing Memory Script


sql statement: alter database mount standby database


contents of Memory Script:

{

   set newname for tempfile  1 to 

 "/opt/oracle/database/oradata/db/temp01.dbf";

   switch clone tempfile all;

   set newname for datafile  1 to 

 "/opt/oracle/database/oradata/db/system01.dbf";

   set newname for datafile  2 to 

 "/opt/oracle/database/oradata/db/sysaux01.dbf";

   set newname for datafile  3 to 

 "/opt/oracle/database/oradata/db/undotbs01.dbf";

   set newname for datafile  4 to 

 "/opt/oracle/database/oradata/db/users01.dbf";

   set newname for datafile  5 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f01.dbf";

   set newname for datafile  6 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f02.dbf";

   set newname for datafile  7 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f03.dbf";

   set newname for datafile  8 to 

 "/opt/oracle/database/oradata/db/warehouse_f01.dbf";

   set newname for datafile  9 to 

 "/opt/oracle/database/oradata/db/warehouse_f02.dbf";

   set newname for datafile  10 to 

 "/opt/oracle/database/oradata/db/warehouse_f03.dbf";

   set newname for datafile  11 to 

 "/opt/oracle/database/oradata/db/warehouse_f04.dbf";

   set newname for datafile  12 to 

 "/opt/oracle/database/oradata/db/warehouse_f05.dbf";

   set newname for datafile  13 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f04.dbf";

   set newname for datafile  14 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f05.dbf";

   set newname for datafile  15 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f06.dbf";

   set newname for datafile  16 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f07.dbf";

   set newname for datafile  17 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f08.dbf";

   set newname for datafile  18 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f09.dbf";

   set newname for datafile  19 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f10.dbf";

   set newname for datafile  20 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f11.dbf";

   set newname for datafile  21 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f12.dbf";

   set newname for datafile  22 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f13.dbf";

   set newname for datafile  23 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f14.dbf";

   set newname for datafile  24 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f15.dbf";

   set newname for datafile  25 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f16.dbf";

   set newname for datafile  26 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f17.dbf";

   set newname for datafile  27 to 

 "/opt/oracle/database/oradata/db/adv_ts_main_f18.dbf";

   restore

   clone database

   ;

}


executing Memory Script


......

RMAN> 


RMAN> exit



Recovery Manager complete.


向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI