Installing 10G R2 Data Guard

This article describes the setup of the DataGuard and Observer, in Maxavailability mode and with Fail Over about to be activated.

This article describes the setup of the DataGuard and Observer, in Maxavailability mode and with Fail Over about to be activated.

 

If there’s going to be a Standby setup in a operational Data Guard environment then the standby logs need to be checked

 

For large databases it is recommended starting up before opening the backup settings.

Adding the following aliases to /home/oracle/.bash_profile makes the installation process easier.

Step 1.

The Primary DB should be in Archive Log mode.

Step 2.

Primary DB should have Flashback active.

Step 3.

Step 4.

Standby DB.

Load only the RDBMS and patches. The standby db has the same rights and folder ownership as the Primary, however it hasn’t been created yet.

Primary

Oracle_Unique_Name FSM_DG1

Standby

Oracle_Unique_Name FSM_DG2

 

Step 5.

Create the Standby Redologs in the Primary. (Whatever has been added to the Primary should also be added to the Standby.)

Step 6.

The following changes need to be made in the Primary DB’s pfile. These changes should then be copied to a spfile and the database opened with the spfile.

The same, but creating a new pfile instead.

Step 7.

Make the necessary folders in the Standby DB. Any missing folders would result in this error message “ORA-07446: sdnfy: bad value ” for parameter”.

Step 8.

Creating the following pfile for the StandBy. Make it in the Primary and send it to $ORACLE_HOME/dbs in the Standby.

Step 9.

Make the following changes in initFSM.ora in the Standby server.

Step 10.

Opening the Standby DB in nomount mode.

Step 11.

Make a password file in the standby (the sys password should be the same as in the Primary).

Step 12.

Making a backup of the Primary using RMAN. The RMAN backup should be sent to the Standby (in the same location as it is in the Primary).

Alternatively

 

 

The backup should be copied to the /u02/backup path in the Standby. If copying the backup is going to take a long time, start the NFS (Network File System) service and then mount, this will save the trouble of copying.

 

 

Step 13.

The RMAN backup should be restored in the standby. To do this, in the Primary DB :

 

tail -f outputs the alertlog dump.

Step 14.

Creating the redo logs in the Standby (be careful with the file sizes).

 

 

 

 

Drop StandBy Log

— adding a single standby log

 

— adding a multi-user standby log

 

 

Step 15.

To apply the redos, created in the Primary, to the Standby:

 

 

To check, in the Primary:

 

 

In the Standby:

 

 

REDO APPLY

 

 
REDO APPLY USING REAL-TIME APPLY

 

 

 

This can done manually without making an RMAN duplicate. Put the Primary DB into Mount mode, create a control file for the Standby and copy to the original paths using the same names.

The same procedure should be applied for both the datafiles and log files.

PRIMARY

STANDBY

Checking the Standby’s Archive destination from the Primary DB

The Redo Switch frequency

If there are any idle archivelogs

Copy missing archivelogs from the Primary to the Standby

Flashback needs to be active for MAXAVAILABILITY.

Both in the Primary and the Standby run

Check that machine is running the observer process

Primary

db_name————->FSM

db_unique_name——>FSM_DG1

 

StandBy

db_name————->FSM

db_unique_name——>FSM_DG2

 

log

tail -300f /u01/app/oracle/admin/FSM/bdump/drcFSM.log |more

 

Connecting to the Primary

NOTE: Enabling configuration shuts down and restarts the database!!!!

There should be a system alert when enabling configuration, however the DBMS doesnt give one.

In both databases

This should allow connection to both the databases, however in a failover it wouldn’t allow opening the database.

 

Alternatives:

In Standby

Putting the Primary in mount mode

 

ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;

 

(Writes to the current Standby DB)

(Switches roles, primary to standby and standby to primary)

 

REINSTATE DATABASE ‘FSM_DG2’;

 

standby archive location

Closing and restarting the databases in the Data Guard environment.

 

Steps to close the databases

Primary

Standby

Steps to restart

Standby

Primary