Professional Documents
Culture Documents
11g (R1/R2) Data Guard Enhancements: Suresh Gandhi
11g (R1/R2) Data Guard Enhancements: Suresh Gandhi
Suresh Gandhi
Agenda
What is DATA GUARD ?
Types of Data Guard Databases
11g Release 1 Enhancements
11g Release 2 Enhancements
Active Data guard
Snapshot Standby Database
More Features
Rolling Upgrade and Physical Standby
Q&A
2
Data Guard Overview
Data Guard
3
Provides ….
4
Data guard Databases
5
11G R1 Enhancements
Release 1
New
Features
6
R2 - Enhancements
Release 2
New
Features
7
R2- New Features
Release 2
New
Features
8
Active and Snapshot Standby
Traditional
11g Functionality
11gSnapshot
Active Standbyuntil 10g
DataGuard
9
Active Data Guard Benefits
10
Turn on Physical Standby to Active Standby
Stop redo apply
Database in
standby mount
mode
Open readonly
Open mode
changed to read
only
Status changed to
read only apply
11
Turn on Physical Standby to Snapshot Standby
Once sync check,
convert standby to
snapshot
Open database
Read write
mode
Need to close
database
Switched back to
physical standby
12
Additional Info – Active / Snapshot
WHAT OPERATION ALLOWED IN ACTIVE • SOME IMPORTANT POINTS FOR SNAPSHOT
DATA GUARD ? STANDBY DATABASE
SELECT statements • PHYSICAL STANDBY DATABASE SHOULD BE
Complex queries IN FLASHBACK MODE
Calling of stored procedures • NO REAL TIME QUERY OR DATA
Use of database links to redirect DML to • NO FAST START FAILOVER IN THIS MODE
Primary • NO SWITCHOVER/FAILOVER UNTIL
Use of stored procedures to call remote CONVERTED TO PHYSICAL STANDBY
stored procedures via database links • Free of Licence
Use of SET ROLE • POINTS
Use of ALTER SESSION and ALTER 1. Configure the Flash Recovery Area
SYSTEM 2. Set the Retention Target
No Datatypes restrictions like Logical
3. Enable Flashback Database
Standby
Additional TEMPFILES can be created for
Sorts
Flashback Query : SELECT … AS OF
<SCN>
Additional License
13
10g Equivalent Snapshot commands
Prepare the physical standby database to be activated
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=20G;
SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='/arch/oradata'
14
DATGUARD – Still More Features
15
More Features – RMAN Active database Duplication
16
More Features – Redo Compression
Requires Advanced Compression features
Compress redo as it is transmitted data
Automatically compress the data as it only resolves gaps
Helpful and useful in bandwidth constrained locations
Syntax:-
LOG_ARCHIVE_DEST_2=‘Service=stby Async compression=ENABLE’
17
More Features – Heterogenous database support
Oracle 10g Dataguard support mixed environments 32bit and 64 bit
configuration
Metalink : 413484.1
18
More Features: Lost Write Detection
Due to hardware or storage issues lost writes can happen while transmission
and blocks may be stale.
Feature:-
– Compares version of Blocks
Between Standby blocks and redo stream
Version discrepancy can be either standby or primary
– If Primary Database block corruption is detected Resolved
Using standby failover and
Restore data consistency
19
More Features: Automatic Block recovery
11g R2 automatically recovers corrupted blocks from standby copies of
blocks
RMAN command RECOVER BLOCK can be used for manual recovery and
its check for all suitable or consistent blocks across several copies of
backups or
– Clause can be added RECOVER BLOCK … EXCLUDE STANDBY then wont
check in standby
20
More Features: Redo Flush
Yes, Redo can be flushed
Syntax:-
– ALTER System FLUSH Redo to <target DB Name>
21
More Features: Sync with Primary
New command
– ALTER SESSION SYNC WITH PRIMARY
– WAIT FOR STANDBY TO BE SYNCHRONIZED WITH PRIMARY
– FAILS IF REDO APPLY OR REDO TRANSPORT IS OFF
REPORT TRANSPORT AND APPLY LAGS
22
More Features: STANDBY_MAX_DATA_DELAY
23
More Features: ROLE Based services
Services can be created and start based on the database ROLE, viz a new
addition sys_context (Database ROLE)
24
Rolling Upgrade : Transient Logical Standby
Physical standby must be converted to Logical Standby and uses Flashback
as fall out plan
Downtime for upgrade is only the SWITCHOVER TIME
25
Finally, Monitoring Views
GAP_STATUS , additional column in v$archive_dest – GAP or NO
GAP
V$REDO_DEST_RESP_HISTOGRAM
– Useful when need to analyse network latencies by checking transport lag
V$STANDBY_EVENT_HISTOGRAM
26
Thank you!
Q&A
Internal 27