RMAN-05501 RMAN-05001

                author:skate
time:2011/10/28

错误信息:
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/tbs_statspack01.dbf conflicts with a file used by the target database


在用rman duplicate创建dg的时候,抛出如上的错误,这里只列出用rman dumplicate的过程,具体操作步骤如下:

[oracle@localhost ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.2.0 Production on Wed Oct 26 15:34:14 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup nomount pfile='/tmp/initskatedb.ora'
ORACLE instance started.

Total System Global Area 6.9482E+10 bytes
Fixed Size                  2233496 bytes
Variable Size            2.0670E+10 bytes
Database Buffers         4.8587E+10 bytes
Redo Buffers              223047680 bytes
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

用rman连接主备库
[oracle@localhost ~]$ rman target sys/pwd@link_pri auxiliary /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Oct 26 15:35:01 2011

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

connected to target database: skateDB (DBID=2759536080)
connected to auxiliary database: skateDB (not mounted)

RMAN>  duplicate target database for standby;

Starting Duplicate Db at 26-OCT-11
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=290 device type=DISK

contents of Memory Script:
{
   restore clone standby controlfile;
}
executing Memory Script

Starting restore at 26-OCT-11
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=/oracle/rman/control01.ctl
output file name=/oracle/oradata/skatedb/control01.ctl
output file name=/oracle/oradata/skatedb/control02.ctl
Finished restore at 26-OCT-11

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 10/26/2011 15:36:30
RMAN-05501: aborting duplication of target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/tbs_statspack01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS12.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS11.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS10.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateINDEXES03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateINDEXES04.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateINDEXES02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/UNDOTBS02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateINDEXES01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS09.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS08.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS07.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS06.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS05.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS04.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS03.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS02.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/skateDATAS01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/users01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/undotbs01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/sysaux01.dbf conflicts with a file used by the target database
RMAN-05001: auxiliary file name /oracle/oradata/skatedb/system01.dbf conflicts with a file used by the target database

RMAN> quit


Recovery Manager complete.
[oracle@localhost ~]$

从上面的错误信息可以看到,是因为新创建备库的数据库文件路径名称和主库一样,oracle为了避免错误的覆盖,所以才抛出这样的错误,
只要我们确认这个操作即可。


[oracle@localhost ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.2.0 Production on Wed Oct 26 15:34:14 2011

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup nomount pfile='/tmp/initskatedb.ora'
ORACLE instance started.

Total System Global Area 6.9482E+10 bytes
Fixed Size                  2233496 bytes
Variable Size            2.0670E+10 bytes
Database Buffers         4.8587E+10 bytes
Redo Buffers              223047680 bytes
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost ~]$ rman target sys/pwd@link_pri auxiliary /

Recovery Manager: Release 11.2.0.2.0 - Production on Wed Oct 26 15:35:01 2011

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

connected to target database: skateDB (DBID=2759536080)
connected to auxiliary database: skateDB (not mounted)

然后执行如下即可成功,不做数据库文件的名称正确性检查
RMAN> duplicate target database for standby nofilenamecheck;

还可以修改如下两个参数也可以执行成功:
alter system set log_file_name_convert=('/oracle/oradata/skatedb', '/oracle/oradata/skatedb') scope=both
alter system set db_file_name_convert=('/oracle/oradata/skatedb', '/oracle/oradata/skatedb') scope=both
 

 
 -----------------------end-------------------

           

猜你喜欢

转载自blog.csdn.net/qq_44906603/article/details/89668270
今日推荐