Wednesday, 4 July 2012

Creating Active Datagaurd in 11g using RMAN backup restore(Manual restore standby)


This post is about the creation of Active Datagaurd in 11g using RMAN backup restore,there arevarious differenet methods of creating a standby database in oracle 11g for eg

1)-Using RMAN duplicate command
2)-Manual standby using the database files
3)-Using Backup Restore

i am using RMAN backup restore(Manual restore standby) in the post

Follow these simple steps for the creation of Active Datagaurd in 11g using RMAN backup restore(Manual restore standby) Screenshots are also provided for a better result


Step 1)_ON PRIMARY SERVER-check for archivelog mode,check that the primary server is in archivelog mode,if it is not in archivelog mode then convert it into archivelog mode


Step 2)_ON PRIMARY SERVER-Enabled forced logging so that everything gets logged


Step 3)_ON PRIMARY SERVER-Check the setting for the DB_NAME and DB_UNIQUE_NAME parameters,this is helpful as you  have to set the same values in the standby server


Step 4)_ON PRIMARY SERVER-add the name of standby database and the service name of the standby server in log_archive_config parameter,this can be used for sending redo logs to standby server


Step 5)_ON STANDBY SERVER-install only binaries in exact location as in PRIMARY


Step 6)_ON PRIMARY SERVER-Set suitable remote archive log destinations and enable remote archiving,this can be done by using the service name for the standby database


Step 7)_ON PRIMARY SERVER-set archive log format,max process and password file exclusivity


Step 8)_ON PRIMARY SERVER-it is recommended to make sure the primary is ready to switch roles to become a standby. For that we need to set these parameters

1)-FAL_SERVER
2)-DB_FILE_NAME_CONVERT
3)-LOG_FILE_NAME_CONVERT


Step 9)_ON PRIMARY AND STANDBY SERVER-Entries for the primary and standby databases are needed in the tnsnames.ora files on both servers


Step 10)_ON PRIMARY SERVER-take a backup of the primary database,this step distinguishes this type of method creating the standby database,if you are using RMAN DUPLICATE command then this step is not necessary


Step 11)_ON PRIMARY SERVER-Create a controlfile for the standby database


Step 12)_ON PRIMARY SERVER-Create a parameter file for the standby database


Step 13)_ON STANDBY SERVER-make exact folders in the standby server as there in the primary server


Step 14)_ON PRIMARY SERVER-copy the newly created standby control file


Step 15)_ON STANDBY SERVER-paste the controlfile to the standby server and rename it to control01,02,03 respectively


Step 16)_ON STANDBY SERVER-copy and paste controlfile,archive log files,datafiles,password file,backupset into the standby server to the exact location as of the primary server


Step 17)_ON STANDBY SERVER-make changes in the tnsnames file for the standby server


Step 18)_ON STANDBY SERVER-start the listener


Step 19)_ON STANDBY SERVER-make the following changes in the standby server pfile

1)-FAL_SERVER
2)-LOG_ARCHIVE_DEST_2
3)-DB_UNIQUE_NAME


Step 20)_ON STANDBY SERVER-create a new service for the database using oradim


Step 21)_ON STANDBY SERVER-startup the server in nomount mode using the newly created pfile


Step 22)_ON STANDBY SERVER-create spfile from the standby server pfile


Step 23)_ON STANDBY SERVER-shutdown n startup in nomount using newly created spfile


Step 24)_ON STANDBY SERVER RMAN-mount the database and restore the database


Step 25)_ON STANDBY SERVER-create the online redo logs


Step 26)_ON STANDBY SERVER-In addition to the online redo logs, you should create standby redo logs on both the standby and the primary database (in case of switchovers)


Step 27)_ON PRIMARY SERVER-switch the logfile to see the archivelog generation and also check the copying it to standby


Step 28)_ON STANDBY SERVER-recover the standby to make it upto-date with primary


Congratulations!!!

You have successfully created an active datagaurd using RMAN restore command

No comments:

Post a Comment