Mike Smith-DataGuard Tuning
Mike Smith-DataGuard Tuning
Mike Smith-DataGuard Tuning
Oracle
Maximum Availability
Architecture (MAA)
MAA
How to
y MAA is a blueprint for HA & DR
,
t
Preven
Tested, validated, and documented best
d
an
,
e
t
a
practices
r
e
Tol
er
v
o
c
y Database, Storage, Cluster,
e
R
ges
a
t
u
O
Network, & Middle Tier
From
y 20 person year effort
otn.oracle.com/deploy/availability
Maximum Availability
Architecture
Oracle9iAS
Oracle9iAS
Dedicated Network
RAC
Primary Site
-3-
Data Guard
RAC
Secondary Site
-4-
Broker
CLI is DGMGRL
Standby Databases
CLI is SQLPlus
at
ua
rd
EM Data Guard
Manager GUI
-5-
Primary Databases
CLI is SQLPlus
REDO APPLY
y Maintains a physical, block for block copy of the
Production (also called Primary) database.
SQL APPLY
y Maintains a logical, transaction for transaction copy of
the Production database.
-6-
Asynchronous/
Synchronous
Redo Shipping
Network
Backup
DIGITAL DATA STORAGE
Continuously
Open for Reports
SQL
Apply
Transform
Redo to
SQL
Additional
Indexes and
Materialized
Views
-9-
Oracle8i
Transactions
LGWR
Primary
Database
Online
Redo
Logs
ARCH
Archived Redo Logs
- 10 -
SQL*Net
RFS
Archived Redo
Logs
Transactions
Synchronous
Asynchronous
LGWR
RFS
Affirm
Noaffirm
Oracle
Net
LNS
Primary
Database
ARCH
Archived Redo Logs
- 11 -
Standby
Redo
Logs (SRL)
Online
Redo
Logs
ARCH
Oracle
Net
RFS
Archived Redo
Logs
Oracle10g - No Difference!
Buffer
Transactions
Synchronous
Asynchronous
LGWR
RFS
Oracle
Net
Affirm
Noaffirm
LNS
Primary
Database
Online
Redo
Logs
Standby
Redo
Logs
cl e
Ora
Net
ARCH
ARCH
Archived Redo Logs
- 12 -
ASYNC Transport
Oracle Database 10g Release 1
LGWR
Buffer
RFS
LNS
- 13 -
ASYNC Transport
Oracle Database 10g Release 2
LGWR
RFS
LNS
- 14 -
- 15 -
- 16 -
10.8
Default
937
Tuned
200
400
600
800
1000
Mbits/sec
Network Throughput
Setting up a Standby
Enabling Redo Transport
- 18 -
5. Best Practice
y
y
- 19 -
SQL>
SQL>
SQL>
SQL>
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
- 20 -
- 21 -
10g
2. In Oracle9i
- 23 -
y Switch logs!
y If you choose higher than Maximum Performance
- 24 -
- 25 -
- 26 -
SRL Architecture
Standby
Redo
Logs
LGWR
RFS
Archived
Redo
Logs
ARCH
New!
10g
ARCH
- 27 -
RFS
Physical
&
10g Logical
standby
databases
Benefits
y Better Performance
y Better Protection
- 28 -
- 29 -
Failure Protection
Redo Shipping
Maximum Protection
Zero Data Loss
LGWR SYNC
Must have SRL
Maximum Availability
Zero Data Loss
LGWR SYNC
Must have SRL
Maximum
Performance
LGWR ASYNC
Should have SRL
- 30 -
DBA_LOGSTDBY_UNSUPPORTED
DBA_LOGSTDBY_NOT_UNIQUE
- 32 -
- 33 -
- 35 -
Apply Services
Getting the data into the standby
- 36 -
MRP
Standby
Redo
Logs
ARCH
Archived
Redo Logs
- 37 -
MRP
Standby
Redo
Logs
Real Time
Apply
ARCH
Archived
Redo Logs
- 38 -
RFS
Archived
Redo Logs
- 39 -
LSP
Standby
Redo
Logs
ARCH
Archived
Redo Logs
- 40 -
LSP
Standby
Redo
Logs
Real Time
Apply
ARCH
Archived
Redo Logs
- 41 -
Redo Data
from
Primary
Database
Redo
Records
Reader
LCR
LCR
:
Preparer
Builder
Shared
Pool
Log Mining
Transaction
groups
Apply Processing
Datafiles
Transactions
to be applied
- 42 -
Analyzer
Coordinator
Applier
Transactions sorted
in dependency order
- 43 -
Redo Apply
y Starting apply
y Stopping apply
- 44 -
- 45 -
SQL Apply
y Starting apply
y Stopping apply
- 46 -
Role Transition
Trading Places
- 47 -
Overview
y There are two ways to change roles.
Switchover
y Changing roles with someone else and letting them take
over while you become a standby
y Switchover should be done regularly to ensure
everything works.
Failover
y Assigning someone else to take over when the original
boss goes away
y You hope you never have to do a Failover but believe
me, you will..
- 48 -
- 49 -
- 50 -
Redo Shipment
RESTART DATABASE
Physical Standby
Database
RESTART DATABASE
(Only ALTER DATABASE OPEN
necessary in Oracle Database 10g Release 2
if standby was never opened Read Only)
10g
Physical Standby
Database
- 51 -
RESTART DATABASE
1
10g
- 52 -
Redo Shipment
Logical Standby
Database
ALTER DATABASE PREPARE
TO SWITCHOVER TO
PRIMARY;
10g
- 53 -
Logical Standby
Database
DISCUSSION
Monthly
4th Thursday
6pm 8pm
IBM Center
Rocky Point