Sunteți pe pagina 1din 52

# Step / Task Database Instances

2 Verify the database force logging and Archive log mode All All
3 Copy standard scripts and MVDC scripts from cruise All All

Check log_archive_dest_1 Pn Pn

Check log_archive_dest_2 Pn Pn

Do the filesystem, storage validation Pn/Sn Pn/Sn


check datafiles, redo & permissions All All
Validate ssh between DC1 and DC2 servers All All

Please verify the Flashback storage All All


command
select force_logging,log_mode from gv$database;

log_archive_dest_1='LOCATION=+DG_CEPIXLT_AR VALID_FOR=(ALL_LOGFILES,
ALL_ROLES) DB_UNIQUE_NAME=CEPIXLT_PRIMARY';

log_archive_dest_2='SERVICE=CEPIXLT_STANDBY LGWR SYNC AFFIRM reopen=10


NET_TIMEOUT=30 VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE)
DB_UNIQUE_NAME=CEPIXLT_STANDBY max_connections=5'

Follow ATS architecture "Database File system Standard"


Use ASM DOC
ssh <server_name>

ls -l /dev/oracleasm/disks/*FRA*
comment
1

6
7
DG Setup steps
Primary should be in Archive log mode

Primary should be in Force Logging

Create OraPWD and copy to all instances


orapwd file=orapw<SID> password=<SYS's password>

Create Stand by redos (primary +1 for stand by)

REDO Thread 1 Creation


ALTER DATABASE ADD standby LOGFILE THREAD 1 GROUP 9 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_1_9a.log','+DG_CEPIXLT_R
ALTER DATABASE ADD standby LOGFILE THREAD 1 GROUP 10 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_1_10a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 1 GROUP 11 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_1_11a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 1 GROUP 12 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_1_12a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 1 GROUP 13 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_1_13a.og','+DG_CEPIXLT

REDO Thread 2 Creation


ALTER DATABASE ADD standby LOGFILE THREAD 2 GROUP 14 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_2_14a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 2 GROUP 15 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_2_15a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 2 GROUP 16 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_2_16a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 2 GROUP 17 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_2_17a.log','+DG_CEPIXLT
ALTER DATABASE ADD standby LOGFILE THREAD 2 GROUP 18 ('+DG_CEPIXLT_RC/oraredo/stdby_redo_2_18a.log','+DG_CEPIXLT

Primary init.ora:
############################ DG PARAMS #######################
DB_UNIQUE_NAME='CEPIXLT_PRIMARY'
_LOG_ARCHIVE_CALLOUT='LOCAL_FIRST=TRUE'
##COMMON TO BOTH PRIMARY AND STANDBY ROLES
log_archive_config ='DG_CONFIG=(CEPIXLT_PRIMARY, CEPIXLT_STANDBY)'
log_archive_dest_1='LOCATION=+DG_CEPIXLT_AR VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=CEP
log_archive_dest_2='SERVICE=CEPIXLT_STANDBY LGWR SYNC AFFIRM reopen=10 NET_TIMEOUT=30 VALID_FOR=(O
log_archive_dest_state_1=enable
log_archive_dest_state_2=enable (can set it to defer, if you want to defer the shipping of logs until the standby is ready to acce
log_archive_max_processes=10
log_archive_format='%t_%s_%r.dbf'
remote_login_passwordfile=EXCLUSIVE

#SPECIFIC TO STANDBY ROLE


FAL_CLIENT=CEPIXLT_PRIMARY
FAL_SERVER=CEPIXLT_STANDBY
standby_file_management=auto
# SPECIFIC TO RECOVERY
parallel_max_servers=16 (4 times the # of cpu’s)
parallel_execution_message_size=32768
recovery_parallelism=8
parallel_threads_per_cpu=4

Standby init.ora:

DB_UNIQUE_NAME='CEPIXLT_STANDBY'
log_archive_config='DG_CONFIG=(CEPIXLT_PRIMARY, CEPIXLT_STANDBY)'
log_archive_dest_1='LOCATION=+DG_CEPIXLT_AR VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=CEP
log_archive_dest_2='SERVICE=CEPIXLT_PRIMARY LGWR SYNC AFFIRM reopen=10 NET_TIMEOUT=30 VALID_FOR=(ON
log_archive_dest_state_1=enable
log_archive_dest_state_2=enable
log_archive_max_processes=10
log_archive_format='%t_%s_%r.dbf'
remote_login_passwordfile=EXCLUSIVE

#SPECIFIC TO STANDBY ROLE


FAL_CLIENT='CEPIXLT_STANDBY'
FAL_SERVER='CEPIXLT_PRIMARY'
standby_archive_dest='/archive5/CEPIXLT/CEPIXLT.arch'
standby_file_management='auto'
# SPECIFIC TO RECOVERY
parallel_max_servers=16
parallel_execution_message_size=32768
recovery_parallelism=16
parallel_threads_per_cpu=4
Step Env Host
1 Archive log enable PRIMARY lnxdb-stg3-013
PRIMARY lnxdb-stg3-013

2 Add standby redolog STANDBY lnxdb-stg4-013

3 Create Database Password File PRIMARY lnxdb-stg3-013

4 check filesystem STANDBY lnxdb-stg4-013


lnxdb-stg4-014

lnxdb-stg3-013
PRIMARY lnxdb-stg3-014
5 Initialization file STANDBY lnxdb-stg4-013
lnxdb-stg4-014

6 create standby control file PRIMARY lnxdb-stg3-013

7 copy datafiles from source PRIMARY lnxdb-stg3-013

lnxdb-stg4-013
8 add target entries STANDBY

9 Mount other instance STANDBY lnxdb-stg4-013

lnxdb-stg4-013
9(a) Setup listener on standby STANDBY lnxdb-stg4-014

PRIMARY ALL instances


10 Set up communication STANDBY

Verify logfile STANDBY

14 Check recovery and verify standby db STANDBY lnxdb-stg4-013


description
ACTIVE
Alter database force logging;

add standby redo log groups to primary database. >>> attached WordPad Document
Manually create the standby in DC1 as well as in DC2
As soon as the standby redo logs are cleared.Remove the below entry from the init.ora and then
bounce the standby database.
log_file_name_covert = 'xx','xx'
ORA-19527 -- error message

cd $ORACLE_HOME/dbs
orapwd file=orapw<SID> password=<SYS's password>
Copy this file to primary node 2, ALL stby RAC nodes

check all required filesystem for standby database

Set DG parameters in primary db.


Copy init file from primary to standby DB and validate parameter
Set DG parameters in standby db.

On primary instance (source)


ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/standby_cep.ctl';

copy controlfile, datafiles and redologs to target

startup nomount
alter database mount standby database;
ALTER DATABASE RECOVER managed standby database using current logfile disconnect;

startup mount;
select name,DBID,CREATED,OPEN_MODE,DATABASE_ROLE,DATAGUARD_BROKER from v$database;

setup listener.ora with new listener for standby node 1, node 2 , node 3 and node 4 WordPad Document

Edit tnsnames.ora and add communication entries


sqlnet.ora:
RECV_BUF_SIZE=3750000
WordPad Document
SEND_BUF_SIZE=3750000

tnsnames.ora: primary, standby


verify standby logfile for any issues.

check last archive file applied/received on standby: (make few swtches on primary and notice
shipping/recovery is happening)
select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;
select thread#,max(sequence#) from v$archived_log group by thread#;

Select thread#, sequence#, applied, to_char(first_time, 'mm/dd/yy hh24:mi:ss') first,


to_char(next_time, 'mm/dd/yy hh24:mi:ss') next, to_char(completion_time, 'mm/dd/yy hh24:mi:ss')
completion
from v$archived_log order by first_time;
Comment

WordPad Document

To be done during golive(observer setup phase)

Refer Pre-Work section

WordPad Document WordPad Document

WordPad Document

WordPad Document
Go live steps
# Step / Task Database Instances
Configure Data Guard Broker
1 Backup init.ora STANDBY ALL
PRIMARY ALL
STANDBY lnxdb-stg4-013/014
2 Create spfile ALL nodes
PRIMARY lnxdb-stg3-013/014
STANDBY lnxdb-stg4-013
3 Shutdown and Startup database STANDBY lnxdb-stg4-013

PRIMARY lnxdb-stg3-013

lnxdb-stg3-013/014
PRIMARY

Enable flashback database lnxdb-stg4-013/014


STANDBY
Shutdown
4 STANDBY lnxdb-stg4-013
Mount & enable flashback
PRIMARY lnxdb-stg3-013
Open database
PRIMARY lnxdb-stg3-013

STANDBY lnxdb-stg4-013
PRIMARY lnxdb-stg3-014
5 startup other nodes STANDBY lnxdb-stg4-013
STANDBY lnxdb-stg4-014

lnxdb-stg3-013

initialization parameters for DG broker PRIMARY

lnxdb-stg3-014

6
lnxdb-stg4-013

initialization parameters for DG broker STANDBY

lnxdb-stg4-014

7 Set Local Listener on first instances PRIMARY lnxdb-stg3-013

STANDBY lnxdb-stg4-013
lnxdb-stg3-013/014
8 Update Tnsnames.ora file on Primary Primary

lnxdb-stg4-013/014
9 Update Tnsnames.ora file on standby Standby
lnxdb-stg3-013/014
10 Update listener.ora for DG LISTENER PRIMARY

Update listener.ora for DB LISTENER PRIMARY lnxdb-stg3-013/014

11 Update listener.ora for DG LISTENER STANDBY lnxdb-stg4-013


Update listener.ora for DB LISTENER STANDBY lnxdb-stg4-013/014

12 Update tnsnames.ora for CEPIXLT_PRIMARY and lnxdb-stg3-013/014


PRIMARY
CEPIXLT_STANDBY
13 Update tnsnames.ora for CEPIXLT_PRIMARY and lnxdb-stg4-013/014
STANDBY
CEPIXLT_STANDBY

14 Tnsping all entries PRIMARY/STBY ALL

Modify / Register the DB info with GRID


on Primary
1 Remove database from OCR
2 Set START_OPTIONS option to mount in OCR
Primary lnxdb-stg3-013
3 Register the DB with GRID on Primary

lnxdb-stg3-013
5a Register the Listener with GRID on Primary Primary

Check listener.ora, tnsnames.ora Primary lnxdb-stg3-013/014

11 Verify status of listener in GRID Primary lnxdb-stg3-013/014

13 Validate Primary in OCR config Primary lnxdb-stg3-013

Add / Register the DB info with GRID on


Standby
14 Remove database from OCR
15 Set START_OPTIONS option to mount in OCR
STANDBY lnxdb-stg4-013
STANDBY lnxdb-stg4-013
16 Register the DB with GRID on Primary

21 Register the Listener with GRID on Primary STANDBY lnxdb-stg4-013

Check listener.ora, tnsnames.ora Standby lnxdb-stg4-013/014

24 Verify status of listener in GRID STANDBY lnxdb-stg4-013/014

26 Validate STANDBY in OCR config STANDBY lnxdb-stg4-013

Primary ALL
dump spfile to pfile and validate DG config paramet
27 Standby All
Create Data Guard Broker Configuration
Primary
1 Validate Local_listener for correct port and vip All instances
Standby

Primary
2 Validate DG listener port All instances
Standby

4 Create configuration on Primary from dgmgrl Primary lnxdb-stg3-013


2. Add Physical standby database to the
5 Primary lnxdb-stg3-013
configuration from dgmgrl
Stop here and Verify spfile for DG and key
parameters before enabling configuration
6 Enable configuration Primary lnxdb-stg3-013

Validate configuration Primary lnxdb-stg3-013

7 Set broker properties to sync with spfile Primary lnxdb-stg3-013

Change the overall protection mode for the


8 Primary lnxdb-stg3-013
primary

Primary lnxdb-stg3-013
Change spfile inconsistent values
9 Standby lnxdb-stg4-013
Validate the changed values and check for
10 LogXptStatus, InconsistentProperties, and Primary lnxdb-stg3-013
InconsistentLogXptProps
properties.

11 Validate configuration Primary lnxdb-stg3-013

Configure Observer
. Oraenv - OBSRV
1 Edit tnsnames.ora Observor obsrv-nprd-1

Edit tnsnames.ora Observer obsrv-nprd-1

Ensure connectivity to the primary and standby


2 Observor obsrv-nprd-1
databases
3 Create user mvdcobserver with sysdba privilegPrimary lnxdb-stg3-013

lnxdb-stg3-013/014
4 copy password file to all DC2 nodes Primary to standby lnxdb-stg4-013/014

5 Validate remote connectivity with this user Observor obsrv-nprd-1

6 Enter the Wallet location in sqlnet.ora Observor obsrv-nprd-1

7 Create directories Observor obsrv-nprd-1


7 create the wallet Observor obsrv-nprd-1

8 Set the default user and password for the walleObservor obsrv-nprd-1

9 Create start and stop scripts Observor obsrv-nprd-1

Enable Fast Start Failover (FSFO)


1 Enable FSFO Primary lnxdb-stg3-013
2 Change the threshold value for FSFO Primary lnxdb-stg3-013
3 To verify the readiness of the FSFO Primary lnxdb-stg3-013

Verify FSFO in standby Standby lnxdb-stg4-013


Verify SJ ldap.ora, sqlnet.ora, tnsnames.ora, Primary All instances
listener.ora Standby
Go live steps
Commands

cd $ORACLE_HOME/dbs; cp initCEPIXLT.ora initCEPIXLT.ora_working_preDGB


cd $ORACLE_HOME/dbs; cp initCEPIXLT.ora initCEPIXLT.ora_working_preDGB
Create spfile from pfile;
Create spfile from pfile;
alter database recover managed standby database cancel;
srvctl stop database -d CEPIXLT -o immediate
srvctl start database -d CEPIXLT -o mount
srvctl stop database -d CEPIXLT -o immediate
srvctl start database -d CEPIXLT
alter system set db_recovery_file_dest_size=90G scope=BOTH
alter system set db_recovery_file_dest = '+DG_CEPIXLT_FRA' scope=BOTH;
alter system set db_flashback_retention_target=90 scope=BOTH;

alter system set db_recovery_file_dest_size=90G scope=BOTH


alter system set db_recovery_file_dest = '+DG_CEPIXLT_FRA' scope=BOTH;
alter system set db_flashback_retention_target=90 scope=BOTH;
srvctl stop database -d CEPIXLT -o immediate
srvctl stop database -d CEPIXLT -o immediate
starup mount;
alter database flashback on;
alter database open;
startup mount;
alter database flashback on;
startup other nodes nodes in DC1
ALTER DATABASE RECOVER managed standby database using current logfile disconnect;
startup mount other nodes in DC2

alter system set DG_BROKER_CONFIG_FILE1 ='+DG_CEPIXLT_RC/dg_broker_config/DG_CEPIXLT_Primary_01' scope=BOTH;


alter system set DG_BROKER_CONFIG_FILE2 ='+DG_CEPIXLT_RC_M/dg_broker_config/DG_CEPIXLT_Primary_02’ scope=BOTH;
alter system set DG_BROKER_START=TRUE scope=BOTH;

alter system set DG_BROKER_CONFIG_FILE1 ='+DG_CEPIXLT_RC/dg_broker_config/DG_CEPIXLT_Primary_01' scope=spfile;


alter system set DG_BROKER_CONFIG_FILE2 ='+DG_CEPIXLT_RC_M/dg_broker_config/DG_CEPIXLT_Primary_02’ scope=spfile;
alter system set DG_BROKER_START=TRUE scope=spfile;

alter system set DG_BROKER_CONFIG_FILE1 ='+DG_CEPIXLT_RC/dg_broker_config/DG_CEPIXLT_Standby_01' scope=BOTH;


alter system set DG_BROKER_CONFIG_FILE2 ='+DG_CEPIXLT_RC_M/dg_broker_config/DG_CEPIXLT_Standby_02’ scope=BOTH;
alter system set DG_BROKER_START=TRUE scope=BOTH;

alter system set DG_BROKER_CONFIG_FILE1 ='+DG_CEPIXLT_RC/dg_broker_config/DG_CEPIXLT_Standby_01' scope=spfile;


alter system set DG_BROKER_CONFIG_FILE2 ='+DG_CEPIXLT_RC_M/dg_broker_config/DG_CEPIXLT_Standby_02’ scope=spfile;
alter system set DG_BROKER_START=TRUE scope=spfile;

NOTE: Ignore any DG related errors in the DRC log temporarily until the config is complete

alter system set local_listener=CEPIXLT1_LOCAL scope=both sid='CEPIXLT1';


alter system set local_listener=CEPIXLT2_LOCAL scope=both sid='CEPIXLT2';
CEPIXLT1_LOCAL,CEPIXLT1_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-stg3-013-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-stg3-013-vip.cisco.com)(PORT=1529))
)

CEPIXLT2_LOCAL,CEPIXLT2_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-pts-vm-014-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-pts-vm-014-vip.cisco.com)(PORT=1529))
)

CEPIXLT3_LOCAL,CEPIXLT3_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-pts-vm-029-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-pts-vm-029-vip.cisco.com)(PORT=1529))
)

CEPIXLT4_LOCAL,CEPIXLT4_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-pts-vm-030-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-pts-vm-030-vip.cisco.com)(PORT=1529))
)

CEPIXLT1_LOCAL,CEPIXLT1_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-stg4-013-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-stg4-013-vip.cisco.com)(PORT=1529))
)

CEPIXLT2_LOCAL,CEPIXLT2_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-pts2-vm-014-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-pts2-vm-014-vip.cisco.com)(PORT=1529))
)

CEPIXLT3_LOCAL,CEPIXLT3_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-pts2-vm-029-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-pts2-vm-029-vip.cisco.com)(PORT=1529))
)

CEPIXLT4_LOCAL,CEPIXLT4_LOCAL.cisco.com=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=lnxdb-pts2-vm-030-vip.cisco.com)(PORT=1629))
(ADDRESS=(PROTOCOL=tcp)(HOST=lnxdb-pts2-vm-030-vip.cisco.com)(PORT=1529))
)
Please change host name to reflect the correct host info
LISTENER_MVDC_CEPIXLT =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = lnxdb-stg3-013-vip.cisco.com)(SEND_BUF_SIZE=3750000)(RECV_BUF_SIZE=3750000)(Port = 1629))
)

SID_LIST_LISTENER_MVDC_CEPIXLT =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = CEPIXLT_PRIMARY_DGMGRL.cisco.com)
(SDU = 32768)
(TDU = 32768)
(ORACLE_HOME =/oracle/product/11.2.0.3/CEPIXLT)
(SID_NAME = CEPIXLT1)
)
)

LISTENER_CEPIXLT =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-013-vip)(PORT = 1529)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-013)(PORT = 1529)(IP = FIRST))
)
)
SID_LIST_LISTENER_CEPIXLT =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/11.2.0.3/CEPIXLT)
(PROGRAM = extproc)
)
(SID_DESC=
(SID_NAME=CEPIXLT1)
(ORACLE_HOME=/oracle/product/11.2.0.3/CEPIXLT)
)
)

LISTENER_MVDC_CEPIXLT =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(Host = lnxdb-stg4-013-vip.cisco.com)(SEND_BUF_SIZE=3750000)(RECV_BUF_SIZE=3750000)(Port = 1629))
)

SID_LIST_LISTENER_MVDC_CEPIXLT =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = CEPIXLT_STANDBY_DGMGRL.cisco.com)
(SDU = 32768)
(TDU = 32768)
(ORACLE_HOME =/oracle/product/11.2.0.3/CEPIXLT)
(SID_NAME = CEPIXLT1)
)
)
LISTENER_CEPIXLT =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-013-vip)(PORT = 1529)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-013)(PORT = 1529)(IP = FIRST))
)
)
SID_LIST_LISTENER_CEPIXLT =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/11.2.0.3/CEPIXLT)
(PROGRAM = extproc)
)
(SID_DESC=
(SID_NAME=CEPIXLT1)
(ORACLE_HOME=/oracle/product/11.2.0.3/CEPIXLT)
)
)

CEPIXLT_PRIMARY,CEPIXLT_PRIMARY.CISCO.COM =
(DESCRIPTION =
(LOAD_BALANCE=NO)
(FAILOVER=YES)
(SDU = 32768)
(TDU = 32768)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-013-vip.cisco.com)(PORT = 1629))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-014-vip.cisco.com)(PORT = 1629))
)
(CONNECT_DATA =
(SERVICE_NAME = CEPIXLT_PRIMARY.CISCO.COM)
)
)

CEPIXLT_STANDBY,CEPIXLT_STANDBY.CISCO.COM =
(DESCRIPTION =
(LOAD_BALANCE=NO)
(FAILOVER=YES)
(SDU = 32768)
(TDU=32768)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-013-vip.cisco.com)(PORT = 1629))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-014-vip.cisco.com)(PORT = 1629))
) (CONNECT_DATA =
(SERVICE_NAME = CEPIXLT_STANDBY.CISCO.COM)
)
)
CEPIXLT_PRIMARY,CEPIXLT_PRIMARY.CISCO.COM =
(DESCRIPTION =
(LOAD_BALANCE=NO)
(FAILOVER=YES)
(SDU = 32768)
(TDU = 32768)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-013-vip.cisco.com)(PORT = 1629))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-014-vip.cisco.com)(PORT = 1629))
)
(CONNECT_DATA =
(SERVICE_NAME = CEPIXLT_PRIMARY.CISCO.COM)
)
)

CEPIXLT_STANDBY,CEPIXLT_STANDBY.CISCO.COM =
(DESCRIPTION =
(LOAD_BALANCE=NO)
(FAILOVER=YES)
(SDU = 32768)
(TDU=32768)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-013-vip.cisco.com)(PORT = 1629))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-014-vip.cisco.com)(PORT = 1629))
) (CONNECT_DATA =
(SERVICE_NAME = CEPIXLT_STANDBY.CISCO.COM)
)
)

tnsping

srvctl remove database -d CEPIXLT


srvctl add database -d CEPIXLT_PRIMARY -o /oracle/product/11.2.0.3/CEPIXLT -s mount -r PRIMARY

srvctl add instance -d CEPIXLT_PRIMARY -i CEPIXLT1 -n lnxdb-stg3-013


srvctl add instance -d CEPIXLT_PRIMARY -i CEPIXLT2 -n lnxdb-stg3-014

srvctl add listener -l LISTENER_CEPIXLT -p 1529 -o /oracle/product/11.2.0.3/CEPIXLT


srvctl add listener -l LISTENER_MVDC_CEPIXLT -p 1629 -o /oracle/product/11.2.0.3/CEPIXLT

verify all entries for any duplicate

/oracle/product/grid_home/bin/crsctl status resource|grep lsnr


srvctl config listener
srvctl start listener
srvctl config database -d CEPIXLT_PRIMARY -a

srvctl remove database -d CEPIXLT


srvctl add database -d CEPIXLT_STANDBY -o /oracle/product/11.2.0.3/CEPIXLT -s mount -r PHYSICAL_STANDBY
srvctl add instance -d CEPIXLT_STANDBY -i CEPIXLT1 -n lnxdb-stg4-013
srvctl add instance -d CEPIXLT_STANDBY -i CEPIXLT2 -n lnxdb-stg4-014

srvctl add listener -l LISTENER_CEPIXLT -p 1529 -o /oracle/product/11.2.0.3/CEPIXLT


srvctl add listener -l LISTENER_MVDC_CEPIXLT -p 1629 -o /oracle/product/11.2.0.3/CEPIXLT

verify all entries for duplicate

/oracle/product/grid_home/bin/crs_stat | grep -I lsnr


srvctl config listener
srvctl start listener
srvctl config database -d CEPIXLT_STANDBY -a

create pfile='initCEPIXLT_dgb' from spfile


create pfile='initCEPIXLT_dgb' from spfile

Open tnsnames.ora and check vip and DG port 1629

lsnrctl services LISTENER_MVDC_CEPIXLT


lsnrctl services LISTENER_CEPIXLT

CREATE CONFIGURATION DR_CEPIXLT AS PRIMARY DATABASE IS 'CEPIXLT_PRIMARY' CONNECT IDENTIFIER IS CEPIXLT_PRIMARY;


ADD DATABASE 'CEPIXLT_STANDBY' AS CONNECT IDENTIFIER IS CEPIXLT_STANDBY MAINTAINED AS PHYSICAL;

DGMGRL > enable configuration

show configuration
show database verbose 'CEPIXLT_PRIMARY'
show database verbose 'CEPIXLT_STANDBY'
show instance verbose 'CEPIXLT1' on database 'CEPIXLT_PRIMARY';
show instance verbose 'CEPIXLT2' on database 'CEPIXLT_PRIMARY';
show instance verbose 'CEPIXLT1' on database 'CEPIXLT_STANDBY';
show instance verbose 'CEPIXLT2' on database 'CEPIXLT_STANDBY';

EDIT DATABASE 'CEPIXLT_PRIMARY' SET PROPERTY 'LogXptMode'='SYNC';


EDIT DATABASE 'CEPIXLT_PRIMARY' SET PROPERTY 'MaxConnections'='5';
EDIT DATABASE 'CEPIXLT_PRIMARY' SET PROPERTY 'ReopenSecs'='10';
EDIT DATABASE 'CEPIXLT_PRIMARY' SET PROPERTY 'NetTimeout'='30';

EDIT DATABASE 'CEPIXLT_STANDBY' SET PROPERTY 'LogXptMode'='SYNC';


EDIT DATABASE 'CEPIXLT_STANDBY' SET PROPERTY 'MaxConnections'='5';
EDIT DATABASE 'CEPIXLT_STANDBY' SET PROPERTY 'ReopenSecs'='10';
EDIT DATABASE 'CEPIXLT_STANDBY' SET PROPERTY 'NetTimeout'='30';

DGMGRL> Edit configuration set protection mode as maxavailability;

alter system set archive_lag_target=0 scope=BOTH sid='*';


ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH sid='*';
alter system set archive_lag_target=0 scope=BOTH sid='*';
ALTER SYSTEM SET log_archive_min_succeed_dest=1 SCOPE=BOTH sid='*';
show database 'CEPIXLT_PRIMARY' StatusReport;
show database 'CEPIXLT_PRIMARY' 'InconsistentProperties';
SHOW DATABASE 'CEPIXLT_PRIMARY' 'LogXptStatus';
show database 'CEPIXLT_STANDBY' StatusReport;
show database 'CEPIXLT_STANDBY' 'InconsistentProperties';

/opt/oracle/dg_CEPIXLT.sh > Create this script if not already exist


run as => ./dg_CEPIXLT.sh > dg_CEPIXLT.log -> validate output

dgmgrl sys/manager <<EOF


show configuration verbose
show database verbose 'CEPIXLT_PRIMARY'
show database verbose 'CEPIXLT_STANDBY'
show instance verbose 'CEPIXLT1' on database 'CEPIXLT_PRIMARY';
show instance verbose 'CEPIXLT2' on database 'CEPIXLT_PRIMARY';
show instance verbose 'CEPIXLT1' on database 'CEPIXLT_STANDBY';
show instance verbose 'CEPIXLT2' on database 'CEPIXLT_STANDBY';
exit
EOF

cp tnsnames.ora_mmddyyyy tnsnames.ora

CEPIXLT_PRIMARY,CEPIXLT_PRIMARY.CISCO.COM =
(DESCRIPTION =
(LOAD_BALANCE=NO)
(FAILOVER=YES)
(SDU = 32768)
(TDU = 32768)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-013-vip.cisco.com)(PORT = 1629))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg3-014-vip.cisco.com)(PORT = 1629))
)
(CONNECT_DATA =
(SERVICE_NAME = CEPIXLT_PRIMARY.CISCO.COM)
)
)

CEPIXLT_STANDBY,CEPIXLT_STANDBY.CISCO.COM =
(DESCRIPTION =
(LOAD_BALANCE=NO)
(FAILOVER=YES)
(SDU = 32768)
(TDU=32768)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-013-vip.cisco.com)(PORT = 1629))
(ADDRESS = (PROTOCOL = TCP)(HOST = lnxdb-stg4-014-vip.cisco.com)(PORT = 1629))
) (CONNECT_DATA =
(SERVICE_NAME = CEPIXLT_STANDBY.CISCO.COM)
)
)

tnsping CEPIXLT_PRIMARY
tnsping CEPIXLT_STANDBY
create user mvdcobserver identified by observer;
grant sysdba to mvdcobserver;
grant CISCO_STD_ADMIN to mvdcobserver;

Copy from 1st primary node to all remaining nodes


"select * from v$pwfile_users;" for mvdcobserver user

dgmgrl mvdcobserver/observer@CEPIXLT_PRIMARY
dgmgrl mvdcobserver/observer@CEPIXLT_STANDBY

WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /oracle/product/OBSERVOR/CEPIXLT/wallet)
)
)
SQLNET.WALLET_OVERRIDE = TRUE

mkdir -p /oracle/product/OBSERVOR/CEPIXLT/wallet
mkstore -create -wrl /oracle/product/OBSERVOR/CEPIXLT/wallet
mkstore -wrl /oracle/product/OBSERVOR/CEPIXLT/wallet -createEntry oracle.security.client.default_username mvdcobserver
mkstore -wrl /oracle/product/OBSERVOR/CEPIXLT/wallet -createEntry oracle.security.client.default_password observer

cd /oracle/product/OBSERVOR
vi CEPIXLT_start.sh --> start script

contents of CEPIXLT_start.sh
---------------------
dgmgrl -logfile /oracle/product/OBSERVOR/observer_CEPIXLT.log /@CEPIXLT_PRIMARY <<EOF
start observer file='/oracle/product/OBSERVOR/CEPIXLT.dat';
exit
EOF
--------------------------
vi CEPIXLT_stop.sh --> stop script
contents of CEPIXLT_stop.sh
-------------------------------
dgmgrl -logfile /oracle/product/OBSERVOR/observer_CEPIXLT.log /@CEPIXLT_PRIMARY <<EOF
stop observer
exit
EOF
---------------------------

ENABLE FAST_START FAILOVER;


EDIT CONFIGURATION SET PROPERTY FASTSTARTFAILOVERTHRESHOLD=300;
SHOW CONFIGURATION VERBOSE;

COL FS_FAILOVER_OBSERVER_HOST FORMAT A20


SELECT FLASHBACK_ON, PROTECTION_LEVEL, FS_FAILOVER_OBSERVER_HOST,
FS_FAILOVER_STATUS, FS_FAILOVER_OBSERVER_PRESENT
FROM V$DATABASE;
cat /var/opt/oracle/ldap.ora

`
comment Status

scope spfile only

scope spfile only

check if Local listener is already


set
DG port first (validate only
shud have been placed in
advance)

example: 1629 is DG port,


1529 is db listener port

DG port first
Please change the
hostname/SID name for other
nodes

Please change the


hostname/SID name for other
nodes

Please change the


hostname/SID name for other
nodes
Please change the
hostname/SID name for other
nodes
*_DGMGRL* service the
listener is listening to on the
DG port should match the
service name entry in the
tnsnames.ora
check logfile:
we should see 7 SUCCESS
messages
password - cisco123
CHECK LATEST Standard Doc
format
Output should be
- ................................................
......................
# ldap.ora
# ................................................
......................
DEFAULT_ADMIN_CONTEXT =
"dc=cisco,dc=com"
DIRECTORY_SERVERS= (ldap-
ldprd:5000)
DIRECTORY_SERVER_TYPE =
OID
Integrate Test Type Test Description System Scenario Automatic or Manual
d Test Step
Use Case
ID
The following test cases need to be executed for databases that will be implemented in MVDC
0.0 Database Steady State Validation
Prep work for switchover, Comment archive utl cronjob and disable dba jobs.
failover
0.1 Planned Database is Configured for MVDC Active/Passive and Database
syncronous replication is enabled (ADL =0)

0.2 Planned Automatic Failover Capability (FSFO) enabled to meet Database


ART timings

Failure Scenarios
1.0 Database Failure
1.1 Planned DC1 > DC2 Set aq_tm_processes and job_queue_processes to 0 Database Manual
and record the original value

Perform a Switchover in a event for planned maintanence

If the application team is going to test then please reset


the original values of job_queue_processes and
aq_tm_processes. For internal testing donot reset the
value

1.2 Planned DC2 > DC1 Set aq_tm_processes and job_queue_processes to 0 Database Manual
and record the original value

Perform a Switchover in a event for planned maintanence

If the application team is going to test then please reset


the original values of job_queue_processes and
aq_tm_processes. For internal testing donot reset the
value
1.3 Planned (No Failover) SID2 is shutdown abort and SID 1 is then shutdown Database Auto
immediate
(Simulating a planned maintanence scenario where we
will do a shutdown prior to maintanence activity and do
not want to failover)

1.4 Unplanned (Failover) SID2 is shutdown immediate and then SID 1 is shutdown Database Auto
aborted (same test can be done in any sequence like
shutdown abort all the instances, only condition is last
surviving instance should be shutdown abort)

1.5 Reinstate old primary to After unplanned failover once Standby become primary Database Auto
standby after failover and broker configuration is enabled then start old primary
to reinstate to standby mode
Test Conditions and Procedures Assumptions/Constraints

Disable and comment archive utl cron job on all nodes before All the MVDC related standard scripts are setup in all the
starting switch over testing. nodes
Disable DBA Jobs
SELECT * FROM DBA_JOBS_RUNNING;
SELECT OWNER, JOB_NAME, START_DATE, END_DATE,
ENABLED FROM DBA_SCHEDULER_JOBS WHERE
ENABLED='TRUE' AND OWNER <> 'SYS'; (DG Broker will not
be killing the jobs owned by sys)
Set job_queue_processes and aq_tm_processes to 0. Make
note of this value as we have to revert back once the switchover
testing completes.
Stop the emagent that is running on that host.
select sid,username,status, program ,inst_id from gv$session
where username is not null and status='ACTIVE' order by inst_id;
Log out of all sqlplus session where we are connected as sys
set linesize 132
col value format a35
select inst_id,name,value from gv$parameter where name in
('job_queue_processes','aq_tm_processes'); (Check and
validate the value of job_queue_processes and
aq_tm_processes should be zero)

Check DG configuration status


Check if the archive logs are in sync and switch log happens.
• Dataguard is configured for synchronous mode. All DB instances in the RAC cluster are up and functional in both
• DG broker services are up and monitoring CRS and DB. DC’s.
dgmgrl sys/manager <<EOF
rem show configuration
show configuration verbose
show database verbose 'DGHPSY_PRIMARY'
show database verbose 'DGHPSY_STANDBY'
show instance verbose 'DGHPSY1' on database
Fast Start failover enabled for automatic failover..
'DGHPSY_PRIMARY'; All DB instances in the RAC cluster are up and functional in both
•showFlashback
instancedatabase enabled. on database
verbose 'DGHPSY2' DC’s.
Observer started on quorum host and monitoring the
'DGHPSY_PRIMARY';
show instance verbose 'DGHPSY1' on database
instances.
'DGHPSY_STANDBY';
set pages 50
show
set instance
lines 132 verbose 'DGHPSY2' on database
'DGHPSY_STANDBY';
select DB_UNIQUE_NAME, PROTECTION_MODE,
exit
PROTECTION_LEVEL, OPEN_MODE, DATABASE_R
EOF
OLE, SWITCHOVER_STATUS, DATAGUARD_BROKER,
•GUARD_STATUS,
Primary DB is transporting redo, and standby is
performing real time apply.
FLASHBACK_ON,FS_FAILOVER_STATUS,
On
connect as sysnodes
all Primary -
FS_FAILOVER_OBSERVER_PRESENT
on current from V$database
primary (DC1) and Issue the All the primary and standby instances are up.
alter system
/following switch logfile;
command
archive logsys/******
DGMGRL list; (make sure sys password is correct)
On Standbyswitchover
DGMGRL> recovery instance execute following sql to
to ‘DGHPSY_STANDBY’;
validate all archives are applied
SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last
Sequence Received"
, APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# -
APPL.SEQUENCE#) "Difference"
FROM
(SELECT THREAD# ,MAX(SEQUENCE#) AS SEQUENCE# FROM
V$ARCHIVED_LOG
WHERE ACTIVATION# = (select ACTIVATION# from v$database) AND
ARCHIVED
connect as ='YES' group
sys on by THREAD#
current order(DC2)
primary by THREAD#) ARCH,
and Issue the All the primary and standby instances are up.
(SELECT THREAD# ,MAX(SEQUENCE#) AS SEQUENCE# FROM
following command
V$ARCHIVED_LOG
DGMGRL sys/******= (make
WHERE ACTIVATION# sure sys password
(select ACTIVATION# is correct)
from v$database) AND
DGMGRL>
APPLIED switchover
='YES' to ‘DGHPSY_PRIMARY’;
group by THREAD# order by THREAD#) APPL
WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;
Services will be down and will not be able to login All instances on DC1 are down and all standby instances are
up.

Services will be down and will not be able to login SID2 on DC1 and both standby instances SID3 & SID4 are up.

DMON will re-instate the Failed Primary Database All the primary and standby instances are up.
Expected Results Status Actual Start Time Actual End Time
Should return SUCCESS and show configuration
should show MAxAvailability

DGMGRL> show configuration

Configuration
Name: DR_DGHPSY
Enabled: YES
Protection Mode: MaxAvailability
Fast-Start Failover: ENABLED
Databases:
DGHPSY_PRIMARY - Primary database
DGHPSY_STANDBY - Physical standby database
- Fast-Start Failover target

Current status for "DR_DGHPSY":


SUCCESS
09:48:21 OPS$ORACLE@DGHPSY1 > l
1 select DB_UNIQUE_NAME, PROTECTION_MODE, PROTECTION_LEVEL,
OPEN_MODE, DATABASE_ROLE, SWITCHOVER_STATUS,
DATAGUARD_BROKER, GUARD_STATUS,
Stanbdy should be changed to new primary and
2* FLASHBACK_ON,FS_FAILOVER_STATUS,
the old primary will be changed to new standby
FS_FAILOVER_OBSERVER_PRESENT from V$database
09:48:29 OPS$ORACLE@DGHPSY1 > /
and log shipping will start from new primary to
DB_UNIQUE_NAME PROTECTION_MODE PROTECTION_LEVEL
standby.
OPEN_MODEDB_ROLE_CHANGE
DATABASE_ROLE SWITCHOVER_STATUS trigger should
DATAGUAR be
able to take care
------------------------------
-------------------- --------
of client
-------------------- application
-------------------- ---------- failover
----------------

automatically.
GUARD_S FLASHBACK_ON FS_FAILOVER_STATUS FS_FAIL
------- ------------------ --------------------- -------
DGHPSY_PRIMARY MAXIMUM AVAILABILITY MAXIMUM
AVAILABILITY READ WRITE PRIMARY SESSIONS ACTIVE ENABLED
NONE YES SYNCHRONIZED YES

Stanbdy should be changed to new primary and


the old primary will be changed to new standby
and log shipping will start from new primary to
standby. DB_ROLE_CHANGE trigger should be
able to take care of client application failover
automatically.
Observer should not initiate a failover to DC2 as
DB will be down for planned maintenance
DG will stop redo transport
All JVM and Apps connections should be
terminated

Observer should initiate a failover to DC2 due to


last surviving instance failure (abort)
DG will stop redo transport

Broker should reinstate Standby, start redo


shipping and recovery
Actual Results/Observations Test Result Defect Detected SIR #
COMMENTS

S-ar putea să vă placă și