SlideShare a Scribd company logo
1 of 75
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF
HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH
Get the Most out of Oracle Data Guard!
Oracle Open World 2017
#OOW17
Ludovico Caldara
Oracle ACE Director
Senior Consultant
About Ludovico Caldara
Get the Most out of Oracle Data Guard!2 9/29/2017
■ 18 Years DBA (Not Only Oracle)
▪ I do it everywhere (even Windows)
■ RAC ATTACK Ninja & co-writer
■ President, SOUG & ITOUG Board
■ OCP (11g, 12c, MySQL) & OCE
■ Italian living in Switzerland
■ http://www.ludovicocaldara.net
■ @ludodba ludodba
■ ludovicocaldara
Our company.
Adaptive Features or: How I learned to Stop Worrying3 29/09/2017
Trivadis is a market leader in IT consulting, system integration, solution engineering
and the provision of IT services focusing on and
technologies in Switzerland, Germany, Austria and Denmark.
We offer our services in the following strategic business fields:
Trivadis Services takes over the interactive operation of your IT systems.
O P E R A T I O N
COPENHAGEN
MUNICH
LAUSANNE
BERN
ZURICH
BRUGG
GENEVA
HAMBURG
DÜSSELDORF
FRANKFURT
STUTTGART
FREIBURG
BASEL
VIENNA
With over 600 specialists and IT experts in your region.
Adaptive Features or: How I learned to Stop Worrying4 29/09/2017
14 Trivadis branches and more than
600 employees
200 Service Level Agreements
Over 4,000 training participants
Research and development budget:
CHF 5.0 / EUR 4 million
Financially self-supporting and
sustainably profitable
Experience from more than 1,900
projects per year at over 800
customers
3 Membership Tiers
• Oracle ACE Director
• Oracle ACE
• Oracle ACE Associate
bit.ly/OracleACEProgram
500+ Technical
Experts Helping
Peers Globally
Connect:
Nominate yourself or someone you know: acenomination.oracle.com
@oracleace
Facebook.com/oracleaces
oracle-ace_ww@oracle.com
Get the Most out of Oracle Data Guard!6 9/29/2017
Oracle
Data Guard?
Why is Oracle Data Guard still relevant?
Get the Most out of Oracle Data Guard!7 9/29/2017
The best high availability solution in the Oracle ecosystem
– Synchronous (or not)
– One-to-one copy (or one-to-many)
– No single points of failure
– Failover is (almost) transparent to the applications (if well configured)
Rock solid!
Included in Oracle Database Enterprise Edition
Hey, it’s 12c Release 2!
Get the Most out of Oracle Data Guard!8 9/29/2017
Multiple Observers for Fast-Start Failover configurations
Observer in Background mode (needs wallet)
Recover of Nologging Operations (recover database nonlogged block;)
Multiple fast_start failover targets
Automated passwordfile copy
Enhanced Broker and dgmgrl
FastSync redo transport
Hey, it’s 12c Release 2!
Get the Most out of Oracle Data Guard!9 9/29/2017
Multiple Observers for Fast-Start Failover configurations
Observer in Background mode (needs wallet)
Recover of Nologging Operations (recover database nonlogged block;)
Multiple fast_start failover targets
Automated passwordfile copy
Enhanced Broker and dgmgrl
FastSync redo transport That was 12cR1!
What about Active Data Guard new features?
Get the Most out of Oracle Data Guard!10 9/29/2017
What about Active Data Guard new features?
Get the Most out of Oracle Data Guard!11 9/29/2017
Get the Most out of Oracle Data Guard!12 9/29/2017
Technology Enablers
The «MAIN» features included in Data Guard
Get the Most out of Oracle Data Guard!13 9/29/2017
Client Failover (TAF)
Redo Apply
SQL Apply
Snapshot Standby
Rolling Upgrades (possible, but without RDBMS_ROLLING)
Transaction Guard (necessary for Application Continuity but not licensed as option)
The «MAIN» features included in Data Guard
Get the Most out of Oracle Data Guard!14 9/29/2017
Client Failover (TAF)
Redo Apply
SQL Apply
Snapshot Standby
Rolling Upgrades (possible, but without RDBMS_ROLLING)
Transaction Guard (necessary for Application Continuity but not licensed as option)
Our three main topics for this presentation
Get the Most out of Oracle Data Guard!15 9/29/2017
Client Failover (TAF)
Snapshot Standby
Standby consistency on recovery cancel
Our three main topics for this presentation
Get the Most out of Oracle Data Guard!16 9/29/2017
Client Failover (TAF)
Snapshot Standby
Standby consistency on recovery cancel
Database
Migration
Our three main topics for this presentation
Get the Most out of Oracle Data Guard!17 9/29/2017
Client Failover (TAF)
Snapshot Standby
Standby consistency on recovery cancel
Reporting
Our three topics focuses for this presentation
Get the Most out of Oracle Data Guard!18 9/29/2017
Client Failover (TAF)
Snapshot Standby
Standby consistency on recovery cancel Database
Cloning
Get the Most out of Oracle Data Guard!19 9/29/2017
Client Failover
Client Failover is a critical topic!
Get the Most out of Oracle Data Guard!20 9/29/2017
https://www.slideshare.net/ludovicocaldara/oracle-client-failover-under-the-hood
– OS Connect Timeouts/ARP Cache
– OS Re-Connect Timeouts
– Virtual IP Addresses
– TCP Keepalive
– Database Services
– DB Connect Timeouts
– DB Re-Connect Timeouts
– Transparent Application Failover
– Fast Application Notification / Fast Connection Failover
– Application Continuity
Database Services
Get the Most out of Oracle Data Guard!
Database services can be created with:
– srvctl (Grid Infrastructure), gdsctl (Global Data Services).
– dbms_service.create_service() PL/SQL procedure (TRIGGER AFTER STARTUP!)
Different high availability and workload management attributes can be defined
Service
srvctl add service
-db <db_unique_name>
-service <service>
-preferred "<preferred_list>"
-available "<available_list>"
-serverpool <pool_name>
-cardinality [UNIFORM | SINGLETON]
-tafpolicy [NONE | BASIC | PRECONNECT]
-role [PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, SNAPSHOT_STANDBY]
-clbgoal [SHORT | LONG]
-rlbgoal [SERVICE_TIME | THROUGHPUT | NONE]
...
Not available with
Oracle Restart
9/29/201721
Role-Based Services
Get the Most out of Oracle Data Guard!
Example role-based services with Grid Infrastructure.
Services are started, only if database and service role match.
srvctl add service -db sour_poug –service sour_rw.trivadis.com 
-role PRIMARY
srvctl add service -db sour_poug -service sour_ro.trivadis.com 
-role PHYSICAL_STANDBY
srvctl add service -db sour_poug -service sour_snap.trivadis.com 
-role SNAPSHOT_STANDBY
SvcAgent::start 680 query_db_role
SvcAgent::start 710 not starting service sour_rw Role mismatch -
Service role:PRIMARY, current DB role:PHYSICAL_STANDBY
9/29/201722
Transparent Application Failover – Server Side Example
Get the Most out of Oracle Data Guard!
Example server side TAF BASIC method configuration.
srvctl add service
-db sour_SITE1
-service sour_RW
-tafpolicy BASIC
-failovertype SELECT
-failoverdelay 1
-failoverretry 180
9/29/201723
BEGIN
DBMS_SERVICE.CREATE_SERVICE (
service_name => 'sour.TRIVADIS.COM',
network_name => 'sour.TRIVADIS.COM',
failover_method => 'BASIC',
failover_type => 'SELECT',
failover_retries => 180,
failover_delay => 3);
END;
/
Transparent Application Failover – Client Side Example
Get the Most out of Oracle Data Guard!
Example client side TAF BASIC method configuration.
189/29/201724
sour.trivadis.com =
(DESCRIPTION =
(FAILOVER=ON) (LOAD_BALANCE=OFF)
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3)
(ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=ludo01.trivadis.com)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=vico01.trivadis.com)(PORT=1521)))
(CONNECT_DATA =
(SERVICE_NAME = sour.trivadis.com)
(FAILOVER_MODE =
(TYPE = SESSION)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 1)
)
)
)
Transparent Application Failover – Client Side Example
Get the Most out of Oracle Data Guard!
Example client side TAF BASIC method configuration.
189/29/201725
sour.trivadis.com =
(DESCRIPTION =
(FAILOVER=ON) (LOAD_BALANCE=OFF)
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3)
(ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=ludo01.trivadis.com)(PORT=1521))
(ADDRESS=(PROTOCOL=TCP)(HOST=vico01.trivadis.com)(PORT=1521)))
(CONNECT_DATA =
(SERVICE_NAME = sour.trivadis.com)
(FAILOVER_MODE =
(TYPE = SESSION)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 1)
)
)
)
!
TAF is for OCI Drivers only
Thin Driver: do not use TAF
Use Case: Classic Data Guard Failover / Switchover
Get the Most out of Oracle Data Guard!26 9/29/2017
sour_ludo sour_vico
sour_RW
CLIENTS
srvctl add service -db sour_vico
-service sour_RW
-role PRIMARY
(ADDRESS=(HOST=ludo01)(PORT=1521))
(ADDRESS=(HOST=vico01)(PORT=1521))
MRP0
Use Case: Classic Data Guard Failover / Switchover
Get the Most out of Oracle Data Guard!27 9/29/2017
sour_ludo sour_vico
sour_RW
CLIENTS
srvctl add service -db sour_vico
-service sour_RW
-role PRIMARY
(ADDRESS=(HOST=ludo01)(PORT=1521))
(ADDRESS=(HOST=vico01)(PORT=1521))
MRP0
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!28 9/29/2017
sour
CLIENTS
(ADDRESS=(HOST=ludo01)(PORT=1521))
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!29 9/29/2017
sour
CLIENTS
(ADDRESS=(HOST=ludo01)(PORT=1521))
sour_newMRP0
– Set up Standby instance
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!30 9/29/2017
sour
CLIENTS
(ADDRESS=(HOST=ludo01)(PORT=1521))
sour_newMRP0
– Set up Standby instance
– Stop application
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!31 9/29/2017
sour
CLIENTS
(ADDRESS=(HOST=ludo01)(PORT=1521))
sour_new
MRP0
– Set up Standby instance
– Stop application
– Switchover
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!32 9/29/2017
sour
CLIENTS
(ADDRESS=(HOST=ludo01vico01)(PORT=1521))
sour_new
MRP0
– Change TNS definition– Set up Standby instance
– Stop application
– Switchover
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!33 9/29/2017
sour
CLIENTS
(ADDRESS=(HOST=ludo01vico01)(PORT=1521))
sour_new
MRP0
– Change TNS definition
– Start application
– Set up Standby instance
– Stop application
– Switchover
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!34 9/29/2017
CLIENTS
(ADDRESS=(HOST=vico01)(PORT=1521))
sour_new
– Set up Standby instance
– Stop application
– Switchover
– Change TNS definition
– Start application
– Cleanup
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!35 9/29/2017
Problems
– Requires application downtime (even if short)
– Messy DB_UNIQUE_NAME naming convention
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!36 9/29/2017
Problems
– Requires application downtime (even if short)
– Messy DB_UNIQUE_NAME naming convention
?Better solutions?
Use Case: Migrate Standalone on another server
Get the Most out of Oracle Data Guard!37 9/29/2017
Problems
– Requires application downtime (even if short)
– Messy DB_UNIQUE_NAME naming convention
(ADDRESS=(HOST=ludo01)(PORT=1521))
(ADDRESS=(HOST=ludo01)(PORT=1521))
?Better solutions?
Hint: this is valid
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!38 9/29/2017
sour_ludo
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME ludo01
sour-s2 IN CNAME ludo01
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!39 9/29/2017
sour_ludo
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME ludo01
sour-s2 IN CNAME ludo01
sour_vicoMRP0
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!40 9/29/2017
sour_ludo
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME ludo01
sour-s2 IN CNAME vico01
sour_vicoMRP0
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!41 9/29/2017
sour_ludo
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME ludo01
sour-s2 IN CNAME vico01
sour_vicoMRP0
TAF!
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!42 9/29/2017
sour_ludo
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME vico01
sour-s2 IN CNAME vico01
sour_vicoMRP0
TAF!
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!43 9/29/2017
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME vico01
sour-s2 IN CNAME vico01
sour_vico
TAF!
Use Case: Smart Standalone Configuration
Get the Most out of Oracle Data Guard!44 9/29/2017
CLIENTS
(ADDRESS=(HOST=sour-s1)(PORT=1521))
(ADDRESS=(HOST=sour-s2)(PORT=1521))
sour_RW
sour-s1 IN CNAME vico01
sour-s2 IN CNAME vico01
sour_vico
TAF!
Get the Most out of Oracle Data Guard!45 9/29/2017
Demo?
Get the Most out of Oracle Data Guard!46 9/29/2017
Snapshot Standby
Physical Standby (simplified)
Get the Most out of Oracle Data Guard!47 9/29/2017
stout_ludo stout_vicoLGWR RFS MRP0
ol stbl
arcarc
Snapshot Standby (simplified)
Get the Most out of Oracle Data Guard!48 9/29/2017
stout_ludo stout_vicoLGWR RFS
ol stbl
arcarc
LGWR
ol
arc
Snapshot Standby
Get the Most out of Oracle Data Guard!49 9/29/2017
Requirements
– Correct Data Guard configuration with a physical standby
– Physical standby has Fast Recovery Area Configured
– FORCE LOGGING is not mandatory but simplifies everything
Conversion to Snapshot Standby without broker
– ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
– ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
– ALTER DATABASE OPEN READ WRITE;
Conversion to Snapshot standby with broker
– CONVERT DATABASE <name> TO SNAPSHOT STANDBY;
Conversion
Get the Most out of Oracle Data Guard!50 9/29/2017
Stop Redo Apply
Create Guaranteed Restore Point
Flush Standby Logs
Clear Online Logfiles
Convert to Primary
Open resetlogs
Start RFS process to get redo stream from the primary
Two sources for Archive Logs?
Get the Most out of Oracle Data Guard!51 9/29/2017
SQL> select THREAD#, SEQUENCE#, RESETLOGS_ID, FIRST_CHANGE#, NEXT_CHANGE#, REGISTRAR,
ACTIVATION# from v$archived_log WHERE next_time>(sysdate-1/24);
THREAD# SEQUENCE# RESETLOGS_ID FIRST_CHANGE# NEXT_CHANGE# REGISTR ACTIVATION#
---------- ---------- ------------ ------------- ------------ ------- -----------
1 22 952446304 648113 652296 RFS 3044612576
1 23 952446304 652296 652300 RFS 3044612576
1 24 952446304 652300 652361 RFS 3044612576
1 25 952446304 652361 652404 RFS 3044612576
1 26 952446304 652404 652410 RFS 3044612576
1 27 952446304 652410 653523 RFS 3044612576
1 28 952446304 653523 653529 RFS 3044612576
1 29 952446304 653529 657362 RFS 3044612576
1 30 952446304 657362 657399 RFS 3044612576
1 31 952446304 657399 657461 RFS 3044612576
1 32 952446304 657461 661863 RFS 3044612576
1 33 952446304 661863 661869 RFS 3044612576
1 34 952446304 661869 662080 RFS 3044612576
1 1 952543943 661845 662731 ARCH 3044656145
Use Case: SNAP STANDBY ONLY
Get the Most out of Oracle Data Guard!52 9/29/2017
stout_ludo stout_vico
stout_RW stout_SNAP
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role SNAPSHOT_STANDBY
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=ludo01)(PORT=1521))
Use Case: SNAP STANDBY ONLY
Get the Most out of Oracle Data Guard!53 9/29/2017
stout_ludo stout_vico
stout_RW stout_SNAP
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role SNAPSHOT_STANDBY
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=ludo01)(PORT=1521))
MRP0
Use Case: SNAP STANDBY ONLY
Get the Most out of Oracle Data Guard!54 9/29/2017
srvctl add service -db stout_vico -service stout_snap.trivadistraining.com -role
“SNAPSHOT_STANDBY” -failovertype SELECT -failovermethod BASIC
stout_SNAP.trivadistraining.com =
(DESCRIPTION =
(CONNECT_TIMEOUT = 5 )(TRANSPORT_CONNECT_TIMEOUT = 3 )
(ADDRESS_LIST =
(LOAD_BALANCE = OFF )
(ADDRESS = (PROTOCOL = TCP )(HOST = vico01.trivadistraining.com )(PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP )(HOST = ludo01.trivadistraining.com )(PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = stout_SNAP.trivadistraining.com )
)
)
Use Case: SNAP STANDBY or PRIMARY
Get the Most out of Oracle Data Guard!55 9/29/2017
stout_ludo stout_vico
stout_RW stout_SNAP
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role “SNAPSHOT_STANDBY,PRIMARY”
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=ludo01)(PORT=1521))
stout_SNAP
Use Case: SNAP STANDBY or PRIMARY
Get the Most out of Oracle Data Guard!56 9/29/2017
stout_ludo stout_vico
stout_RW stout_SNAP
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role “SNAPSHOT_STANDBY,PRIMARY”
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=ludo01)(PORT=1521))
stout_SNAP
MRP0
Use Case: SNAP STANDBY or PRIMARY
Get the Most out of Oracle Data Guard!57 9/29/2017
srvctl add service -db stout_vico -service stout_snap.trivadistraining.com -role
“PRIMARY,SNAPSHOT_STANDBY” -failovertype SELECT -failovermethod BASIC
stout_SNAP.trivadistraining.com =
(DESCRIPTION =
(CONNECT_TIMEOUT = 5 )(TRANSPORT_CONNECT_TIMEOUT = 3 )
(ADDRESS_LIST =
(LOAD_BALANCE = OFF )
(ADDRESS = (PROTOCOL = TCP )(HOST = vico01.trivadistraining.com )(PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP )(HOST = ludo01.trivadistraining.com )(PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = stout_SNAP.trivadistraining.com )
)
)
Get the Most out of Oracle Data Guard!58 9/29/2017
Demo?
Use Case: Double SNAP STANDBY
Get the Most out of Oracle Data Guard!59 9/29/2017
stout_ludo
stout_vico
stout_RW
stout_SNAP
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role “SNAPSHOT_STANDBY”
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=piwo01)(PORT=1521))
stout_piwoMRP0
Use Case: Double SNAP STANDBY
Get the Most out of Oracle Data Guard!60 9/29/2017
stout_ludo
stout_vico
stout_RW
stout_SNAP
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role “SNAPSHOT_STANDBY”
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=piwo01)(PORT=1521))
stout_piwo
stout_SNAP
Use Case: Double SNAP STANDBY
Get the Most out of Oracle Data Guard!61 9/29/2017
stout_ludo
stout_vico
stout_RW
CLIENTS
srvctl add service -db stout_vico
-service stout_SNAP
-role “SNAPSHOT_STANDBY”
(ADDRESS=(HOST=vico01)(PORT=1521))
(ADDRESS=(HOST=piwo01)(PORT=1521))
stout_piwo
MRP0
stout_SNAP
Two Standby Databases Use Case
Get the Most out of Oracle Data Guard!62 9/29/2017
srvctl add service -db stout_vico -service stout_snap.trivadistraining.com -role
“SNAPSHOT_STANDBY” -failovertype SELECT -failovermethod BASIC
stout_SNAP.trivadistraining.com =
(DESCRIPTION =
(CONNECT_TIMEOUT = 5 )(TRANSPORT_CONNECT_TIMEOUT = 3 )
(ADDRESS_LIST =
(LOAD_BALANCE = OFF )
(ADDRESS = (PROTOCOL = TCP )(HOST = vico01.trivadistraining.com )(PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP )(HOST = piwo01.trivadistraining.com )(PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = stout_SNAP.trivadistraining.com )
)
)
Get the Most out of Oracle Data Guard!
Standby
Consistency
on
recovery cancel
9/29/201763
stout_vico
Redo Apply (roll-forward)
Get the Most out of Oracle Data Guard!64 9/29/2017
BUFFER CACHE
datafilesfuzzy
datafiles
dbw0
stout_ludo LGWR RFS MRP0
ol stbl
arcarc
ckpt
Block status
Get the Most out of Oracle Data Guard!65 9/29/2017
SQL> select status, dirty, count(*) from v$bh
2> group by status, dirty order by status, dirty;
STATUS D COUNT(*)
---------- - ----------
free N 11
mrec N 3013
mrec Y 82
DGMGRL> edit database stout_vico set state='APPLY-OFF';
SQL> select status, dirty, count(*) from v$bh
2> group by status, dirty order by status, dirty;
STATUS D COUNT(*)
---------- - ----------
free N 7012
Block status
Get the Most out of Oracle Data Guard!66 9/29/2017
SQL> select status, dirty, count(*) from v$bh
2> group by status, dirty order by status, dirty;
STATUS D COUNT(*)
---------- - ----------
free N 11
mrec N 3013
mrec Y 82
DGMGRL> edit database stout_vico set state='APPLY-OFF';
SQL> select status, dirty, count(*) from v$bh
2> group by status, dirty order by status, dirty;
STATUS D COUNT(*)
---------- - ----------
free N 7012
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
Recovered data files to a consistent state at change 292504638291
Consistent datafiles == consistent database
Get the Most out of Oracle Data Guard!67 9/29/2017
No additional media recovery required before OPEN RESETLOGS
– Cold backups via filesystem commands
– Cloning possible without bother with Online or Archive Logs!
Consistent Standby + ACFS Snapshots (or other) = Cheap Database Cloning
Cloning solution based on Standby Database
Get the Most out of Oracle Data Guard!68 9/29/2017
ludo01
GRID INFRASTRUCTURE 12cR2
DG +DATA
ACFS
/u02/fra
ACFS
/u02/data
stout_ludo
SNAPSHOT
stout
vico01
GRID INFRASTRUCTURE 12cR2
DG +DATA
ACFS
/u02/data
ACFS
/u02/fra
stout_vico
SNAPSHOT
stout
MRP0
SNAPSHOT
clone1
clone1
SNAPSHOT
COPYSNAPSHOT
COPYSNAPSHOT
COPYSNAPSHOT
COPYSNAPSHOT
COPYSNAPSHOT
COPYSNAPSHOT
Sunday
Cloning Steps
Get the Most out of Oracle Data Guard!69 9/29/2017
Snapshot creation
– edit database stout_vico set state=‘APPLY-OFF’;
– acfsutil snap create -w -p stout stout.`date +%A` /u02/data
– alter database backup controlfile to trace as ‘/u02/data/.ACFS/snaps/…’ ;
– create pfile=‘/u02/data/.ACFS/snaps/…’ from spfile;
– edit database stout_vico set state=‘APPLY-ON’;
Cloning Steps
Get the Most out of Oracle Data Guard!70 9/29/2017
Cloning the database from the snapshot
– Abort previous instance / delete previous snapshot
– acfsutil snap create -w -p stout.`date +%A` clone1 /u02/data
– sed -i -e ‘s/stout_vico/clones/g’ init.ora control_trace.trc
– startup open resetlogs
Get the Most out of Oracle Data Guard!71 9/29/2017
Demo?
Get the Most out of Oracle Data Guard!72 9/29/2017
Let me do one more example
Database reorganization live
Get the Most out of Oracle Data Guard!73 9/29/2017
Setup physical standby
Convert to logical standby << Here the standby is OPEN
Stop SQL Apply
Reorganize your database
Start SQL Apply and catch the primary
Switchover to Logical Standby
Get the Most out of Oracle Data Guard!
Conclusions
9/29/201774
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF
HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH
Questions?
Oracle Open World 2017
#OOW17
Ludovico Caldara
Oracle ACE Director
Senior Consultant

More Related Content

What's hot

Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Ludovico Caldara
 
Effective Oracle Home Management - UKOUG_Tech18
Effective Oracle Home Management  - UKOUG_Tech18Effective Oracle Home Management  - UKOUG_Tech18
Effective Oracle Home Management - UKOUG_Tech18Ludovico Caldara
 
Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?Ludovico Caldara
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Ludovico Caldara
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Ludovico Caldara
 
Effective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model eraEffective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model eraLudovico Caldara
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Ludovico Caldara
 
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...Leighton Nelson
 
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HAGalera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HALudovico Caldara
 
Oracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityLudovico Caldara
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESLudovico Caldara
 
Oracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam BashaOracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam Bashapasalapudi123
 
Boost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed DatabasesBoost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed DatabasesLudovico Caldara
 
Oracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesOracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesDeiby Gómez
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresJakkrapat S.
 
RHP like Rapid Home Provisioning
RHP like Rapid Home ProvisioningRHP like Rapid Home Provisioning
RHP like Rapid Home ProvisioningDaniele Massimi
 
Oracle12c data guard farsync and whats new
Oracle12c data guard farsync and whats newOracle12c data guard farsync and whats new
Oracle12c data guard farsync and whats newNassyam Basha
 
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewOracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewLudovico Caldara
 

What's hot (20)

Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
 
Effective Oracle Home Management - UKOUG_Tech18
Effective Oracle Home Management  - UKOUG_Tech18Effective Oracle Home Management  - UKOUG_Tech18
Effective Oracle Home Management - UKOUG_Tech18
 
Rapid Home Provisioning
Rapid Home ProvisioningRapid Home Provisioning
Rapid Home Provisioning
 
Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?Oracle Active Data Guard 12cR2. Is it the best option?
Oracle Active Data Guard 12cR2. Is it the best option?
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?Oracle Drivers configuration for High Availability, is it a developer's job?
Oracle Drivers configuration for High Availability, is it a developer's job?
 
Effective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model eraEffective Oracle Home Management in the new Release Model era
Effective Oracle Home Management in the new Release Model era
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
 
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
Oracle Enteprise Manager Cloud Control 12c - Setting Up Metrics and Monitorin...
 
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HAGalera Cluster: Synchronous Multi-Master Replication for MySQL HA
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
 
Oracle Drivers configuration for High Availability
Oracle Drivers configuration for High AvailabilityOracle Drivers configuration for High Availability
Oracle Drivers configuration for High Availability
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIESORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
 
Oracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam BashaOracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam Basha
 
Oracle acfs in oracle 11
Oracle acfs in oracle 11Oracle acfs in oracle 11
Oracle acfs in oracle 11
 
Boost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed DatabasesBoost your Oracle RAC manageability with Policy-Managed Databases
Boost your Oracle RAC manageability with Policy-Managed Databases
 
Oracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesOracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New Features
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
RHP like Rapid Home Provisioning
RHP like Rapid Home ProvisioningRHP like Rapid Home Provisioning
RHP like Rapid Home Provisioning
 
Oracle12c data guard farsync and whats new
Oracle12c data guard farsync and whats newOracle12c data guard farsync and whats new
Oracle12c data guard farsync and whats new
 
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical OverviewOracle RAC 12c and Policy-Managed Databases, a Technical Overview
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
 

Similar to Get the most out of Oracle Data Guard - OOW version

GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017Bobby Curtis
 
Golden Gate - How to start such a project?
Golden Gate  - How to start such a project?Golden Gate  - How to start such a project?
Golden Gate - How to start such a project?Trivadis
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginnersPini Dibask
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersPini Dibask
 
Oracle Data Guard for Beginners
Oracle Data Guard for BeginnersOracle Data Guard for Beginners
Oracle Data Guard for BeginnersPini Dibask
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesMarkus Flechtner
 
Cloud Native Applications on OpenShift
Cloud Native Applications on OpenShiftCloud Native Applications on OpenShift
Cloud Native Applications on OpenShiftSerhat Dirik
 
MAA for Oracle Database, Exadata and the Cloud
MAA for Oracle Database, Exadata and the CloudMAA for Oracle Database, Exadata and the Cloud
MAA for Oracle Database, Exadata and the CloudMarkus Michalewicz
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Markus Michalewicz
 
Oracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureSinanPetrusToma
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Nelson Calero
 
Replicate data between environments
Replicate data between environmentsReplicate data between environments
Replicate data between environmentsDLT Solutions
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2Mario Redón Luz
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL Brasil
 
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...DataWorks Summit
 
What is expected from Chief Cloud Officers?
What is expected from Chief Cloud Officers?What is expected from Chief Cloud Officers?
What is expected from Chief Cloud Officers?Bernard Paques
 
gDBClone - Database Clone “onecommand Automation Tool”
gDBClone - Database Clone “onecommand Automation Tool”gDBClone - Database Clone “onecommand Automation Tool”
gDBClone - Database Clone “onecommand Automation Tool”Ruggero Citton
 
Aerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike
 
You Snooze You Lose or How to Win in Ad Tech?
You Snooze You Lose or How to Win in Ad Tech?You Snooze You Lose or How to Win in Ad Tech?
You Snooze You Lose or How to Win in Ad Tech?Aerospike, Inc.
 

Similar to Get the most out of Oracle Data Guard - OOW version (20)

GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017
 
Golden Gate - How to start such a project?
Golden Gate  - How to start such a project?Golden Gate  - How to start such a project?
Golden Gate - How to start such a project?
 
Oracle data guard for beginners
Oracle data guard for beginnersOracle data guard for beginners
Oracle data guard for beginners
 
IOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for BeginnersIOUG Collaborate 18 - Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for Beginners
 
Oracle Data Guard for Beginners
Oracle Data Guard for BeginnersOracle Data Guard for Beginners
Oracle Data Guard for Beginners
 
Oracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection IssuesOracle Database: Checklist Connection Issues
Oracle Database: Checklist Connection Issues
 
Cloud Native Applications on OpenShift
Cloud Native Applications on OpenShiftCloud Native Applications on OpenShift
Cloud Native Applications on OpenShift
 
MAA for Oracle Database, Exadata and the Cloud
MAA for Oracle Database, Exadata and the CloudMAA for Oracle Database, Exadata and the Cloud
MAA for Oracle Database, Exadata and the Cloud
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
 
Oracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud InfrastructureOracle Database Migration to Oracle Cloud Infrastructure
Oracle Database Migration to Oracle Cloud Infrastructure
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
 
Replicate data between environments
Replicate data between environmentsReplicate data between environments
Replicate data between environments
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2
 
MySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e UberMySQL no Paypal Tesla e Uber
MySQL no Paypal Tesla e Uber
 
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
Disaster Recovery Experience at CACIB: Hardening Hadoop for Critical Financia...
 
What is expected from Chief Cloud Officers?
What is expected from Chief Cloud Officers?What is expected from Chief Cloud Officers?
What is expected from Chief Cloud Officers?
 
gDBClone - Database Clone “onecommand Automation Tool”
gDBClone - Database Clone “onecommand Automation Tool”gDBClone - Database Clone “onecommand Automation Tool”
gDBClone - Database Clone “onecommand Automation Tool”
 
Aerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower ManhattanAerospike AdTech Gets Hacked in Lower Manhattan
Aerospike AdTech Gets Hacked in Lower Manhattan
 
You Snooze You Lose or How to Win in Ad Tech?
You Snooze You Lose or How to Win in Ad Tech?You Snooze You Lose or How to Win in Ad Tech?
You Snooze You Lose or How to Win in Ad Tech?
 
Oracle RAC 12c Overview
Oracle RAC 12c OverviewOracle RAC 12c Overview
Oracle RAC 12c Overview
 

Recently uploaded

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Recently uploaded (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Get the most out of Oracle Data Guard - OOW version

  • 1. BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH Get the Most out of Oracle Data Guard! Oracle Open World 2017 #OOW17 Ludovico Caldara Oracle ACE Director Senior Consultant
  • 2. About Ludovico Caldara Get the Most out of Oracle Data Guard!2 9/29/2017 ■ 18 Years DBA (Not Only Oracle) ▪ I do it everywhere (even Windows) ■ RAC ATTACK Ninja & co-writer ■ President, SOUG & ITOUG Board ■ OCP (11g, 12c, MySQL) & OCE ■ Italian living in Switzerland ■ http://www.ludovicocaldara.net ■ @ludodba ludodba ■ ludovicocaldara
  • 3. Our company. Adaptive Features or: How I learned to Stop Worrying3 29/09/2017 Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields: Trivadis Services takes over the interactive operation of your IT systems. O P E R A T I O N
  • 4. COPENHAGEN MUNICH LAUSANNE BERN ZURICH BRUGG GENEVA HAMBURG DÜSSELDORF FRANKFURT STUTTGART FREIBURG BASEL VIENNA With over 600 specialists and IT experts in your region. Adaptive Features or: How I learned to Stop Worrying4 29/09/2017 14 Trivadis branches and more than 600 employees 200 Service Level Agreements Over 4,000 training participants Research and development budget: CHF 5.0 / EUR 4 million Financially self-supporting and sustainably profitable Experience from more than 1,900 projects per year at over 800 customers
  • 5. 3 Membership Tiers • Oracle ACE Director • Oracle ACE • Oracle ACE Associate bit.ly/OracleACEProgram 500+ Technical Experts Helping Peers Globally Connect: Nominate yourself or someone you know: acenomination.oracle.com @oracleace Facebook.com/oracleaces oracle-ace_ww@oracle.com
  • 6. Get the Most out of Oracle Data Guard!6 9/29/2017 Oracle Data Guard?
  • 7. Why is Oracle Data Guard still relevant? Get the Most out of Oracle Data Guard!7 9/29/2017 The best high availability solution in the Oracle ecosystem – Synchronous (or not) – One-to-one copy (or one-to-many) – No single points of failure – Failover is (almost) transparent to the applications (if well configured) Rock solid! Included in Oracle Database Enterprise Edition
  • 8. Hey, it’s 12c Release 2! Get the Most out of Oracle Data Guard!8 9/29/2017 Multiple Observers for Fast-Start Failover configurations Observer in Background mode (needs wallet) Recover of Nologging Operations (recover database nonlogged block;) Multiple fast_start failover targets Automated passwordfile copy Enhanced Broker and dgmgrl FastSync redo transport
  • 9. Hey, it’s 12c Release 2! Get the Most out of Oracle Data Guard!9 9/29/2017 Multiple Observers for Fast-Start Failover configurations Observer in Background mode (needs wallet) Recover of Nologging Operations (recover database nonlogged block;) Multiple fast_start failover targets Automated passwordfile copy Enhanced Broker and dgmgrl FastSync redo transport That was 12cR1!
  • 10. What about Active Data Guard new features? Get the Most out of Oracle Data Guard!10 9/29/2017
  • 11. What about Active Data Guard new features? Get the Most out of Oracle Data Guard!11 9/29/2017
  • 12. Get the Most out of Oracle Data Guard!12 9/29/2017 Technology Enablers
  • 13. The «MAIN» features included in Data Guard Get the Most out of Oracle Data Guard!13 9/29/2017 Client Failover (TAF) Redo Apply SQL Apply Snapshot Standby Rolling Upgrades (possible, but without RDBMS_ROLLING) Transaction Guard (necessary for Application Continuity but not licensed as option)
  • 14. The «MAIN» features included in Data Guard Get the Most out of Oracle Data Guard!14 9/29/2017 Client Failover (TAF) Redo Apply SQL Apply Snapshot Standby Rolling Upgrades (possible, but without RDBMS_ROLLING) Transaction Guard (necessary for Application Continuity but not licensed as option)
  • 15. Our three main topics for this presentation Get the Most out of Oracle Data Guard!15 9/29/2017 Client Failover (TAF) Snapshot Standby Standby consistency on recovery cancel
  • 16. Our three main topics for this presentation Get the Most out of Oracle Data Guard!16 9/29/2017 Client Failover (TAF) Snapshot Standby Standby consistency on recovery cancel Database Migration
  • 17. Our three main topics for this presentation Get the Most out of Oracle Data Guard!17 9/29/2017 Client Failover (TAF) Snapshot Standby Standby consistency on recovery cancel Reporting
  • 18. Our three topics focuses for this presentation Get the Most out of Oracle Data Guard!18 9/29/2017 Client Failover (TAF) Snapshot Standby Standby consistency on recovery cancel Database Cloning
  • 19. Get the Most out of Oracle Data Guard!19 9/29/2017 Client Failover
  • 20. Client Failover is a critical topic! Get the Most out of Oracle Data Guard!20 9/29/2017 https://www.slideshare.net/ludovicocaldara/oracle-client-failover-under-the-hood – OS Connect Timeouts/ARP Cache – OS Re-Connect Timeouts – Virtual IP Addresses – TCP Keepalive – Database Services – DB Connect Timeouts – DB Re-Connect Timeouts – Transparent Application Failover – Fast Application Notification / Fast Connection Failover – Application Continuity
  • 21. Database Services Get the Most out of Oracle Data Guard! Database services can be created with: – srvctl (Grid Infrastructure), gdsctl (Global Data Services). – dbms_service.create_service() PL/SQL procedure (TRIGGER AFTER STARTUP!) Different high availability and workload management attributes can be defined Service srvctl add service -db <db_unique_name> -service <service> -preferred "<preferred_list>" -available "<available_list>" -serverpool <pool_name> -cardinality [UNIFORM | SINGLETON] -tafpolicy [NONE | BASIC | PRECONNECT] -role [PRIMARY, PHYSICAL_STANDBY, LOGICAL_STANDBY, SNAPSHOT_STANDBY] -clbgoal [SHORT | LONG] -rlbgoal [SERVICE_TIME | THROUGHPUT | NONE] ... Not available with Oracle Restart 9/29/201721
  • 22. Role-Based Services Get the Most out of Oracle Data Guard! Example role-based services with Grid Infrastructure. Services are started, only if database and service role match. srvctl add service -db sour_poug –service sour_rw.trivadis.com -role PRIMARY srvctl add service -db sour_poug -service sour_ro.trivadis.com -role PHYSICAL_STANDBY srvctl add service -db sour_poug -service sour_snap.trivadis.com -role SNAPSHOT_STANDBY SvcAgent::start 680 query_db_role SvcAgent::start 710 not starting service sour_rw Role mismatch - Service role:PRIMARY, current DB role:PHYSICAL_STANDBY 9/29/201722
  • 23. Transparent Application Failover – Server Side Example Get the Most out of Oracle Data Guard! Example server side TAF BASIC method configuration. srvctl add service -db sour_SITE1 -service sour_RW -tafpolicy BASIC -failovertype SELECT -failoverdelay 1 -failoverretry 180 9/29/201723 BEGIN DBMS_SERVICE.CREATE_SERVICE ( service_name => 'sour.TRIVADIS.COM', network_name => 'sour.TRIVADIS.COM', failover_method => 'BASIC', failover_type => 'SELECT', failover_retries => 180, failover_delay => 3); END; /
  • 24. Transparent Application Failover – Client Side Example Get the Most out of Oracle Data Guard! Example client side TAF BASIC method configuration. 189/29/201724 sour.trivadis.com = (DESCRIPTION = (FAILOVER=ON) (LOAD_BALANCE=OFF) (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=ludo01.trivadis.com)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=vico01.trivadis.com)(PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = sour.trivadis.com) (FAILOVER_MODE = (TYPE = SESSION) (METHOD = BASIC) (RETRIES = 180) (DELAY = 1) ) ) )
  • 25. Transparent Application Failover – Client Side Example Get the Most out of Oracle Data Guard! Example client side TAF BASIC method configuration. 189/29/201725 sour.trivadis.com = (DESCRIPTION = (FAILOVER=ON) (LOAD_BALANCE=OFF) (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(RETRY_DELAY=1)(TRANSPORT_CONNECT_TIMEOUT=3) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=ludo01.trivadis.com)(PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=vico01.trivadis.com)(PORT=1521))) (CONNECT_DATA = (SERVICE_NAME = sour.trivadis.com) (FAILOVER_MODE = (TYPE = SESSION) (METHOD = BASIC) (RETRIES = 180) (DELAY = 1) ) ) ) ! TAF is for OCI Drivers only Thin Driver: do not use TAF
  • 26. Use Case: Classic Data Guard Failover / Switchover Get the Most out of Oracle Data Guard!26 9/29/2017 sour_ludo sour_vico sour_RW CLIENTS srvctl add service -db sour_vico -service sour_RW -role PRIMARY (ADDRESS=(HOST=ludo01)(PORT=1521)) (ADDRESS=(HOST=vico01)(PORT=1521)) MRP0
  • 27. Use Case: Classic Data Guard Failover / Switchover Get the Most out of Oracle Data Guard!27 9/29/2017 sour_ludo sour_vico sour_RW CLIENTS srvctl add service -db sour_vico -service sour_RW -role PRIMARY (ADDRESS=(HOST=ludo01)(PORT=1521)) (ADDRESS=(HOST=vico01)(PORT=1521)) MRP0
  • 28. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!28 9/29/2017 sour CLIENTS (ADDRESS=(HOST=ludo01)(PORT=1521))
  • 29. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!29 9/29/2017 sour CLIENTS (ADDRESS=(HOST=ludo01)(PORT=1521)) sour_newMRP0 – Set up Standby instance
  • 30. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!30 9/29/2017 sour CLIENTS (ADDRESS=(HOST=ludo01)(PORT=1521)) sour_newMRP0 – Set up Standby instance – Stop application
  • 31. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!31 9/29/2017 sour CLIENTS (ADDRESS=(HOST=ludo01)(PORT=1521)) sour_new MRP0 – Set up Standby instance – Stop application – Switchover
  • 32. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!32 9/29/2017 sour CLIENTS (ADDRESS=(HOST=ludo01vico01)(PORT=1521)) sour_new MRP0 – Change TNS definition– Set up Standby instance – Stop application – Switchover
  • 33. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!33 9/29/2017 sour CLIENTS (ADDRESS=(HOST=ludo01vico01)(PORT=1521)) sour_new MRP0 – Change TNS definition – Start application – Set up Standby instance – Stop application – Switchover
  • 34. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!34 9/29/2017 CLIENTS (ADDRESS=(HOST=vico01)(PORT=1521)) sour_new – Set up Standby instance – Stop application – Switchover – Change TNS definition – Start application – Cleanup
  • 35. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!35 9/29/2017 Problems – Requires application downtime (even if short) – Messy DB_UNIQUE_NAME naming convention
  • 36. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!36 9/29/2017 Problems – Requires application downtime (even if short) – Messy DB_UNIQUE_NAME naming convention ?Better solutions?
  • 37. Use Case: Migrate Standalone on another server Get the Most out of Oracle Data Guard!37 9/29/2017 Problems – Requires application downtime (even if short) – Messy DB_UNIQUE_NAME naming convention (ADDRESS=(HOST=ludo01)(PORT=1521)) (ADDRESS=(HOST=ludo01)(PORT=1521)) ?Better solutions? Hint: this is valid
  • 38. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!38 9/29/2017 sour_ludo CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME ludo01 sour-s2 IN CNAME ludo01
  • 39. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!39 9/29/2017 sour_ludo CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME ludo01 sour-s2 IN CNAME ludo01 sour_vicoMRP0
  • 40. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!40 9/29/2017 sour_ludo CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME ludo01 sour-s2 IN CNAME vico01 sour_vicoMRP0
  • 41. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!41 9/29/2017 sour_ludo CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME ludo01 sour-s2 IN CNAME vico01 sour_vicoMRP0 TAF!
  • 42. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!42 9/29/2017 sour_ludo CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME vico01 sour-s2 IN CNAME vico01 sour_vicoMRP0 TAF!
  • 43. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!43 9/29/2017 CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME vico01 sour-s2 IN CNAME vico01 sour_vico TAF!
  • 44. Use Case: Smart Standalone Configuration Get the Most out of Oracle Data Guard!44 9/29/2017 CLIENTS (ADDRESS=(HOST=sour-s1)(PORT=1521)) (ADDRESS=(HOST=sour-s2)(PORT=1521)) sour_RW sour-s1 IN CNAME vico01 sour-s2 IN CNAME vico01 sour_vico TAF!
  • 45. Get the Most out of Oracle Data Guard!45 9/29/2017 Demo?
  • 46. Get the Most out of Oracle Data Guard!46 9/29/2017 Snapshot Standby
  • 47. Physical Standby (simplified) Get the Most out of Oracle Data Guard!47 9/29/2017 stout_ludo stout_vicoLGWR RFS MRP0 ol stbl arcarc
  • 48. Snapshot Standby (simplified) Get the Most out of Oracle Data Guard!48 9/29/2017 stout_ludo stout_vicoLGWR RFS ol stbl arcarc LGWR ol arc
  • 49. Snapshot Standby Get the Most out of Oracle Data Guard!49 9/29/2017 Requirements – Correct Data Guard configuration with a physical standby – Physical standby has Fast Recovery Area Configured – FORCE LOGGING is not mandatory but simplifies everything Conversion to Snapshot Standby without broker – ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; – ALTER DATABASE CONVERT TO SNAPSHOT STANDBY; – ALTER DATABASE OPEN READ WRITE; Conversion to Snapshot standby with broker – CONVERT DATABASE <name> TO SNAPSHOT STANDBY;
  • 50. Conversion Get the Most out of Oracle Data Guard!50 9/29/2017 Stop Redo Apply Create Guaranteed Restore Point Flush Standby Logs Clear Online Logfiles Convert to Primary Open resetlogs Start RFS process to get redo stream from the primary
  • 51. Two sources for Archive Logs? Get the Most out of Oracle Data Guard!51 9/29/2017 SQL> select THREAD#, SEQUENCE#, RESETLOGS_ID, FIRST_CHANGE#, NEXT_CHANGE#, REGISTRAR, ACTIVATION# from v$archived_log WHERE next_time>(sysdate-1/24); THREAD# SEQUENCE# RESETLOGS_ID FIRST_CHANGE# NEXT_CHANGE# REGISTR ACTIVATION# ---------- ---------- ------------ ------------- ------------ ------- ----------- 1 22 952446304 648113 652296 RFS 3044612576 1 23 952446304 652296 652300 RFS 3044612576 1 24 952446304 652300 652361 RFS 3044612576 1 25 952446304 652361 652404 RFS 3044612576 1 26 952446304 652404 652410 RFS 3044612576 1 27 952446304 652410 653523 RFS 3044612576 1 28 952446304 653523 653529 RFS 3044612576 1 29 952446304 653529 657362 RFS 3044612576 1 30 952446304 657362 657399 RFS 3044612576 1 31 952446304 657399 657461 RFS 3044612576 1 32 952446304 657461 661863 RFS 3044612576 1 33 952446304 661863 661869 RFS 3044612576 1 34 952446304 661869 662080 RFS 3044612576 1 1 952543943 661845 662731 ARCH 3044656145
  • 52. Use Case: SNAP STANDBY ONLY Get the Most out of Oracle Data Guard!52 9/29/2017 stout_ludo stout_vico stout_RW stout_SNAP CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role SNAPSHOT_STANDBY (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=ludo01)(PORT=1521))
  • 53. Use Case: SNAP STANDBY ONLY Get the Most out of Oracle Data Guard!53 9/29/2017 stout_ludo stout_vico stout_RW stout_SNAP CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role SNAPSHOT_STANDBY (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=ludo01)(PORT=1521)) MRP0
  • 54. Use Case: SNAP STANDBY ONLY Get the Most out of Oracle Data Guard!54 9/29/2017 srvctl add service -db stout_vico -service stout_snap.trivadistraining.com -role “SNAPSHOT_STANDBY” -failovertype SELECT -failovermethod BASIC stout_SNAP.trivadistraining.com = (DESCRIPTION = (CONNECT_TIMEOUT = 5 )(TRANSPORT_CONNECT_TIMEOUT = 3 ) (ADDRESS_LIST = (LOAD_BALANCE = OFF ) (ADDRESS = (PROTOCOL = TCP )(HOST = vico01.trivadistraining.com )(PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP )(HOST = ludo01.trivadistraining.com )(PORT = 1521 )) ) (CONNECT_DATA = (SERVICE_NAME = stout_SNAP.trivadistraining.com ) ) )
  • 55. Use Case: SNAP STANDBY or PRIMARY Get the Most out of Oracle Data Guard!55 9/29/2017 stout_ludo stout_vico stout_RW stout_SNAP CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role “SNAPSHOT_STANDBY,PRIMARY” (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=ludo01)(PORT=1521)) stout_SNAP
  • 56. Use Case: SNAP STANDBY or PRIMARY Get the Most out of Oracle Data Guard!56 9/29/2017 stout_ludo stout_vico stout_RW stout_SNAP CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role “SNAPSHOT_STANDBY,PRIMARY” (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=ludo01)(PORT=1521)) stout_SNAP MRP0
  • 57. Use Case: SNAP STANDBY or PRIMARY Get the Most out of Oracle Data Guard!57 9/29/2017 srvctl add service -db stout_vico -service stout_snap.trivadistraining.com -role “PRIMARY,SNAPSHOT_STANDBY” -failovertype SELECT -failovermethod BASIC stout_SNAP.trivadistraining.com = (DESCRIPTION = (CONNECT_TIMEOUT = 5 )(TRANSPORT_CONNECT_TIMEOUT = 3 ) (ADDRESS_LIST = (LOAD_BALANCE = OFF ) (ADDRESS = (PROTOCOL = TCP )(HOST = vico01.trivadistraining.com )(PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP )(HOST = ludo01.trivadistraining.com )(PORT = 1521 )) ) (CONNECT_DATA = (SERVICE_NAME = stout_SNAP.trivadistraining.com ) ) )
  • 58. Get the Most out of Oracle Data Guard!58 9/29/2017 Demo?
  • 59. Use Case: Double SNAP STANDBY Get the Most out of Oracle Data Guard!59 9/29/2017 stout_ludo stout_vico stout_RW stout_SNAP CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role “SNAPSHOT_STANDBY” (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=piwo01)(PORT=1521)) stout_piwoMRP0
  • 60. Use Case: Double SNAP STANDBY Get the Most out of Oracle Data Guard!60 9/29/2017 stout_ludo stout_vico stout_RW stout_SNAP CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role “SNAPSHOT_STANDBY” (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=piwo01)(PORT=1521)) stout_piwo stout_SNAP
  • 61. Use Case: Double SNAP STANDBY Get the Most out of Oracle Data Guard!61 9/29/2017 stout_ludo stout_vico stout_RW CLIENTS srvctl add service -db stout_vico -service stout_SNAP -role “SNAPSHOT_STANDBY” (ADDRESS=(HOST=vico01)(PORT=1521)) (ADDRESS=(HOST=piwo01)(PORT=1521)) stout_piwo MRP0 stout_SNAP
  • 62. Two Standby Databases Use Case Get the Most out of Oracle Data Guard!62 9/29/2017 srvctl add service -db stout_vico -service stout_snap.trivadistraining.com -role “SNAPSHOT_STANDBY” -failovertype SELECT -failovermethod BASIC stout_SNAP.trivadistraining.com = (DESCRIPTION = (CONNECT_TIMEOUT = 5 )(TRANSPORT_CONNECT_TIMEOUT = 3 ) (ADDRESS_LIST = (LOAD_BALANCE = OFF ) (ADDRESS = (PROTOCOL = TCP )(HOST = vico01.trivadistraining.com )(PORT = 1521 )) (ADDRESS = (PROTOCOL = TCP )(HOST = piwo01.trivadistraining.com )(PORT = 1521 )) ) (CONNECT_DATA = (SERVICE_NAME = stout_SNAP.trivadistraining.com ) ) )
  • 63. Get the Most out of Oracle Data Guard! Standby Consistency on recovery cancel 9/29/201763
  • 64. stout_vico Redo Apply (roll-forward) Get the Most out of Oracle Data Guard!64 9/29/2017 BUFFER CACHE datafilesfuzzy datafiles dbw0 stout_ludo LGWR RFS MRP0 ol stbl arcarc ckpt
  • 65. Block status Get the Most out of Oracle Data Guard!65 9/29/2017 SQL> select status, dirty, count(*) from v$bh 2> group by status, dirty order by status, dirty; STATUS D COUNT(*) ---------- - ---------- free N 11 mrec N 3013 mrec Y 82 DGMGRL> edit database stout_vico set state='APPLY-OFF'; SQL> select status, dirty, count(*) from v$bh 2> group by status, dirty order by status, dirty; STATUS D COUNT(*) ---------- - ---------- free N 7012
  • 66. Block status Get the Most out of Oracle Data Guard!66 9/29/2017 SQL> select status, dirty, count(*) from v$bh 2> group by status, dirty order by status, dirty; STATUS D COUNT(*) ---------- - ---------- free N 11 mrec N 3013 mrec Y 82 DGMGRL> edit database stout_vico set state='APPLY-OFF'; SQL> select status, dirty, count(*) from v$bh 2> group by status, dirty order by status, dirty; STATUS D COUNT(*) ---------- - ---------- free N 7012 ORA-16037: user requested cancel of managed recovery operation Managed Standby Recovery not using Real Time Apply Recovery interrupted! Recovered data files to a consistent state at change 292504638291
  • 67. Consistent datafiles == consistent database Get the Most out of Oracle Data Guard!67 9/29/2017 No additional media recovery required before OPEN RESETLOGS – Cold backups via filesystem commands – Cloning possible without bother with Online or Archive Logs! Consistent Standby + ACFS Snapshots (or other) = Cheap Database Cloning
  • 68. Cloning solution based on Standby Database Get the Most out of Oracle Data Guard!68 9/29/2017 ludo01 GRID INFRASTRUCTURE 12cR2 DG +DATA ACFS /u02/fra ACFS /u02/data stout_ludo SNAPSHOT stout vico01 GRID INFRASTRUCTURE 12cR2 DG +DATA ACFS /u02/data ACFS /u02/fra stout_vico SNAPSHOT stout MRP0 SNAPSHOT clone1 clone1 SNAPSHOT COPYSNAPSHOT COPYSNAPSHOT COPYSNAPSHOT COPYSNAPSHOT COPYSNAPSHOT COPYSNAPSHOT Sunday
  • 69. Cloning Steps Get the Most out of Oracle Data Guard!69 9/29/2017 Snapshot creation – edit database stout_vico set state=‘APPLY-OFF’; – acfsutil snap create -w -p stout stout.`date +%A` /u02/data – alter database backup controlfile to trace as ‘/u02/data/.ACFS/snaps/…’ ; – create pfile=‘/u02/data/.ACFS/snaps/…’ from spfile; – edit database stout_vico set state=‘APPLY-ON’;
  • 70. Cloning Steps Get the Most out of Oracle Data Guard!70 9/29/2017 Cloning the database from the snapshot – Abort previous instance / delete previous snapshot – acfsutil snap create -w -p stout.`date +%A` clone1 /u02/data – sed -i -e ‘s/stout_vico/clones/g’ init.ora control_trace.trc – startup open resetlogs
  • 71. Get the Most out of Oracle Data Guard!71 9/29/2017 Demo?
  • 72. Get the Most out of Oracle Data Guard!72 9/29/2017 Let me do one more example
  • 73. Database reorganization live Get the Most out of Oracle Data Guard!73 9/29/2017 Setup physical standby Convert to logical standby << Here the standby is OPEN Stop SQL Apply Reorganize your database Start SQL Apply and catch the primary Switchover to Logical Standby
  • 74. Get the Most out of Oracle Data Guard! Conclusions 9/29/201774
  • 75. BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH Questions? Oracle Open World 2017 #OOW17 Ludovico Caldara Oracle ACE Director Senior Consultant