After a while did the DG creation using rman. Referred note#789370.1
take init.ora of both primary and standby backup
run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
backup database format ‘/oradata/orabackup01/Primary/rman/%U’;
backup archivelog all format ‘/oradata/orabackup01/Primary/rman/%U’;
backup current controlfile for standby format ‘/oradata/orabackup01/Primary/rman/%U’;
}
alter system switch logfile;
scp the files to standby server. Use similar location.
on secondary
$ rman target sys/syspwd@Primary_dg auxiliary /
Recovery Manager: Release 10.2.0.2.0 – Production on Tue May 18 04:12:27 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: Primary (DBID=863765789)
connected to auxiliary database: standby (not mounted)
RMAN> duplicate target database for standby dorecover;
Starting Duplicate Db at 18-MAY-2010 04:12:51
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=156 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=155 devtype=DISK
allocated channel: ORA_AUX_SBT_TAPE_1
channel ORA_AUX_SBT_TAPE_1: sid=154 devtype=SBT_TAPE
channel ORA_AUX_SBT_TAPE_1: Veritas NetBackup for Oracle – Release 6.5 (2008052301)
allocated channel: ORA_AUX_SBT_TAPE_2
channel ORA_AUX_SBT_TAPE_2: sid=153 devtype=SBT_TAPE
channel ORA_AUX_SBT_TAPE_2: Veritas NetBackup for Oracle – Release 6.5 (2008052301)
contents of Memory Script:
{
set until scn 8978424429104;
restore clone standby controlfile;
sql clone ‘alter database mount standby database’;
}
executing Memory Script
executing command: SET until clause
Starting restore at 18-MAY-2010 04:25:19
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_SBT_TAPE_2
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /oradata/orabackup01/standby/rman/jolduq5h_1_1
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/oradata/orabackup01/standby/rman/jolduq5h_1_1 tag=TAG20100518T011321
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:18
output filename=+DISK_GROUP1/standby/controlfile/control01_standby.ctl
Finished restore at 18-MAY-2010 04:25:40
sql statement: alter database mount standby database
released channel: ORA_AUX_DISK_1
released channel: ORA_AUX_DISK_2
released channel: ORA_AUX_SBT_TAPE_1
released channel: ORA_AUX_SBT_TAPE_2
contents of Memory Script:
{
set until scn 8978424429104;
set newname for clone tempfile 1 to new;
switch clone tempfile all;
set newname for clone datafile 1 to new;
set newname for clone datafile 2 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 4 to new;
set newname for clone datafile 5 to new;
set newname for clone datafile 6 to new;
set newname for clone datafile 7 to new;
set newname for clone datafile 8 to new;
set newname for clone datafile 9 to new;
set newname for clone datafile 10 to new;
set newname for clone datafile 11 to new;
set newname for clone datafile 12 to new;
set newname for clone datafile 13 to new;
restore
check readonly
clone database
;
}
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
renamed temporary file 1 to +DISK_GROUP1 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
executing command: SET NEWNAME
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 restore at 18-MAY-2010 04:26:02
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK
allocated channel: ORA_AUX_DISK_2
channel ORA_AUX_DISK_2: sid=154 devtype=DISK
allocated channel: ORA_AUX_SBT_TAPE_1
channel ORA_AUX_SBT_TAPE_1: sid=155 devtype=SBT_TAPE
channel ORA_AUX_SBT_TAPE_1: Veritas NetBackup for Oracle – Release 6.5 (2008052301)
allocated channel: ORA_AUX_SBT_TAPE_2
channel ORA_AUX_SBT_TAPE_2: sid=156 devtype=SBT_TAPE
channel ORA_AUX_SBT_TAPE_2: Veritas NetBackup for Oracle – Release 6.5 (2008052301)
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DISK_GROUP1
restoring datafile 00005 to +DISK_GROUP1
restoring datafile 00007 to +DISK_GROUP1
restoring datafile 00008 to +DISK_GROUP1
restoring datafile 00009 to +DISK_GROUP1
restoring datafile 00010 to +DISK_GROUP1
restoring datafile 00013 to +DISK_GROUP1
channel ORA_AUX_DISK_1: reading from backup piece /oradata/orabackup01/standby/rman/jkldupnn_1_1
channel ORA_AUX_DISK_2: starting datafile backupset restore
channel ORA_AUX_DISK_2: specifying datafile(s) to restore from backup set
restoring datafile 00002 to +DISK_GROUP1
restoring datafile 00003 to +DISK_GROUP1
restoring datafile 00004 to +DISK_GROUP1
restoring datafile 00006 to +DISK_GROUP1
restoring datafile 00011 to +DISK_GROUP1
restoring datafile 00012 to +DISK_GROUP1
channel ORA_AUX_DISK_2: reading from backup piece /oradata/orabackup01/standby/rman/jjldupnm_1_1
channel ORA_AUX_DISK_2: restored backup piece 1
piece handle=/oradata/orabackup01/standby/rman/jjldupnm_1_1 tag=TAG20100518T010558
channel ORA_AUX_DISK_2: restore complete, elapsed time: 00:06:15
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/oradata/orabackup01/standby/rman/jkldupnn_1_1 tag=TAG20100518T010558
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:06:31
Finished restore at 18-MAY-2010 04:32:41
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy recid=41 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/system.413.719295981
datafile 2 switched to datafile copy
input datafile copy recid=42 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/undo1.407.719295981
datafile 3 switched to datafile copy
input datafile copy recid=43 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/sysaux.345.719295971
datafile 4 switched to datafile copy
input datafile copy recid=44 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/users.416.719295983
datafile 5 switched to datafile copy
input datafile copy recid=45 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/ts_aud_data_purge.405.719295981
datafile 6 switched to datafile copy
input datafile copy recid=46 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/tspan_data.351.719295975
datafile 7 switched to datafile copy
input datafile copy recid=47 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/tspan_index.410.719295979
datafile 8 switched to datafile copy
input datafile copy recid=48 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/fuego_data.474.719295975
datafile 9 switched to datafile copy
input datafile copy recid=49 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/fuego_index.368.719295977
datafile 10 switched to datafile copy
input datafile copy recid=50 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/adw_data.342.719295971
datafile 11 switched to datafile copy
input datafile copy recid=51 stamp=719296362 filename=+DISK_GROUP1/standby/datafile/adw_index.409.719295981
datafile 12 switched to datafile copy
input datafile copy recid=52 stamp=719296363 filename=+DISK_GROUP1/standby/datafile/reserve.411.719295979
datafile 13 switched to datafile copy
input datafile copy recid=53 stamp=719296363 filename=+DISK_GROUP1/standby/datafile/streams_tbs.406.719295983
contents of Memory Script:
{
set until scn 8978424429104;
recover
standby
clone database
delete archivelog
;
}
executing Memory Script
executing command: SET until clause
Starting recover at 18-MAY-2010 04:32:45
using channel ORA_AUX_DISK_1
using channel ORA_AUX_DISK_2
using channel ORA_AUX_SBT_TAPE_1
using channel ORA_AUX_SBT_TAPE_2
starting media recovery
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: ‘+DISK_GROUP1/standby/datafile/system.413.719295981′
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 05/18/2010 04:33:00
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 1 seq 203315 lowscn 8978424428500 found to restore
RMAN-06025: no backup of log thread 1 seq 203314 lowscn 8978424427332 found to restore
RMAN-06025: no backup of log thread 1 seq 203313 lowscn 8978424419381 found to restore
RMAN-06025: no backup of log thread 1 seq 203312 lowscn 8978255748027 found to restore
exit from rman. Ignore the above error time being.
go to primary
alter system set log_archive_dest_state_2 = enable ;
go to standby
alter database recover managed standby database disconnect from session;
This should catch up the standby with the missing arch reported above.
execute the below command in standby, you will get the status.
select sequence#,applied from v$archived_log order by sequence#;
convert this post to pdf.