Powered By Blogger

Thursday, January 27, 2011

Backup stanby and Restoration steps tested in Production Server

The below trace information is creating a standby in production environment with 220GB (9.2.0.7) database by without connecting to Production.

Metalink Reference : Step By Step Guide To Create Physical Standby Database Using RMAN [ID 469493.1]

The Below script is used for Backup

Run {
Allocate channel ch1 type disk format '\\t34270\e$\Full_backup_standby\%d_data_%U' maxpiecesize 30G;
Allocate channel ch2 type disk format '\\t34270\e$\Full_backup_standby\%d_data_%U' maxpiecesize 30G;
Allocate channel ch3 type disk format '\\t34270\e$\Full_backup_standby\%d_data_%U' maxpiecesize 30G;
Allocate channel ch4 type disk format '\\t34270\e$\Full_backup_standby\%d_data_%U' maxpiecesize 30G;
Allocate channel ch5 type disk format '\\t34270\e$\Full_backup_standby\%d_data_%U' maxpiecesize 30G;
Backup database plus archivelog;
backup format '\\t34270\e$\Full_backup_standby\%d_ctrl_%U' current controlfile for standby;
Release channel ch1;
Release channel ch2;
Release channel ch3;
Release channel ch4;
Release channel ch5;
}

Restoration steps performed in the standby server :

The standby server has the Oracle Service already created using Oradim utility, password file,spfile has already been copied with the necessary changes done in it. The below information is about restoration and recovery

C:\Documents and Settings\Administrator>rman target /
Recovery Manager: Release 9.2.0.7.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 1609808860 bytes
Fixed Size 457692 bytes
Variable Size 1283457024 bytes
Database Buffers 318767104 bytes
Redo Buffers 7127040 bytes
RMAN> set dbid=2399844302
executing command: SET DBID
RMAN> restore controlfile from '\\T34270\e$\Full_backup_standby\sys8_CTRL_JVM18BD8_1_1';
Starting restore at 04-JAN-11
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=17 Dvtype=DISK
channel ORA_DISK_1: restoring controlfile
channel ORA_DISK_1: restore complete
replicating controlfile
input filename=C:\ORACLE\ORADATA\sys8\CONTROL01.CTL
output filename=C:\ORACLE\ORADATA\sys8\CONTROL02.CTL
output filename=D:\ORADATA\sys8\CONTROL03.CTL
Finished restore at 04-JAN-11
RMAN> sql 'alter database mount standby database';
sql statement: alter database mount standby database
RMAN> restore database;
Starting restore at 04-JAN-11
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to D:\ORADATA\sys8\INDX01.DBF
restoring datafile 00006 to D:\ORADATA\sys8\USERS01.DBF
restoring datafile 00007 to D:\ORADATA\sys8\XDB01.DBF
restoring datafile 00010 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_3.DBF
restoring datafile 00018 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_03.DBF
restoring datafile 00023 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_05.DBF
restoring datafile 00024 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_7.DBF
restoring datafile 00033 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_8.DBF
restoring datafile 00034 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_12.DBF
restoring datafile 00043 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_16.DBF
restoring datafile 00047 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_20.DBF
restoring datafile 00067 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_4.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JQM185RA_1_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restored backup piece 2
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JQM185RA_2_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to D:\ORADATA\sys8\SYSTEM01.DBF
restoring datafile 00008 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_1.DBF
restoring datafile 00013 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_02.DBF
restoring datafile 00017 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_5.DBF
restoring datafile 00020 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_17.DBF
restoring datafile 00029 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_6.DBF
restoring datafile 00030 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_10.DBF
restoring datafile 00037 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_21.DBF
restoring datafile 00040 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_15.DBF
restoring datafile 00065 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_2.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JPM185RA_1_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restored backup piece 2
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JPM185RA_2_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to D:\ORADATA\sys8\BSH_A\TS_BSH_A_INDX_1.DBF
restoring datafile 00011 to D:\ORADATA\sys8\BSH_A\TS_BSH_A_INDX_2.DBF
restoring datafile 00012 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_01.DBF
restoring datafile 00016 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_4.DBF
restoring datafile 00019 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_04.DBF
restoring datafile 00027 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_9.DBF
restoring datafile 00028 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_09.DBF
restoring datafile 00038 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_14.DBF
restoring datafile 00042 to D:\ORADATA\sys8\STATS_PACK.ORA
restoring datafile 00064 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_1.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JTM185RR_1_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restored backup piece 2
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JTM185RR_2_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00003 to D:\ORADATA\sys8\DRSYS01.DBF
restoring datafile 00014 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_5.DBF
restoring datafile 00025 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_8.DBF
restoring datafile 00026 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_08.DBF
restoring datafile 00035 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_9.DBF
restoring datafile 00036 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_13.DBF
restoring datafile 00045 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_19.DBF
restoring datafile 00046 to D:\ORADATA\sys8\UNDOTBS_01.DBF
restoring datafile 00068 to D:\ORADATA\sys8\BSH_A\TS_BSH_A_DATA_1.DBF
restoring datafile 00070 to D:\ORADATA\sys8\BSH_A\TS_BSH_A_DATA_3.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JSM185RG_1_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restored backup piece 2
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JSM185RG_2_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restore complete
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00005 to D:\ORADATA\sys8\TOOLS01.DBF
restoring datafile 00009 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_2.DBF
restoring datafile 00015 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_06.DBF
restoring datafile 00021 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_07.DBF
restoring datafile 00022 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_6.DBF
restoring datafile 00031 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_7.DBF
restoring datafile 00032 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_11.DBF
restoring datafile 00039 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_10.DBF
restoring datafile 00041 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_INDX_18.DBF
restoring datafile 00044 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA2_10.DBF
restoring datafile 00066 to D:\ORADATA\sys8\BSH_D\TS_BSH_D_DATA1_3.DBF
restoring datafile 00069 to D:\ORADATA\sys8\BSH_A\TS_BSH_A_DATA_2.DBF
channel ORA_DISK_1: restored backup piece 1
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JRM185RA_1_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restored backup piece 2
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JRM185RA_2_1 tag=TAG20110104T043657 params=NULL
channel ORA_DISK_1: restore complete
Finished restore at 04-JAN-11
RMAN> list backup of archivelog all;


RMAN> recover database until sequence 25224 thread 1;
Starting recover at 04-JAN-11
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to Dfault Dstination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=25223
channel ORA_DISK_1: restored backup piece 1
piece handle=\\T34270\E$\FULL_BACKUP_STANDBY\sys8_DATA_JUM18BD6_1_1 tag=TAG20110104T061150 params=NULL
channel ORA_DISK_1: restore complete
archive log filename=D:\ORADATA\sys8\ARCHIVE\LOG_1_25223.ARC thread=1 sequence=25223
media recovery complete
Finished recover at 04-JAN-11
RMAN>

after sucessfull restoration and recovery bring the database to recovery mode

sql> recover managed standby database disconnect from session;

************************** end ******************************

No comments:

Post a Comment