Friday, December 19, 2014

error while setting up dataguard ORA-17628: Oracle error 19505 returned by remote Oracle server

[oracle@rac1 ~]$ 
[oracle@rac1 ~]$ rman target sys/***@rac auxiliary sys/***@rac_stby

Recovery Manager: Release 11.0.2.0 - Production

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

connected to target database: RAC (DBID=2454459401)
connected to auxiliary database: RAC (not mounted)

RMAN> DUPLICATE TARGET DATABASE
2> FOR STANDBY
3> FROM ACTIVE DATABASE
4> DORECOVER
5> SPFILE
6> set audit_file_dest='/u01/app/oracle/admin/rac_stby/adump' 
7> SET db_unique_name='RAC_STBY' COMMENT 'Is standby'
8> SET LOG_ARCHIVE_DEST_2='SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'
9> SET FAL_SERVER='RAC' COMMENT 'Is primary'
10> SET instance_number='1'
11> NOFILENAMECHECK;

Starting Duplicate Db at 19-DEC-14
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.0.2/db_1/dbs/orapwRAC2' auxiliary format 
 '/u01/app/oracle/product/11.0.2/db_1/dbs/orapwRAC_STBY1'   targetfile 
 '+DATA/rac/spfilerac.ora' auxiliary format 
 '/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora'   ;
   sql clone "alter system set spfile= ''/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora''";
}
executing Memory Script

Starting backup at 19-DEC-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=89 instance=RAC2 device type=DISK
Finished backup at 19-DEC-14

sql statement: alter system set spfile= ''/u01/app/oracle/product/11.0.2/db_1/dbs/spfileRAC_STBY1.ora''

contents of Memory Script:
{
   sql clone "alter system set  audit_file_dest = 
 ''/u01/app/oracle/admin/rac_stby/adump'' comment=
 '''' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''RAC_STBY'' comment=
 ''Is standby'' scope=spfile";
   sql clone "alter system set  LOG_ARCHIVE_DEST_2 = 
 ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment=
 '''' scope=spfile";
   sql clone "alter system set  FAL_SERVER = 
 ''RAC'' comment=
 ''Is primary'' scope=spfile";
   sql clone "alter system set  instance_number = 
 1 comment=
 '''' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  audit_file_dest =  ''/u01/app/oracle/admin/rac_stby/adump'' comment= '''' scope=spfile

sql statement: alter system set  db_unique_name =  ''RAC_STBY'' comment= ''Is standby'' scope=spfile

sql statement: alter system set  LOG_ARCHIVE_DEST_2 =  ''SERVICE=RAC ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=RAC'' comment= '''' scope=spfile

sql statement: alter system set  FAL_SERVER =  ''RAC'' comment= ''Is primary'' scope=spfile

sql statement: alter system set  instance_number =  1 comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1519898624 bytes

Fixed Size                     2253464 bytes
Variable Size                503319912 bytes
Database Buffers            1006632960 bytes
Redo Buffers                   7692288 bytes

contents of Memory Script:
{
   sql clone "alter system set  control_files = 
  ''+DATA/rac_stby/controlfile/current.264.866720455'' comment=
 ''Set by RMAN'' scope=spfile";
   backup as copy current controlfile for standby auxiliary format  '+DATA/rac_stby/controlfile/current.265.866720457';
   sql clone "alter system set  control_files = 
  ''+DATA/rac_stby/controlfile/current.265.866720457'' comment=
 ''Set by RMAN'' scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''+DATA/rac_stby/controlfile/current.264.866720455'' comment= ''Set by RMAN'' scope=spfile

Starting backup at 19-DEC-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.0.2/db_1/dbs/snapcf_RAC2.f tag=TAG20141219T114058 RECID=3 STAMP=866720462
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 19-DEC-14

sql statement: alter system set  control_files =   ''+DATA/rac_stby/controlfile/current.265.866720457'' comment= ''Set by RMAN'' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    1519898624 bytes

Fixed Size                     2253464 bytes
Variable Size                503319912 bytes
Database Buffers            1006632960 bytes
Redo Buffers                   7692288 bytes

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database
RMAN-05538: WARNING: implicitly using DB_FILE_NAME_CONVERT
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.
Using previous duplicated file +DATA/rac_stby/datafile/system.258.866718017 for datafile 1 with checkpoint SCN of 1984814
Using previous duplicated file +DATA/rac_stby/datafile/sysaux.259.866718099 for datafile 2 with checkpoint SCN of 1985693
Using previous duplicated file +DATA/rac_stby/datafile/undotbs1.261.866718223 for datafile 3 with checkpoint SCN of 1986178
Using previous duplicated file +DATA/rac_stby/datafile/users.263.866718257 for datafile 4 with checkpoint SCN of 1986512
Using previous duplicated file +DATA/rac_stby/datafile/example.260.866718177 for datafile 5 with checkpoint SCN of 1985968
Using previous duplicated file +DATA/rac_stby/datafile/undotbs2.262.866718247 for datafile 6 with checkpoint SCN of 1986472

contents of Memory Script:
{
   set newname for tempfile  1 to 
 "+data";
   switch clone tempfile all;
   set newname for datafile  1 to 
 "+DATA/rac_stby/datafile/system.258.866718017";
   set newname for datafile  2 to 
 "+DATA/rac_stby/datafile/sysaux.259.866718099";
   set newname for datafile  3 to 
 "+DATA/rac_stby/datafile/undotbs1.261.866718223";
   set newname for datafile  4 to 
 "+DATA/rac_stby/datafile/users.263.866718257";
   set newname for datafile  5 to 
 "+DATA/rac_stby/datafile/example.260.866718177";
   set newname for datafile  6 to 
 "+DATA/rac_stby/datafile/undotbs2.262.866718247";
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +data 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

sql statement: alter system archive log current

contents of Memory Script:
{
   backup as copy reuse
   archivelog like  "+FRA/rac/archivelog/2014_12_19/thread_2_seq_39.326.866719369" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_41.328.866720495" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_2_seq_38.324.866719365" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_40.327.866719371" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_2_seq_40.329.866720495" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_39.325.866719367" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_1_seq_38.322.866718257" auxiliary format 
 "+FRA"   archivelog like 
 "+FRA/rac/archivelog/2014_12_19/thread_2_seq_37.323.866718257" auxiliary format 
 "+FRA"   ;
   catalog clone start with  "+FRA";
   catalog clone datafilecopy  "+DATA/rac_stby/datafile/system.258.866718017", 
 "+DATA/rac_stby/datafile/sysaux.259.866718099", 
 "+DATA/rac_stby/datafile/undotbs1.261.866718223", 
 "+DATA/rac_stby/datafile/users.263.866718257", 
 "+DATA/rac_stby/datafile/example.260.866718177", 
 "+DATA/rac_stby/datafile/undotbs2.262.866718247";
   switch clone datafile  1 to datafilecopy 
 "+DATA/rac_stby/datafile/system.258.866718017";
   switch clone datafile  2 to datafilecopy 
 "+DATA/rac_stby/datafile/sysaux.259.866718099";
   switch clone datafile  3 to datafilecopy 
 "+DATA/rac_stby/datafile/undotbs1.261.866718223";
   switch clone datafile  4 to datafilecopy 
 "+DATA/rac_stby/datafile/users.263.866718257";
   switch clone datafile  5 to datafilecopy 
 "+DATA/rac_stby/datafile/example.260.866718177";
   switch clone datafile  6 to datafilecopy 
 "+DATA/rac_stby/datafile/undotbs2.262.866718247";
}
executing Memory Script

Starting backup at 19-DEC-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=2 sequence=39 RECID=63 STAMP=866719368
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 12/19/2014
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 12/19/2014
ORA-17628: Oracle error 19505 returned by remote Oracle server

RMAN> 



This was fixed by adding the FRA disk group on DR site.

No comments: