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

尛樣兒發表於2013-04-09

        在11gR1和11gR2的資料庫使用RMAN執行duplicate ... from active database操作時遇到類似如下的錯誤:
Starting backup at 2013-01-22 20:19:41
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA1/ractest/datafile/system.256.769378761
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/22/2013 20:19:58
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=00002 name=+DATA1/ractest/datafile/sysaux.257.769378769
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/22/2013 20:20:00
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=+DATA1/ractest/datafile/undotbs1.258.769378771
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/22/2013 20:20:02
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=+DATA1/ractest/datafile/undotbs2.264.769379825
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 01/22/2013 20:20:10
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=+DATA1/ractest/datafile/users.259.769378773

請參考以下兩篇METALINK文章:


ORA-17628, ORA-19505 during RMAN DUPLICATE FROM ACTIVE [ID 1331986.1]
修改時間:2012-6-1型別:PROBLEM狀態:PUBLISHED優先順序:3

In this Document

Symptoms
Changes
Cause
Solution
References

Applies to:

Oracle Server - Enterprise Edition - Version 11.1.0.7 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 datafile  is not using OMF name while the rest of the datafiles are using OMF name.

Cause


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

Development confirmed that this behaviour 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 datafile that has an alias is not using an OMF name, so a new OMF name is not created for it and the filename is unchanged. 

The parameter "parameter_value_convert"  changes the string  from 'xxx' to 'yyy' in other  initialization parameters, but not in the datafile names.  If the names of the datafiles 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 datafile 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


另一篇文章是:

Duplicate from Active Database Failing with: RMAN-03009, ORA-17628, and ORA-19505 [ID 1439632.1]
修改時間:2012-3-23型別:PROBLEM狀態:MODERATED優先順序:3

In this Document
  Symptoms
  Cause
  Solution


This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

Applies to:

Oracle Server - Enterprise Edition - Version: 11.1.0.7 and later   [Release: 11.1 and later ]
Information in this document applies to any platform.

Symptoms

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 '/db_scb/oracle/product/11.1.0/db_1/dbs/orapwautobk' auxiliary format
'/db_scp/oracle/product/11.1.0/db_1/dbs/orapwautopr' ;
}
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 '/ora1_scp/oradata/autopr/control01.ctl';
restore clone controlfile to '/ora1_scp/oradata/autopr/control02.ctl' from
'/ora1_scp/oradata/autopr/control01.ctl';
restore clone controlfile to '/ora1_scp/oradata/autopr/control03.ctl' from
'/ora1_scp/oradata/autopr/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=/db_scb/oracle/product/11.1.0/db_1/dbs/snapcf_autobk.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
"/ora1_scp/oradata/autopr/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/ora1_scp/oradata/autopr/system01.dbf";
set newname for datafile 2 to
"/ora1_scp/oradata/autopr/sysaux01.dbf";
set newname for datafile 3 to
"/ora1_scp/oradata/autopr/undotbs01.dbf";
set newname for datafile 4 to
"/ora1_scp/oradata/autopr/users01.dbf";
set newname for datafile 5 to
"/ora1_scp/oradata/autopr/mdb_DATA.dbf";
set newname for datafile 6 to
"/ora1_scp/oradata/autopr/mdb_INDEX.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/ora1_scp/oradata/autopr/system01.dbf" datafile
2 auxiliary format
"/ora1_scp/oradata/autopr/sysaux01.dbf" datafile
3 auxiliary format
"/ora1_scp/oradata/autopr/undotbs01.dbf" datafile
4 auxiliary format
"/ora1_scp/oradata/autopr/users01.dbf" datafile
5 auxiliary format
"/ora1_scp/oradata/autopr/mdb_DATA.dbf" datafile
6 auxiliary format
"/ora1_scp/oradata/autopr/mdb_INDEX.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /ora1_scp/oradata/autopr/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=/ora1_scb/oradata/autobk/system01.dbf
output file name=/ora1_scp/oradata/autopr/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=/ora1_scb/oradata/autobk/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=/ora1_scb/oradata/autobk/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=/ora1_scb/oradata/autobk/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=/ora1_scb/oradata/autobk/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=/ora1_scb/oradata/autobk/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 /ora1_scp/oradata/autopr on the standby already exist from previous database in this case.



Solution

Make sure you dont 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 /ora1_scp/oradata/autopr

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-757998/,如需轉載,請註明出處,否則將追究法律責任。

相關文章