Search

Join this Blog for direct reference of any post into your inbox. To join just click on "Join this Site" under "Follower" then Login with your Email.*** DECLARATION: I Maintain this Blog for Helping Myself While at Work and Welcome any body Needing Help!!!.*** CAUTION: Using any of the script from this Blog may contain at Own Risk. These scripts May or May not have been Tested.***

Tuesday, 17 April 2012

Switchover and Failover in Physical Standby database

There are two ways to change the role in standby configuration:
Switchover: Changing role with some one else and letting them to take over while you become a standby.
Failover: Assigning some one else to take over (any Standby DB serving as Prod DB ) when the original is gone (Prod DB is Fail).
Protection Levels: 
Transport services define how the redo gets to the standby site and the Protection level defines how the primary functions in standby configuration. Each Level of Protection has a defined set of rules:
-          Maximize Protection
-          Maximize Availability
-          Maximize Performance
Maximize Protection Mode:
-          Zero Data Loss!
-          Highest Level of Protection
-          Configuration: LGWR SYNC, SRLs
-          Enforces protection of every transaction
-          If last standby is unavailable, processing stops at primary
-          Good for financial systems where no data loss is acceptable
ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION;
Maximize Availability Mode:
-          Zero Data Loss as long as the network stays up!
-          Enforces protection of every transaction
-          Configuration: LGWR SYNC, do not need SRLs
-          If last standby is unavailable, processing continues at primary
-          When the standby becomes available again, synchronization with the primary is automatic
ALTER DATABASE SET STANDBY TO MAXIMIZE AVAILABILITY;
Maximize Performance Mode:
-          Highest level of performance
-          Configuration: LGWR ASYNC, or ARCH
-          Protects from failure of any single component
-          Least impact on production system
-          Useful for applications that can tolerate some data loss
ALTER DATABASE SET STANDBY TO MAXIMIZE PERFORMANCE;
Consider the standby configuration where primary database is “Payroll” and Standby database is “Payrolldr” The below Example show the Physical Standby role changes “Switchover” and “Failover” in oracle 9i database. This is the tested document by Mr. Larry M. Carpenter Senior Principal Consultant Data Guard Development Server Technologies Oracle Corporation.

Prepare the Primary Parameter:
























Prepare the standby Parameter:























Prepare to Switchover the Primary
























Start with the Primary
























Then Switchover the Standby























Startup the New Standby























Add in the SRL’s to the New Standby























Startup the New Primary






















Verify the New Standby























Verify the New Primary






















Note: If you want to “switchback” then just do the previous work again without all the parameters changes other than setting the services and enabling or deferring the remote destinations.

Failover:
This Example will recover all our data since it is setup as a Zero data loss Configuration. The current primary will have to be recreated after a Failover.

Insert data and Crash the Primary






















Verify the standby and Failover






















Switch Over the Primary






















Setup Access and Verify data






















Note: You can also do this through “Data Guard Manager” GUI tools.















0 comments:

Post a Comment