14 December 2007
Oracle Data Guard with Zero Data Loss and Failover
Zero Data Loss
To enable Zero Data Loss, start the standby with the Real-Time Apply:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Set up ASYNC mode on the production.
To enable Zero Data Loss, start the standby with the Real-Time Apply:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
Set up ASYNC mode on the production.
Create Data Guard Configuration
$dgmgrl
DGMGRL> CREATE CONFIGURATION 'DRDBCP02' AS PRIMARY DATABASE IS 'DBCP02' CONNECT IDENTIFIER IS DBCP02;
DGMGRL> ADD DATABASE 'DBCP02_STANDBY' AS CONNECT IDENTIFIER IS DBCP02_STANDBY MAINTAINED AS PHYSICAL;
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
DGMGRL> SHOW CONFIGURATION;
DGMGRL> EDIT DATABASE 'DBCP02' SET PROPERTY LogXptMode='ASYNC';
DGMGRL> EDIT DATABASE 'DBCP02_STANDBY' SET PROPERTY LogXptMode='ASYNC';
DGMGRL> SHOW DATABASE VERBOSE 'DBCP02';
Fast Failover
DGMGRL> EDIT DATABASE 'DBCP02' SET PROPERTY FastStartFailoverTarget='DBCP02_STANDBY';
DGMGRL> EDIT DATABASE 'DBCP02_STANDBY' SET PROPERTY FastStartFailoverTarget='DBCP02';
DGMGRL> ENABLE FAST_START FAILOVER;
DGMGRL> START OBSERVER; -- This will just "hang" until you stop it from another session