Duplicate from Active Database Failing with: RMAN-03009, ORA-17628, and ORA-19505

Duplicate from Active Database Failing with: RMAN-03009, ORA-17628, and ORA-19505 (Doc ID 1439632.1)

搭建备库使用duplicate报错如题,查了MOS,有两个都是说这个问题的:
1. 数据有一部分是非OMF方式创建的,可以使用select tablespace_name,file_name from dba_data_files; 这个语句查看下数据文件的名字,参考MOS(Doc ID 1331986.1)

MOS上给出了两个解决方案:
(1) 使用参数DB_FILE_NAME_CONVERT并使用别名指定数据文件的完整位置;
(2)在备库的磁盘组中创建和原库一样的文件路径
 

2. 目录不存在或者存在的目录有相同的文件也会报如题的错误,参考MOS(Doc ID 1439632.1)

MOS上给出的解决方案:
删除目录中已经存在相同的文件

我的报错是目录不存在,创建个目录就好了
 

以下是MOS原文:

1. MOS原文:ORA-17628, ORA-19505 during RMAN DUPLICATE FROM ACTIVE (Doc ID 1331986.1)

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.7 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Symptoms


The following error is reported trying to create a Physical Standby database   using "duplicate from active database" :

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/16/2011 09:54:23
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on disk2 channel at 05/16/2011 09:54:23
ORA-17628: Oracle error 19505 returned by remote Oracle server

Changes

One data file  is not using OMF name while the rest of the data files are using OMF name.

Cause


This behavior was analyzed in Bug 12609412:  ORA-17628 ORA-19505 DURING DUPLICATE FROM ACTIVE

Development confirmed that this behavior is not a Bug and this is expected behavior.

The reason the duplicate of the database is failing is because there is no db_file_name_convert and the data file that has an alias is not using an OMF name, so a new OMF name is not created for it and the file name is unchanged.

The parameter "parameter_value_convert"  changes the string  from 'xxx' to 'yyy' in other  initialization parameters, but not in the data file names.  If the names of the data files are desired to be changed,  then  db_file_name_convert should be used

Solution


1. Use the parameter DB_FILE_NAME_CONVERT and specify the complete location of the data file using alias :

RMAN> .....

       SET DB_FILE_NAME_CONVERT='+DATA/xxx/datafile','+DATA/yyy/datafile/'

      .....


or
 
2. Create the directory "xxx" in the diskgroup where the image copy is being created by the auxiliary database.

References

BUG:12609412 - ORA-17628 ORA-19505 DURING DUPLICATE FROM ACTIVE

2. MOS原文:Duplicate from Active Database Failing with: RMAN-03009, ORA-17628, and ORA-19505 (Doc ID 1439632.1)

Applies to:
Oracle Database - Enterprise Edition - Version 11.1.0.7 and later
Information in this document applies to any platform.
Symptoms

NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.

For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:

Primary Database:
DB_NAME: PRIM

Standby Database:
DB_UNIQUE_NAME: STBY

*******************

Recreating the standby database.

RMAN duplicate from active database failing with errors when the files already exist on disk under the same path and file name where the restore is being run.

The following errors reported:

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/22/2012 09:44:43
ORA-17628: Oracle error 19505 returned by remote Oracle server

-From the RMAN Log:
 

RMAN>
Starting Duplicate Db at 22-MAR-12
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_SBT_TAPE_1
channel ORA_AUX_SBT_TAPE_1: SID=262 device type=SBT_TAPE
channel ORA_AUX_SBT_TAPE_1: Data Protection for Oracle: version 5.4.1.0
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=261 device type=DISK

contents of Memory Script:
{
backup as copy reuse
file '/<oracle_home path>/dbs/orapwPRIM' auxiliary format
'/<oracle_home path>/dbs/orapwSTBY' ;
}
executing Memory Script

Starting backup at 22-MAR-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=174 device type=DISK
Finished backup at 22-MAR-12

contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/oracle/oradata/STBY/control01.ctl';
restore clone controlfile to '/oracle/oradata/STBY/control02.ctl' from
'/oracle/oradata/STBY/control01.ctl';
restore clone controlfile to '/oracle/oradata/STBY/control03.ctl' from
'/oracle/oradata/STBY/control01.ctl';
sql clone 'alter database mount standby database';
}
executing Memory Script

Starting backup at 22-MAR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/<oracle_home path>/dbs/snapcf_PRIM.f tag=TAG20120322T094333 RECID=17 STAMP=778585413
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 22-MAR-12

Starting restore at 22-MAR-12
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: skipped, AUTOBACKUP already found
channel ORA_AUX_SBT_TAPE_1: copied control file copy
Finished restore at 22-MAR-12

Starting restore at 22-MAR-12
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: skipped, AUTOBACKUP already found
channel ORA_AUX_SBT_TAPE_1: copied control file copy
Finished restore at 22-MAR-12

sql statement: alter database mount standby database

contents of Memory Script:
{
set newname for tempfile 1 to
"/oracle/oradata/STBY/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/oracle/oradata/STBY/system01.dbf";
set newname for datafile 2 to
"/oracle/oradata/STBY/sysaux01.dbf";
set newname for datafile 3 to
"/oracle/oradata/STBY/undotbs01.dbf";
set newname for datafile 4 to
"/oracle/oradata/STBY/users01.dbf";
set newname for datafile 5 to
"/oracle/oradata/STBY/mdb_DATA.dbf";
set newname for datafile 6 to
"/oracle/oradata/STBY/mdb_INDEX.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/oracle/oradata/STBY/system01.dbf" datafile
2 auxiliary format
"/oracle/oradata/STBY/sysaux01.dbf" datafile
3 auxiliary format
"/oracle/oradata/STBY/undotbs01.dbf" datafile
4 auxiliary format
"/oracle/oradata/STBY/users01.dbf" datafile
5 auxiliary format
"/oracle/oradata/STBY/mdb_DATA.dbf" datafile
6 auxiliary format
"/oracle/oradata/STBY/mdb_INDEX.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /oracle/oradata/STBY/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 22-MAR-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=/oracle/oradata/PRIM/system01.dbf
output file name=/oracle/oradata/STBY/system01.dbf tag=TAG20120322T094356 RECID=0 STAMP=0
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/oracle/oradata/PRIM/sysaux01.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/22/2012 09:44:43
ORA-17628: Oracle error 19505 returned by remote Oracle server
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=/oracle/oradata/PRIM/undotbs01.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/22/2012 09:44:45
ORA-17628: Oracle error 19505 returned by remote Oracle server
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=/oracle/oradata/PRIM/mdb_DATA.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/22/2012 09:44:46
ORA-17628: Oracle error 19505 returned by remote Oracle server
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting datafile copy
input datafile file number=00006 name=/oracle/oradata/PRIM/mdb_INDEX.dbf
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/22/2012 09:44:47
ORA-17628: Oracle error 19505 returned by remote Oracle server
continuing other job steps, job failed will not be re-run
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=/oracle/oradata/PRIM/users01.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 03/22/2012 09:44:48
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 03/22/2012 09:44:48
ORA-17628: Oracle error 19505 returned by remote Oracle server

Cause

There was older copy of the database files under the same location where the duplicate is restoring. Files with the same name as well.

The datafiles under /oracle/oradata/STBY on the standby already exist from previous database in this case.


 

Solution

Make sure you don't have already existing files with the same name under the same path where you trying to create the new database.

Delete the old datafiles from previous database under the location where you trying to restore the database. In this case under /oracle/oradata/STBY

  • 8
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值