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-------------------

 

 

 

 

           

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值