Académique Documents
Professionnel Documents
Culture Documents
existing DataGuard Env
1 Introduction
1.1 Purpose & Scope
This document is intended as a step by step Dataguard Configuration & Operation Guide
between CPSTEST Prod Primary Servers & CPSTEST Prod Standby Servers.
1.3 Definitions and Acronyms
Acronym Definitions
1.4 Audience
It is assumed that the intended audience has a general knowledge of database technology.
Database Administrators
Performing a Switchover
System altered.
System altered.
DEVU009N4
System altered.
System altered.
DEVU009N3
System altered.
DEVU009N4
System altered.
cpstest_j =
(DESCRIPTION =
(ADDRESS_LIST =
)
(CONNECT_DATA =
(SERVICE_NAME = cpstest_j)
)
)
cpstest_f =
(DESCRIPTION =
(ADDRESS_LIST =
)
(CONNECT_DATA =
)
)
DEVU009N3
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
)
)
DEVU009N4
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
)
)
devu009n3 $ pwd
/u01/oracle
devu009n3 $ dgmgrl
Connected.
Step 3 Create the broker configuration (Note: content in quotes is case sensitive)
Configuration
Name: cpstest_dgb
Enabled: NO
Databases:
DISABLED
Enabled.
Configuration
Name: cpstest_dgb
Enabled: YES
Protection Mode: MaxAvailability
Databases:
SUCCESS
Database altered.
8 rows selected.
SQL>
This will create logfiles in both the +FRA and +DATA diskgroups. Only one is required in
+FRA so the +DATA logfiles can be removed. The below SQL will provide the syntax required
for this:
SQL> select ‘alter database drop standby logfile member ”’ || member || ”’;’ from v$logfile
DEVU009N4
DEVU009N4
Oracle 10g can manage the deletion of archivelogs on the Standby side of a DataGuard setup.
This is done by setting the below policy in a RMAN session into the standby database:
Please note that whenever switchover or failover is carried out unless only for a short time this
setting should be toggled between “NONE” and “APPLIED ON STANDBY” on the primary and
standby sides respectively.
Check DGMGRL for indication of a healthy DataGuard setup again – i.e. “SUCCESS” – this may
take a few minutes for this to be returned.
Configuration
Name: cpsetst_dgb
Enabled: YES
Databases:
CPSTEST_J – Primary database
SUCCESS
On either the primary or the standby side start a DGMGRL session and issue the following:
devu009n4 $ dgmgrl
Connected.
Configuration
Name: cpstest_dgb
Enabled: YES
Databases:
Database dismounted.
Database dismounted.
Database mounted.
Database mounted.
Name: cpstest_dgb
Enabled: YES
Databases:
SUCCESS
DATABASE_ROLE OPEN_MODE
—————- ———-
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 – 64bit
Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
devu009n4 $
) TIME_APPLIED
INST_NAME
—————-
HOST_NAME
—————————————————————-
TIME_APPLIED LOG_GAP
————– ———-
cpstest
devu009n3
14/05 11:34:24 0
TIMESTAMP
———
MESSAGE
——————————————————————————–
14-MAY-10
14-MAY-10
91.718685471′
TIMESTAMP
———
MESSAGE
——————————————————————————–
14-MAY-10
50 rows selected.
If switchover or failover is carried out and not intended to be reverted within a few hours the
RMAN archivelog deletion policy setting should be changed on both databases. The following
indicates which setting is correct for each side:
Primary Side:
Standby Side:
RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
You might want to use your physical standby database temporarily for reporting applications. To
change the state of the standby database to read-only.
Succeeded.
Note:- Opening the standby database in readonly may not be possible if you have turned on
auditing which is seen from audit_trail=db init.ora parameter. You have to change the value to
open in readonly.