Académique Documents
Professionnel Documents
Culture Documents
Many parts
Too many log files
CRS integration not 100% (11.1)
Data Guard non-RAC without Broker
LNS RFS
Standby
Primary
Data Guard non-RAC with Broker
Redo
LNS RFS
Primary Standby
NSVn
DRCn
Data, SQL
NSVn DRCn
RSM RSM
DMON DMON
Config files
Config files
Data Guard on RAC with Broker
Node2 Node2
Redo
LNS RFS
LNS RFS INVS
INVS
NSVn
DRCn NSVn
DRCn
Node1 LNS
Data, SQL
NSVn DRCn
Primary NSVn DRCn Standby
RSM RSM
DMON DMON
DMON
DMON
Config files
Config files
Lets get started!
SID_LIST_LISTENER_$HOST =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = $DB_UNIQUE_NAME_dgmgrl)
(SID_NAME = $INSTANCE_NAME)
(ORACLE_HOME = /u01/home/oracle/11.1.0.7)
)
)
Create temporary tns entry for duplicate command
$DB_UNIQUE_NAME_TEMP =
(DESCRIPTION=
(ADDRESS= (PROTOCOL=TCP)(HOST=NODE1-vip)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SERVICE_NAME=$DB_UNIQUE_NAME_dgmgrl)))
LISTENERS_$DB_UNIQUE_NAME =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE1-vip)(PORT=1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE2-vip)(PORT=1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE3-vip)(PORT=1521))
)
LISTENER_$INSTANCE =
(ADDRESS = (PROTOCOL = TCP)(HOST = NODE-vip)(PORT = 1521))
Data Guard architecture
Configure Oracle Networking
Duplicate primary database
Cluster enable the standby
Data Guard Broker configuration
Troubleshooting
Perform a switchover test
Active Data Guard
Prepare Primary for duplication
Verify primary is in archivelog mode.
Therefore:
Delete all the entries which start with the primary instance names.
Change the instance names listed in instance_name.instance_number
entries.
Verify the standbys db_unique_name is used.
Make sure there are no duplicate entries or global (*.) entries that dont
belong.
Verify remote_listener is set to LISTENERS_$DB_UNIQUE_NAME
where $DB_UNIQUE_NAME is the standby.
Add entries for local_listener using the listener_$INSTANCE in the
tnsnames.ora file
Verify one entry for
*.log_archive_dest_1=LOCATION=USE_DB_RECOVERY_FILE_
DEST
Add one entry for *.log_archive_dest_state_1=ENABLE
Add one entry for *. log_archive_format='%t_%s_%r.dbf
Remove entry for *.instance_number=1
Edit the instance numbers for thread=, change them from the
primary instance names to the standby instance names.
Edit the instance numbers for undo_tablespace=, change them
from the primary instance names to the standby instance names.
Create new spfile in ASM
SQL> create
spfile='+$DISKGROUP_DATA/$DB_UNIQUE_NAMEs/spfile$DB_U
NIQUE_NAMEs.ora' from pfile='tmp_init.ora';
(DESCRIPTION=(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)(HOST=prod0003-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=prod0004-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=prod0005-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=drserv0063-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=drserv0064-vip)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=drserv0065-vip)(PORT=1521)) )
(CONNECT_DATA=(SERVICE_NAME=mydbprdg))
(SERVER = DEDICATED) )
Verify CRS configuration
$. oraenv
$+ASMn (where n is the ASM instance number)
$asmcmd
ASMCMD> pwd
+$DISKGROUP _DATA/$DB_UNIQUE_NAME
ASMCMD> mkdir BROKER
ASMCMD> cd +$DISKGROUP_FLASH/$DB_UNIQUE_NAME
ASMCMD> mkdir BROKER
Create empty broker config files
on primary and standby
$dgmgrl
DGMGRL>connect sys/xxx you must use sys and sys password
It means that the configuration is still in progress. Wait a few minutes and
try again
Data Guard architecture
Configure Oracle Networking
Duplicate primary database
Cluster enable the standby
Data Guard Broker configuration
Troubleshooting
Perform a switchover test
Active Data Guard
Data Guard Broker commands
dgmgrl <= enter at server prompt to access broker interface
connect sys/password
show database $DB_UNIQUE_NAME status
show database $DB_UNIQUE_NAME 'StatusReport'
show database $DB_UNIQUE_NAME 'LogXptStatus'
show database $DB_UNIQUE_NAME 'InconsistentLogXptProps'
show database $DB_UNIQUE_NAME 'InconsistentProperties'
show database verbose $DB_UNIQUE_NAME
show instance verbose $INSTANCE_NAME
Data Guard Broker instance properties
HostName(*)
SidName(*)
StaticConnectIdentifier(*)
StandbyArchiveLocation(*)
AlternateLocation(*)
LogArchiveTrace(*)
LogArchiveFormat(*)
LatestLog(*)
TopWaitEvents(*)
DGMGRL> show instance verbose mydbr1
Database
Name: mydb01pr
Role: PHYSICAL STANDBY
Enabled: YES
Intended State: APPLY-ON
Instance(s):
mydb01pr2
mydb01pr1(apply instance)
Verify log apply status
V$archive_gap often doesnt show logs are
missing, will only show gap in logs recieved
$ dgmgrl
DGMGRL> connect sys/password
DGMGRL> switchover to
$STANDBY_DB_UNIQUE_NAME
.
Performing switchover NOW, please wait...
New primary database mydbprr" is opening...
Operation requires shutdown of instance mydbprd1" on
database mydbprd"
Shutting down instance mydbprd1"...
Switchover succeeded, new primary is mydbprr"
DGMGRL>
Switchover verify
Verify that OCR/CRS shows correct state for the database.
Easy to enable.
Active Data Guard
Extra cost option (Included with Golden Gate
license)
In 11.1 RAC, turned on automatically after switchover (Be
aware in case you dont have a license)
No performance impact to primary (Except when doing
large imports)
Database altered.
Database altered.
Database altered.
Active Data Guard
Verify:
DATABASE_ROLE OPEN_MODE
---------------- ----------
PHYSICAL STANDBY READ ONLY
Fix CRS:
Bonnie J. Bizzaro
Nationwide Insurance
SAVE THE DATE!
COLLABORATE 13
April 7-11, 2013
Colorado Convention Center
Denver, Colorado
http://collaborate13.ioug.org