Wednesday, November 18, 2009

How to Use Oracle Failsafe With Oracle Data Guard for RDBMS versions 10g


How to Use Oracle Failsafe With Oracle Data Guard for RDBMS versions 10g

Doc ID:
373204.1
Type:
HOWTO

Modified Date:
01-JUL-2009
Status:
PUBLISHED
In this Document
  Goal
  
Solution
  
References



Applies to:
Oracle Fail Safe - Version: 10.1.0.2
Microsoft Windows 2000
Microsoft Windows Server 2003 (64-bit Itanium)
Microsoft Windows (64-bit) on Intel Itanium

Goal
This document describes at a high level how Oracle Failsafe and Oracle DataGuard can be used together in the same environment running RDBMS 10g.
Solution
Oracle Failsafe and Oracle DataGuard may be used in the same environment.   There is however one caveat to this caused by this pending enhancement request: 

Bug 4404952 : DG BROKER DOES NOT SUPPORT COLD-FAILOVER CLUSTERS

Due to the fact that the DataGuard Broker cannot yet work effectively with databases configured in cold failover environments, databases that are made highly available through Failsafe cannot be managed by the DataGuard Broker. 
An extension of this issue is that Grid Control DataGuard Wizard component also cannot be used for this environment since this wizard's functionality is based (almost) entirely on the presence of a DataGuard Broker.

Note: It is technically possible to configure a DataGuard configuration for a primary or standby database that is part of a Failsafe group / belongs to a Virtual host, however, at the moment that this database fails over within its cluster, say from Node 'A' to Node 'B' the DataGuard configuration will become invalidated and will need to be rebuilt.

The recommended configuration for using Oracle Failsafe with Oracle DataGuard is to use Oracle DataGuard without creating a DataGuard configuration, ie, a primary and standby database environment without DataGuard Broker management.

Keep in mind that it IS possible to use Grid Control with Oracle Failsafe.  See 
Note 298238.1: Oracle10g Grid Control with Oracle Fail Safe for full details on integrating Grid Control with Oracle Failsafe.

Therefore, Failsafe may in fact be used with DataGuard (without a DataGuard configuration)
AND
Failsafe may be used with Grid Control (all except the DataGuard wizard)

Full integration of Failsafe with DataGuard is possible for 9i with the same restrictions
See Metalink Note:259902.1 : Oracle 9i Data Guard and Oracle Fail Safe
for full details.

Note:  this is specfically covered in the linked to white paper entitled:
Disaster-Tolerant High Availability
Oracle Data Guard with Oracle Fail Safe
An Oracle White Paper
June 2002

6.1 Performing an Oracle Fail Safe (MSCS) Failover
Pages 79 - 80

References
Note 259902.1 - Oracle 9i Data Guard and Oracle Fail Safe
Note 298238.1 - Oracle10g Grid Control with Oracle Fail Safe
http://failsafe.us.oracle.com/fscollateral/ofsdg33_27.pdf
Keywords
DATAGUARD ; FAILOVER ; FAILSAFE ; BROKER ; PRIIMARY ; 

How to Start Databases Automatically in Correct Mode and Start Recovery on Standby After O.S. Reboot


How to Start Databases Automatically in Correct Mode and Start Recovery on Standby After O.S. Reboot

Doc ID:
883196.1
Type:
HOWTO

Modified Date:
05-SEP-2009
Status:
MODERATED
In this Document
  Goal
  
Solution
Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 11.1.0.6
Information in this document applies to any platform.

Goal
How to Start Databases Automatically Correct Mode and Start Recovery on Standby After O.S. Reboot.
Solution
Use DGMGRL to start the database.
Note: In order to use DGMGRL to start the database, you must have parameter dg_broker_start=true,
You can set it to true using:

SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;

When database is started from DGMGRL, it starts the database in mode according to database_role.

For Primary, it will start database in open read write stage.
For Physical Standby, it will start database in mount stage and also start the managed recovery.
For Logical Standby, it will start database in open stage and also start the SQL apply.

On Windows:
++ Set ORA_SID_AUTOSTART to false in windows registry.

++ Create a batch job on the both primary and standby database:

start1.bat
=========
set ORACLE_SID=
dgmgrl / "startup"

start2.bat
======
set ORACLE_SID=
dgmgrl sys/ "startup"

++ Use either of 2 (start1.bat or start2.bat), only difference in these is OS and database authentication.
++ Now schedule this bat file to execute automatically at the system reboot to start the database automatically.

On Unix Based Systems.

++ Specify "N" for startup field in the oratab file for SID.

++ Create a .ksh script on the both primary and standby database:

dg_start1.ksh
============
#! /bin/ksh
export ORACLE_SID=
dgmgrl /
startup;
EOF

dg_start2.ksh
==============
#! /bin/ksh
export ORACLE_SID=
dgmgrl sys/
startup;
EOF

++ Now change permission of "dg_start1.ksh" or "dg_start2.ksh", depending on script you want to use.

$chmod u+x dg_start1.ksh

$chmod u+x dg_start2.ksh

++ Use either of 2 (dg_start1.ksh or dg_start2.ksh), only difference in these is OS and database authentication.
++ Now schedule this ksh file to execute automatically at the system reboot to start the database automatically.

Please take help of your system administrator to schedule bat or ksh script.

How to Safely Remove a Data Guard Broker Configuration


How to Safely Remove a Data Guard Broker Configuration

Doc ID:
261336.1
Type:
REFERENCE

Modified Date:
20-MAY-2009
Status:
PUBLISHED

PURPOSE
-------

How to safely remove a Data Guard Broker configuration.


SCOPE & APPLICATION
-------------------

This applies to all DBAs who wish to remove and deactive a
Data Guard Broker configuration.


Removing the Configuration
----------------------------

1) Remove the Data Guard Broker Configuration

  a) Using the Commandline DGMGRL:
    
     - Connect to the Primary Database
       DGMGRL> connect sys/@
     - Remove the Data Guard Broker Configuration
       DGMGRL> remove configuration;

  b) Using Data Guard Manager or Grid Control:
    
     Follow the Wizard as mentioned in the Chapter
     'Scenarios Using Oracle Enterprise Manager'
     of the Data Guard Broker Guide of each Database Version.

2) On the primary database set dg_broker_start=false:

SQL> show parameter dg_broker

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      ?/dbs/dr1@.dat
dg_broker_config_file2               string      ?/dbs/dr2@.dat
dg_broker_start                      boolean     TRUE
SQL>
SQL> alter system set dg_broker_start=false scope=both;

System altered.

SQL>  show parameter dg_broker

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      ?/dbs/dr1@.dat
dg_broker_config_file2               string      ?/dbs/dr2@.dat
dg_broker_start                      boolean     FALSE
SQL>

3) On the primary disable any archive destinations that are archiving to the standby:

SQL> select dest_id,destination,status
  2  from v$archive_dest
  3  where target='STANDBY';

   DEST_ID
----------
DESTINATION
--------------------------------------------------------------------------------
STATUS
---------
         2
(DESCRIPTION=(ADDRESS_LIST = (ADDRESS=(PROTOCOL=tcp)(HOST=hasunclu2.us.oracle.co
m)(PORT=1521)))(CONNECT_DATA=(SID=DG920phy)(ORACLE_HOME=/u03/oracle/9.2.0)(SERVE
R=DEDICATED)))
VALID

SQL> alter system set log_archive_dest_state_2=defer scope=both;

System altered.

SQL>

4) on the standby set the dg_broker_start parameter to false:

SQL> show parameter dg_broker

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1               string      ?/dbs/dr1@.dat
dg_broker_config_file2               string      ?/dbs/dr2@.dat
dg_broker_start                      boolean     TRUE
SQL> alter system set dg_broker_start=false scope=both;

System altered.

SQL>

5) On both system rename the metadata files (if they exist):

oracle@hasunclu1:/u03/oracle/9.2.0/dbs> mv dr1DG920.dat dr1DG920.back
oracle@hasunclu1:/u03/oracle/9.2.0/dbs> mv dr2DG920.dat dr2DG920.back


RELATED DOCUMENTS
--------------------

Oracle® Data Guard Broker Guide