Documente Academic
Documente Profesional
Documente Cultură
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
log_archive_dest_1='LOCATION=+DG_CEPIXLT_AR VALID_FOR=(ALL_LOGFILES,
ALL_ROLES) DB_UNIQUE_NAME=CEPIXLT_PRIMARY';
ls -l /dev/oracleasm/disks/*FRA*
comment
1
6
7
DG Setup steps
Primary should be in Archive log mode
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
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
lnxdb-stg3-013
PRIMARY lnxdb-stg3-014
5 Initialization file STANDBY lnxdb-stg4-013
lnxdb-stg4-014
lnxdb-stg4-013
8 add target entries STANDBY
lnxdb-stg4-013
9(a) Setup listener on standby STANDBY lnxdb-stg4-014
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
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
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#;
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
STANDBY lnxdb-stg4-013
PRIMARY lnxdb-stg3-014
5 startup other nodes STANDBY lnxdb-stg4-013
STANDBY lnxdb-stg4-014
lnxdb-stg3-013
lnxdb-stg3-014
6
lnxdb-stg4-013
lnxdb-stg4-014
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
lnxdb-stg3-013
5a Register the Listener with GRID on Primary Primary
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
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.
Configure Observer
. Oraenv - OBSRV
1 Edit tnsnames.ora Observor obsrv-nprd-1
lnxdb-stg3-013/014
4 copy password file to all DC2 nodes Primary to standby lnxdb-stg4-013/014
8 Set the default user and password for the walleObservor obsrv-nprd-1
NOTE: Ignore any DG related errors in the DRC log temporarily until the config is complete
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
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';
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;
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
---------------------------
`
comment Status
DG port first
Please change the
hostname/SID name for other
nodes
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
1.2 Planned DC2 > DC1 Set aq_tm_processes and job_queue_processes to 0 Database Manual
and record the original value
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)
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
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
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