Saturday, July 9, 2011

DR Setup

1) Compare the space on ADC and RMDC.The space on RMDC should exactly match the ADC servers.

Database Owner: or{$inst_name} Group: db{$inst_name}
/$inst_name/oracle
/$inst_name/oradata
/$inst_name/arch
/$inst_name/oratmp
/$inst_name/backup
/$inst_name/log
/$inst_name/applcsf

Applications Owner: ap{$mt_source} Group: aa{$mt_source}
/$inst_name/applmgr
/$inst_name/applcsf (This Should be mounted on DB tier too)
/$mt_source/product
/$inst_name/mtlog
/$inst_name/inst

Disco10g User/Group : ia{$mt_source}:ia{$inst_name}
/$inst_name/disco

2) Verify BigIP and Firewall configuration on RMDC

To check the bigip setup for RMDC paste the hostname of any of the RMDC MT servers in the Bigip URL search.

The Big IP URL is displayed if the Bigip configuration is completed on RMDC.Else we get a message like "Not found in any of the Big-IPs"

If the setup is not complete for RMDC pls re-open the TAR for bigip setup.

Ports to be Open
================

Source : $db_hostname
Target : $db_rmdc_hostname
Port : DB listener port

Make sure the following firewall policies are in place at the RMDC

Source : Mid tier
Target : Database node (All nodes if DB is RAC)
Port : 10X10

Source : Database node (All nodes if DB is RAC)
Target : Mid tier
Port : 80 and 10X15

Source : Mid tier
Target : BigIP URL
Port : 80 and 443

Source : Mid tier
Target : Concurrent processing node (All nodes if it’s a PCP setup)
Port : 10X11

3) Make sure that passwordless ssh is working between the ADC and RMDC DB servers

On ADC :
ssh $db_rmdc_hostname

On RMDC:
ssh $db_hostname

4) Verify that hot bkp and software is copied from Primary Database Server to Standby Database Server (Contact the System Administrators - OHSSA )

Source : $db_hostname
Target : $db_rmdc_hostname

/$inst_name/oracle
/$inst_name/oradata

5) Verify that file systems from the primary MT server are snap mirrored to the standby MT server

6) In the init.ora of the PRIMARY database, make sure the following changes have been implemented

Single Node
===========
Make sure that the parameter file is using LOG_ARCHIVE_DEST_1 instead of LOG_ARCHIVE_DEST (Unset value for LOG_ARCHIVE_DEST)

Dynamic
=======
LOG_ARCHIVE_DEST_1= "LOCATION=/$inst_name/arch MANDATORY"
LOG_ARCHIVE_DEST_2 = "service=<$INST_NAME_rmdc> OPTIONAL reopen=10 DELAY=60"
LOG_ARCHIVE_DEST_STATE_1=enable
LOG_ARCHIVE_DEST_STATE_2=defer
ARCHIVE_LAG_TARGET=900
FAL_CLIENT=$INST_NAME_adc
FAL_SERVER=$INST_NAME_rmdc
STANDBY_FILE_MANAGEMENT=AUTO
STANDBY_ARCHIVE_DEST=’/$inst_name/arch’
LOG_ARCHIVE_MAX_PROCESSES = (Max # of Groups)* 2
LOG_CHECKPOINT_INTERVAL = 9999999
LOG_CHECKPOINT_TIMEOUT = 0
DG_BROKER_START=TRUE

Static
======
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
LOG_ARCHIVE_FORMAT=$INST_NAME_%t_%s_%r.arc

RAC
===
Make sure that the parameter file is using LOG_ARCHIVE_DEST_1 instead of LOG_ARCHIVE_DEST (Unset value for LOG_ARCHIVE_DEST)

Dynamic
========
.LOG_ARCHIVE_DEST_1= "LOCATION=//arch/ MANDATORY"
.LOG_ARCHIVE_DEST_1= "LOCATION=//arch/ MANDATORY"

NOTE:Replicate the above parameters for other instances if there are more than 2 nodes in the RAC cluster

*.LOG_ARCHIVE_DEST_2 = "service= OPTIONAL reopen=10 DELAY=60"
*.LOG_ARCHIVE_DEST_STATE_1=enable
*.LOG_ARCHIVE_DEST_STATE_2=defer
*.ARCHIVE_LAG_TARGET=900
*.FAL_CLIENT=_adc
*.FAL_SERVER=_rmdc
*.STANDBY_FILE_MANAGEMENT=AUTO
*.LOG_ARCHIVE_MAX_PROCESSES = (Max # of Groups)* 2
*.LOG_CHECKPOINT_INTERVAL = 9999999
*.LOG_CHECKPOINT_TIMEOUT = 0
*.STANDBY_ARCHIVE_DEST=’//arch/
*.DG_BROKER_START=TRUE

Static
======
*.REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
*.LOG_ARCHIVE_FORMAT=_%t_%s_%r.arc

7. Verify the following entries in tnsnames.ora

$INST_NAME_adc =
( DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=$db_hostname)(PORT=$db_port))
(CONNECT_DATA=(SID=$INST_NAME))
)

$INST_NAME_rmdc =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)
(HOST=$db_rmdc_hostname)(PORT=$db_port))
(CONNECT_DATA=(SID=$INST_NAME))
)


Edit EBSO @Oracle :DR:Standby Setup




1. In the init.ora file of the STANDBY database, make the following additions

Dynamic
=======
LOG_ARCHIVE_DEST_1= "LOCATION=/$inst_name/arch MANDATORY"
LOG_ARCHIVE_DEST_2 = "service=$INST_NAME_adc OPTIONAL reopen=10 DELAY=60"
LOG_ARCHIVE_DEST_STATE_1=enable
LOG_ARCHIVE_DEST_STATE_2=defer
ARCHIVE_LAG_TARGET=900
FAL_CLIENT=$INST_NAME_rmdc
FAL_SERVER=$INST_NAME_adc
STANDBY_FILE_MANAGEMENT=AUTO
STANDBY_ARCHIVE_DEST=/$inst_name/arch
LOG_CHECKPOINT_INTERVAL = 9999999
LOG_CHECKPOINT_TIMEOUT = 0
JOB_QUEUE_PROCESSES=0
AQ_TM_PROCESSES=0

Static
======
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
DG_BROKER_START=TRUE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc

Note: Delete *.remote_listener parameter from init.ora on standby db.




2. In the tnsnames.ora of the STANDBY database, add the following :

$INST_NAME_adc =
( DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp) (HOST=$db_hostname)(PORT=$db_port))
(CONNECT_DATA=(SID=$INST_NAME))
)
$INST_NAME_rmdc =
( DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=$db_rmdc_hostname)(PORT=$db_port))
(CONNECT_DATA=(SID=$INST_NAME))
)

3. In the listener.ora of the standby database, make sure that the hostname is set to and start the listener.

lsnrctl start

4. On The primary database, create a standby controlfile

sqlplus '/ as sysdba';
SQL> alter database create standby controlfile as '/tmp/stby_ctl.ctl';

5. Copy the standby control file

--- Copy the standby controlfile from $ORACLE_HOME/dbs of $db_hostname to the /$inst_name/oradata/dataXX location of $db_rmdc_hostname
--- Make sure controlfile location in the standby init.ora is pointing to this location

6. Startup the standby database in mount state

sqlplus '/ as sysdba';
SQL> startup mount;

7. On Primary -VERY IMPORTANT STEP.DO NOT MISS

8. On Primary

SQL> alter system set LOG_ARCHIVE_DEST_STATE_2=enable;

9. Make sure the archives are shipped from primary to standby

10. Start recovery on the standby database.

SQL> recover automatic standby database;
SQL> recover managed standby database disconnect;

NOTE : The database might require some of the archives generated on primary for recovery. Based on the requested
archives we need to copy them from primary to standby from either of the following locations using scp commamd

/$sid/arch/ArchiveOnline
/$sid/backup/

scp command : scp $db_hostname $db_rmdc_hostname:/$sid/arch

If the number of archives from primary to standby is very high then standby instance can stay in mount state with the standby control file in Oracle Home and ask for a refresh of /$inst_name/oradata from primary to standby


11. Verify the managed recovery process at standby

On Primary
==========
SQL> archive log list

On Standby
==========
1.SQL> SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;

To Verify Managed recovery process running the above query should display Processes MRP or MRP0.

2.Verify that the new archived redo log was applied.

SQL> SELECT SEQUENCE#,APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;

No comments: