RMAN-05501 RMAN-05001_MySQL, Oracle及数据库讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MySQL, Oracle及数据库讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2502 | 回复: 0   主题: RMAN-05501 RMAN-05001        下一篇 
white
注册用户
等级:少校
经验:1327
发帖:305
精华:0
注册:2011-7-21
状态:离线
发送短消息息给white 加好友    发送短消息息给white 发消息
发表于: IP:您无权察看 2015-5-20 14:32:52 | [全部帖] [楼主帖] 楼主

错误信息:

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


--转自 北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论