SlideShare a Scribd company logo
Zohar Elkayam
www.realdbamagic.com
Twitter: @realmgic
Oracle Data Guard
Broker: Overview
Who am I?
• Zohar Elkayam, CTO at Brillix
• Programmer, DBA, team leader, database trainer, public
speaker, and a senior consultant for over 18 years
• Oracle ACE Associate
• Part of ilOUG – Israel Oracle User Group
• Blogger – www.realdbamagic.com and www.ilDBA.co.il
2 http://brillix.co.il
About Brillix
• We offer complete, integrated end-to-end solutions based on best-of-
breed innovations in database, security and big data technologies
• We provide complete end-to-end 24x7 expert remote database
services
• We offer professional customized on-site trainings, delivered by our
top-notch world recognized instructors
3 http://brillix.co.il
Some of Our Customers
http://brillix.co.il4
Agenda
•Oracle Data Guard overview
•Dataguard broker introduction
•Configuring and using the data guard
•Live Demos
http://brillix.co.il5
What is Oracle Dataguard
Broker
http://brillix.co.il6
7
What Is Oracle Data Guard?
Primary
database
Standby
database
Database Database
copy
Redo transport
OracleNet
8
Oracle Data Guard: Architecture (Overview)
Primary
database
transactions MRP or
LSP
Standby
database
Archived redo
logs
Backup
Online
redo
logs
ARC0
RFS
Archived redo
logs
ARC0 Reports
Standby
redo logs
Oraclenet
LNSn
(Real-time
apply)
LGWR
Redo
buffer
Gap resolution
9
Primary Database Processes
Primary
database
transactions MRP or
LSP
Standby
database
Archived redo
logs
Backup
Online
redo
logs
ARC0
RFS
Archived redo
logs
ARC0 Reports
Standby
redo logs
Oraclenet
LNSn
(Real-time
apply)
LGWR
Redo
buffer
Gap resolution
10
Standby Database Processes
Primary
database
transactions MRP or
LSP
Standby
database
Archived redo
logs
Backup
Online
redo
logs
ARC0
RFS
Archived redo
logs
ARC0 Reports
Standby
redo logs
Oraclenet
LNSn
(Real-time
apply)
LGWR
Redo
buffer
Gap resolution
Oracle Data Guard Broker
• The Oracle Data Guard broker is a distributed management
framework
• The broker automates and centralizes the creation,
maintenance, and monitoring of Data Guard configurations
• With the broker, you can perform all management
operations locally or remotely with easy-to-use interfaces:
• Oracle Enterprise Manager Grid/Cloud Control
• DGMGRL (a command-line interface)
11
Benefits of Using the Data Guard Broker
• Enhances the high-availability, data protection, and disaster
protection capabilities inherent in Oracle Data Guard by
automating both configuration and monitoring tasks
• Streamlines the process for any one of the standby
databases to replace the primary database and take over
production processing
• Enables easy configuration of additional standby databases
12
Benefits of Using the Data Guard Broker (2)
•Provides simplified, centralized, and extended
management
•Automatically communicates between the databases in
a Data Guard configuration by using Oracle Net
Services
•Provides built-in validation that monitors the health of
all databases in the configuration
13
14
Comparing Configurations Capabilities
With the Broker Without the Broker
General Manage databases as one Manage databases separately
Creation of the
standby database
Use Grid Control wizards Manually create files
Configuration and
management
Configure and manage
from single interface
Set up services manually for each database
Monitoring • Monitor continuously
• Unified status and
reports
• Integrate with EM events
Monitor each database individually through
views and scripts
Control Invoke role transitions with
a single command
Coordinate sequences of multiple
commands across database sites for role
transitions
Data Guard Broker: Components
•Client-side:
• Oracle Enterprise Manager Grid Control
• DGMGRL (command-line interface)
•Server-side: Data Guard monitor
• DMON process
• Configuration files
15
16
Oracle Data Guard Broker Framework
CLI management client
Oracle
Management
Server
Enterprise Manager
Repository
Primary
database
Data
Guard
broker
Data
Guard
broker
AgentAgent
Standby
database
Data Guard Broker: Configurations
•The most common configuration is a primary database
at one location and a standby database at another
location.
17
pc00prmy
Primary site
pc00sby1
Standby site
Oracle Net
18
Data Guard Broker: Management Model
Data Guard Broker Configuration
Primary database
Broker-controlled
databases
Standby database
Standby database
Standby database
Standby database
Standby database
Standby database
Standby database
Standby database
Standby database
Instances
Instances
Data Guard Monitor: DMON Process
• Server-side background process
• Part of each database instance in the configuration
• Created when you start the broker
• Performs requested functions and monitors the resource
• Communicates with other DMON processes in the configuration
• Updates the configuration file
• Creates the drc<SID> trace file in the location set by the
DIAGNOSTIC_DEST initialization parameter
• Modifies initialization parameters during role transitions as necessary
20
Data Guard Broker Interfaces
•Command-line interface (CLI):
• Is started by entering DGMGRL at the command prompt
where the Oracle server or an Oracle client is installed
• Enables you to control and monitor a Data Guard
configuration from the prompt or in scripts
•Oracle Enterprise Manager Grid Control:
• Provides wizards to simplify creating and managing
standby databases
21
22
Using DGMGRL CLI
DGMGRL> connect sys/oracle
Connected.
DGMGRL> show configuration verbose
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxAvailability
Databases:
pc00prmy - Primary database
pc00sby1 - Physical standby database
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
SUCCESS
Creating a Data Guard Broker
Configuration
23
Data Guard Broker: Requirements
• Oracle Database Enterprise Edition
• Single-instance or multi-instance environment
• COMPATIBLE parameter: Set to 10.2.0.1.0 or later for both the primary
and standby databases
• Oracle Net Services network files: Must be configured for the primary
database and any existing standby databases. Enterprise Manager
Grid Control configures files for new standby databases.
• GLOBAL_DBNAME attribute: Set to a concatenation of
db_unique_name_DGMGRL.db_domain
24
Data Guard Broker: Requirements
• DG_BROKER_START initialization parameter set to TRUE
• Dataguard configuration in place and syncing
• All databases: MOUNT or OPEN mode
• DG_BROKER_CONFIG_FILEn: Configured for any RAC
databases
25
Data Guard Broker and the SPFILE
•You must use a server parameter file (SPFILE) for
initialization parameters
•Using the SPFILE enables the Data Guard broker to
keep its configuration file and the database SPFILE
consistent
•If you use the broker, use Enterprise Manager or
DGMGRL to update dataguard related parameters
26
Data Guard Monitor: Configuration File
• The broker configuration file is:
• Automatically created and named using a default path name and file name when the
broker is started
• Managed automatically by the DMON process
• The configuration file and a copy are created at each managed site with default
names:
• dr1<db_unique_name>.dat
• dr2<db_unique_name>.dat
• Configuration file default locations are operating-system specific:
• Default location for UNIX and Linux: ORACLE_HOME/dbs
• Default location for Windows: ORACLE_HOMEdatabase
• Use DG_BROKER_CONFIG_FILEn to override the default path name and file
name.
27
Data Guard Broker: Log Files
•The broker log files contain information recorded by
the DMON process
•There is one file for each database in the broker
configuration
•Broker log files are created in the same directory as
the alert log and are named
drc<$ORACLE_SID>.log
28
Creating a Broker Configuration
1. Invoke DGMGRL and connect to the primary database
2. Define the configuration, including a profile for the primary
database
3. Add standby databases to the configuration
4. Enable the configuration, including the databases
29
30
Defining the Broker Configuration (Primary)
DGMGRL> CREATE CONFIGURATION 'DGConfig1' AS
> PRIMARY DATABASE IS pc00prmy
> CONNECT IDENTIFIER IS pc00prmy;
Configuration "DGConfig1" created with primary
database "pc00prmy"
DGMGRL>
31
Adding Standby Databases to the
Configuration
DGMGRL> ADD DATABASE pc00sby1 AS
> CONNECT IDENTIFIER IS pc00sby1;
Database "pc00sby1" added
DGMGRL>
32
Enabling the Configuration
DGMGRL> ENABLE CONFIGURATION;
Enabled.
DGMGRL> SHOW CONFIGURATION
Configuration
Name: DGConfig1
Enabled: YES
Protection Mode: MaxPerformance
Databases:
pc00prmy - Primary database
pc00sby1 - Physical standby database
Fast-Start Failover: DISABLED
Current status for "DGConfig1":
SUCCESS
Changing Database Properties and States
•To alter a database property:
•To alter the state of the standby database:
•To alter the state of the primary database:
33
DGMGRL> EDIT DATABASE pc00sby1
> SET PROPERTY LogXptMode='SYNC';
DGMGRL> EDIT DATABASE pc00sby1 SET STATE='APPLY-OFF';
DGMGRL> EDIT DATABASE pc00prmy
> SET STATE='TRANSPORT-OFF';
Managing Redo Transport Services Using
DGMGRL
•Specify database properties to manage redo transport
services:
• DGConnectIdentifier
• StaticConnectIdentifier
• LogShipping
• LogXptMode (SYNC/ASYNC)
34
Using the DGConnectIdentifier Property
• DGConnectIdentifier:
• Specifies the connection identifier that is used by the broker to connect to a
database
• Is set when a database is either added to the Data Guard broker
configuration to the value specified in the optional CONNECT IDENTIFIER
CLAUSE, or is extracted from the SERVICE attribute of the
LOG_ARCHIVE_DEST_n initialization parameter
• The DGConnectIdentifier value is used in the FAL_SERVER and
FAL_CLIENT initialization parameters
• Changing the value of DGConnectIdentifier causes an update of
the LOG_ARCHIVE_DEST_n SERVICE attribute and the FAL_SERVER
and FAL_CLIENT parameters
35
Using StaticConnectIdentifier
•In order to have seamless switchover, failover and
convert operation we must define a static listener entry
•Failing to configure static entries will result with manual
steps during these operations
•The default entry should be named “<sid>_DGMGRL”
but can be modified by changing the
StaticConnectIdentifier parameter
http://brillix.co.il36
Controlling the Shipping of Redo Data
•LogShipping controls whether archived redo log files
are sent to a specified standby database.
•LogShipping is applicable only when the primary
database state is set to TRANSPORT-ON.
37
Creating the Broker Demo
38
Switchover
•Transitions the roles of the primary and standby
databases
•Requires no resetting of the online redo logs of the
new primary database
•Incurs no data loss
•Causes users to disconnect from primary
39
Performing a Switchover by Using DGMGRL
• After verifying the conditions required for a switchover,
execute the SWITCHOVER command:
40
DGMGRL> switchover to orcldg
Performing switchover NOW, please wait...
Operation requires a connection to instance "orcldg" on
database "orcldg"
Connecting to instance "orcldg"...
Connected.
New primary database "orcldg" is opening...
Operation requires startup of instance "orcl" on
database "orcl"
Starting instance "orcl"...
ORACLE instance started.
Database mounted.
Database opened.
witchover succeeded, new primary is "orcldg"
41
Failover
Standby
database becomes primary
database.
Read/write
transactions
Online redo
logs
Local
archiving
San Francisco
Boston
Archived redo
logs
Application
Online Redo
Logs
Local
Archiving
Archived redo
logs
Primary database
Performing a Failover Using DGMGRL
1. Execute the FAILOVER command to initiate the failover
operation:
2. Reset the protection mode (if necessary)
3. Reinstate the primary database to serve as a standby
database in the configuration
4. Reinstate or re-create other disabled standby databases in
the configuration
42
DGMGRL> FAILOVER TO 'orcldg' [IMMEDIATE];
Re-enabling Disabled Databases Using
DGMGRL
• Disabled databases must be reinstated or re-created to re-
enable broker management.
• Reinstate a database using REINSTATE DATABASE:
• If you cannot reinstate a database, re-create it from a copy of
the primary database and then re-enable the database by
using ENABLE DATABASE:
43
DGMGRL> REINSTATE DATABASE orcl;
DGMGRL> ENABLE DATABASE orcl;
Snapshot Standby Databases: Overview
•A snapshot standby database is a fully updatable
standby database created by converting a physical
standby database.
•Snapshot standby databases receive and archive—but
do not apply—redo data from a primary database.
•When the physical standby database is converted, an
implicit guaranteed restore point is created and
Flashback Database is enabled.
44
45
Snapshot Standby Database: Architecture
LGWR
Primary database
transactions
Online
redo
logs
ARC0
RFS
MRP
Archived redo
logs
ARC0
Standby
redo logs
Archived redo
logs Oracle
net
LNSn
Transactions
Snapshot
standby
database
Converting to a Snapshot Standby Database
• To convert a physical standby database to a snapshot
standby database:
46
DGMGRL> convert database orcl to snapshot standby;
Converting database "orcl" to a Snapshot Standby
database, please wait...
Database "orcl" converted successfully
Converting Snapshot Standby to Physical
Standby
•Convert the snapshot standby database back to a
physical standby database:
47
DGMGRL> CONVERT DATABASE orcl
>TO PHYSICAL STANDBY;
[…]
Database "orcl" converted successfully
• Disable broker management of the configuration:
• Disable broker management of a standby database:
Disabling Broker Management
48
DGMGRL> DISABLE CONFIGURATION;
DGMGRL> DISABLE DATABASE 'orcl';
Removing the Configuration or Standby
Database
•Remove a standby database from the configuration:
•Remove the configuration:
49
DGMGRL> REMOVE DATABASE 'orcldg';
DGMGRL> REMOVE CONFIGURATION;
Switchover and Snapshot
Standby Demo
http://brillix.co.il50
Q&A
http://brillix.co.il51
Summary
•We talked about Oracle Data Guard Broker
•We configured a broker for primary and standby
•We learned about several of the important parameters
http://brillix.co.il52
Thank You
Zohar Elkayam
twitter: @realmgic
Zohar@Brillix.co.il
www.realdbamagic.com
http://brillix.co.il53

More Related Content

PDF
Understanding oracle rac internals part 2 - slides
PPT
Oracle backup and recovery
PPT
Dataguard presentation
PDF
Backup and recovery in oracle
PPTX
Oracle sql high performance tuning
PDF
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
PPTX
Oracle database performance tuning
PPT
Oracle archi ppt
Understanding oracle rac internals part 2 - slides
Oracle backup and recovery
Dataguard presentation
Backup and recovery in oracle
Oracle sql high performance tuning
Oracle Database Performance Tuning Advanced Features and Best Practices for DBAs
Oracle database performance tuning
Oracle archi ppt

What's hot (20)

PDF
Ash and awr deep dive hotsos
PDF
One PDB to go, please!
PDF
Oracle Database performance tuning using oratop
PPTX
Oracle DBA
PPTX
Basic oracle-database-administration
PDF
Oracle statistics by example
PDF
Oracle data guard for beginners
PDF
Oracle Active Data Guard: Best Practices and New Features Deep Dive
PPT
Oracle Data Guard
PPTX
The oracle database architecture
PPS
Oracle Database Overview
PDF
Oracle RAC 19c: Best Practices and Secret Internals
PPT
Oracle GoldenGate
PDF
Same plan different performance
PDF
Oracle RAC 12c Overview
PDF
Exploring Oracle Multitenant in Oracle Database 12c
PPTX
Data Guard Architecture & Setup
PPTX
What to Expect From Oracle database 19c
PDF
Oracle Database SQL Tuning Concept
PPTX
Oracle Database Performance Tuning Basics
Ash and awr deep dive hotsos
One PDB to go, please!
Oracle Database performance tuning using oratop
Oracle DBA
Basic oracle-database-administration
Oracle statistics by example
Oracle data guard for beginners
Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Data Guard
The oracle database architecture
Oracle Database Overview
Oracle RAC 19c: Best Practices and Secret Internals
Oracle GoldenGate
Same plan different performance
Oracle RAC 12c Overview
Exploring Oracle Multitenant in Oracle Database 12c
Data Guard Architecture & Setup
What to Expect From Oracle database 19c
Oracle Database SQL Tuning Concept
Oracle Database Performance Tuning Basics
Ad

Viewers also liked (20)

PDF
Oracle 12c New Features For Better Performance
PPT
High Availability And Oracle Data Guard 11g R2
PPTX
Simplify Consolidation with Oracle Pluggable Databases
PPTX
Simplify Consolidation with Oracle Database 12c
PPTX
Oracle 12c Multi Tenant
PDF
Oracle Data Guard A to Z
PPTX
Is SQLcl the Next Generation of SQL*Plus?
PDF
Oracle Database 12c Multitenant for Consolidation
PDF
Exploring Oracle Database 12c Multitenant best practices for your Cloud
PDF
Active dataguard
PPTX
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
PPTX
Database Consolidation using the Oracle Multitenant Architecture
PDF
Oracle E-Business Suite R12.2.5 on Database 12c: Install, Patch and Administer
PDF
Oracle Multitenant meets Oracle RAC - IOUG 2014 Version
PPTX
Data Guard25 August
PPTX
PL/SQL All the Things in Oracle SQL Developer
PDF
Oracle 12.2 sharded database management
PPTX
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
PPT
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
DOC
Analyzing awr report
Oracle 12c New Features For Better Performance
High Availability And Oracle Data Guard 11g R2
Simplify Consolidation with Oracle Pluggable Databases
Simplify Consolidation with Oracle Database 12c
Oracle 12c Multi Tenant
Oracle Data Guard A to Z
Is SQLcl the Next Generation of SQL*Plus?
Oracle Database 12c Multitenant for Consolidation
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Active dataguard
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Database Consolidation using the Oracle Multitenant Architecture
Oracle E-Business Suite R12.2.5 on Database 12c: Install, Patch and Administer
Oracle Multitenant meets Oracle RAC - IOUG 2014 Version
Data Guard25 August
PL/SQL All the Things in Oracle SQL Developer
Oracle 12.2 sharded database management
Pennsylvania Banner User Group Webinar: Oracle SQL Developer Tips & Tricks
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Analyzing awr report
Ad

Similar to Introduction to Oracle Data Guard Broker (20)

PDF
Oracle Data Guard Broker Webinar
PDF
Dg broker &amp; client connectivity - High Availability Day 2015
PPT
D17316 gc20 l03_broker_em
PDF
Oracle Data Guard for Beginners
PDF
IOUG Collaborate 18 - Data Guard for Beginners
PDF
Oracle data guard broker 12c
PDF
Oracle Data Guard Broker Configuration
PDF
Dataguard broker and observerst
PPT
D79232GC10_les01.ppt
PDF
Dataguard Switchover Best Practices using DGMGRL (Dataguard Broker Command Line)
PDF
Real-Time Query for Data Guard
PPTX
Get the most out of Oracle Data Guard - POUG version
PPTX
Get the most out of Oracle Data Guard - OOW version
PDF
Data guard oracle
PDF
Disaster Recovery pomocí Oracle Cloudu
PDF
Broker otw.pptx
PDF
PDF
oracle10g datagurad
PPTX
Fast Start Failover DataGuard
PDF
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation
Oracle Data Guard Broker Webinar
Dg broker &amp; client connectivity - High Availability Day 2015
D17316 gc20 l03_broker_em
Oracle Data Guard for Beginners
IOUG Collaborate 18 - Data Guard for Beginners
Oracle data guard broker 12c
Oracle Data Guard Broker Configuration
Dataguard broker and observerst
D79232GC10_les01.ppt
Dataguard Switchover Best Practices using DGMGRL (Dataguard Broker Command Line)
Real-Time Query for Data Guard
Get the most out of Oracle Data Guard - POUG version
Get the most out of Oracle Data Guard - OOW version
Data guard oracle
Disaster Recovery pomocí Oracle Cloudu
Broker otw.pptx
oracle10g datagurad
Fast Start Failover DataGuard
Nabil Nawaz Oracle Oracle 12c Data Guard Deep Dive Presentation

More from Zohar Elkayam (20)

PDF
Docker Concepts for Oracle/MySQL DBAs and DevOps
PDF
PL/SQL New and Advanced Features for Extreme Performance
PDF
The art of querying – newest and advanced SQL techniques
PDF
Oracle Advanced SQL and Analytic Functions
PDF
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
PDF
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
PDF
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
PDF
Rapid Cluster Computing with Apache Spark 2016
PDF
Advanced PL/SQL Optimizing for Better Performance 2016
PDF
Oracle Database Advanced Querying (2016)
PPTX
MySQL 5.7 New Features for Developers
PDF
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
PPTX
Exploring Advanced SQL Techniques Using Analytic Functions
PDF
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
PPTX
Exploring Advanced SQL Techniques Using Analytic Functions
PDF
Advanced PLSQL Optimizing for Better Performance
PDF
Oracle Database Advanced Querying
PDF
The Hadoop Ecosystem for Developers
PDF
Big data for cio 2015
PDF
SQLcl the next generation of SQLPlus?
Docker Concepts for Oracle/MySQL DBAs and DevOps
PL/SQL New and Advanced Features for Extreme Performance
The art of querying – newest and advanced SQL techniques
Oracle Advanced SQL and Analytic Functions
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem 20170527
Things Every Oracle DBA Needs to Know About the Hadoop Ecosystem (c17lv version)
Things Every Oracle DBA Needs To Know About The Hadoop Ecosystem
Rapid Cluster Computing with Apache Spark 2016
Advanced PL/SQL Optimizing for Better Performance 2016
Oracle Database Advanced Querying (2016)
MySQL 5.7 New Features for Developers
OOW2016: Exploring Advanced SQL Techniques Using Analytic Functions
Exploring Advanced SQL Techniques Using Analytic Functions
Things Every Oracle DBA Needs to Know about the Hadoop Ecosystem
Exploring Advanced SQL Techniques Using Analytic Functions
Advanced PLSQL Optimizing for Better Performance
Oracle Database Advanced Querying
The Hadoop Ecosystem for Developers
Big data for cio 2015
SQLcl the next generation of SQLPlus?

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Getting Started with Data Integration: FME Form 101
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Machine Learning_overview_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
The Rise and Fall of 3GPP – Time for a Sabbatical?
Dropbox Q2 2025 Financial Results & Investor Presentation
Group 1 Presentation -Planning and Decision Making .pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Spectroscopy.pptx food analysis technology
Machine learning based COVID-19 study performance prediction
Getting Started with Data Integration: FME Form 101
Mobile App Security Testing_ A Comprehensive Guide.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf
Tartificialntelligence_presentation.pptx
Spectral efficient network and resource selection model in 5G networks
Machine Learning_overview_presentation.pptx

Introduction to Oracle Data Guard Broker

  • 2. Who am I? • Zohar Elkayam, CTO at Brillix • Programmer, DBA, team leader, database trainer, public speaker, and a senior consultant for over 18 years • Oracle ACE Associate • Part of ilOUG – Israel Oracle User Group • Blogger – www.realdbamagic.com and www.ilDBA.co.il 2 http://brillix.co.il
  • 3. About Brillix • We offer complete, integrated end-to-end solutions based on best-of- breed innovations in database, security and big data technologies • We provide complete end-to-end 24x7 expert remote database services • We offer professional customized on-site trainings, delivered by our top-notch world recognized instructors 3 http://brillix.co.il
  • 4. Some of Our Customers http://brillix.co.il4
  • 5. Agenda •Oracle Data Guard overview •Dataguard broker introduction •Configuring and using the data guard •Live Demos http://brillix.co.il5
  • 6. What is Oracle Dataguard Broker http://brillix.co.il6
  • 7. 7 What Is Oracle Data Guard? Primary database Standby database Database Database copy Redo transport OracleNet
  • 8. 8 Oracle Data Guard: Architecture (Overview) Primary database transactions MRP or LSP Standby database Archived redo logs Backup Online redo logs ARC0 RFS Archived redo logs ARC0 Reports Standby redo logs Oraclenet LNSn (Real-time apply) LGWR Redo buffer Gap resolution
  • 9. 9 Primary Database Processes Primary database transactions MRP or LSP Standby database Archived redo logs Backup Online redo logs ARC0 RFS Archived redo logs ARC0 Reports Standby redo logs Oraclenet LNSn (Real-time apply) LGWR Redo buffer Gap resolution
  • 10. 10 Standby Database Processes Primary database transactions MRP or LSP Standby database Archived redo logs Backup Online redo logs ARC0 RFS Archived redo logs ARC0 Reports Standby redo logs Oraclenet LNSn (Real-time apply) LGWR Redo buffer Gap resolution
  • 11. Oracle Data Guard Broker • The Oracle Data Guard broker is a distributed management framework • The broker automates and centralizes the creation, maintenance, and monitoring of Data Guard configurations • With the broker, you can perform all management operations locally or remotely with easy-to-use interfaces: • Oracle Enterprise Manager Grid/Cloud Control • DGMGRL (a command-line interface) 11
  • 12. Benefits of Using the Data Guard Broker • Enhances the high-availability, data protection, and disaster protection capabilities inherent in Oracle Data Guard by automating both configuration and monitoring tasks • Streamlines the process for any one of the standby databases to replace the primary database and take over production processing • Enables easy configuration of additional standby databases 12
  • 13. Benefits of Using the Data Guard Broker (2) •Provides simplified, centralized, and extended management •Automatically communicates between the databases in a Data Guard configuration by using Oracle Net Services •Provides built-in validation that monitors the health of all databases in the configuration 13
  • 14. 14 Comparing Configurations Capabilities With the Broker Without the Broker General Manage databases as one Manage databases separately Creation of the standby database Use Grid Control wizards Manually create files Configuration and management Configure and manage from single interface Set up services manually for each database Monitoring • Monitor continuously • Unified status and reports • Integrate with EM events Monitor each database individually through views and scripts Control Invoke role transitions with a single command Coordinate sequences of multiple commands across database sites for role transitions
  • 15. Data Guard Broker: Components •Client-side: • Oracle Enterprise Manager Grid Control • DGMGRL (command-line interface) •Server-side: Data Guard monitor • DMON process • Configuration files 15
  • 16. 16 Oracle Data Guard Broker Framework CLI management client Oracle Management Server Enterprise Manager Repository Primary database Data Guard broker Data Guard broker AgentAgent Standby database
  • 17. Data Guard Broker: Configurations •The most common configuration is a primary database at one location and a standby database at another location. 17 pc00prmy Primary site pc00sby1 Standby site Oracle Net
  • 18. 18 Data Guard Broker: Management Model Data Guard Broker Configuration Primary database Broker-controlled databases Standby database Standby database Standby database Standby database Standby database Standby database Standby database Standby database Standby database Instances Instances
  • 19. Data Guard Monitor: DMON Process • Server-side background process • Part of each database instance in the configuration • Created when you start the broker • Performs requested functions and monitors the resource • Communicates with other DMON processes in the configuration • Updates the configuration file • Creates the drc<SID> trace file in the location set by the DIAGNOSTIC_DEST initialization parameter • Modifies initialization parameters during role transitions as necessary 20
  • 20. Data Guard Broker Interfaces •Command-line interface (CLI): • Is started by entering DGMGRL at the command prompt where the Oracle server or an Oracle client is installed • Enables you to control and monitor a Data Guard configuration from the prompt or in scripts •Oracle Enterprise Manager Grid Control: • Provides wizards to simplify creating and managing standby databases 21
  • 21. 22 Using DGMGRL CLI DGMGRL> connect sys/oracle Connected. DGMGRL> show configuration verbose Configuration Name: DGConfig1 Enabled: YES Protection Mode: MaxAvailability Databases: pc00prmy - Primary database pc00sby1 - Physical standby database Fast-Start Failover: DISABLED Current status for "DGConfig1": SUCCESS
  • 22. Creating a Data Guard Broker Configuration 23
  • 23. Data Guard Broker: Requirements • Oracle Database Enterprise Edition • Single-instance or multi-instance environment • COMPATIBLE parameter: Set to 10.2.0.1.0 or later for both the primary and standby databases • Oracle Net Services network files: Must be configured for the primary database and any existing standby databases. Enterprise Manager Grid Control configures files for new standby databases. • GLOBAL_DBNAME attribute: Set to a concatenation of db_unique_name_DGMGRL.db_domain 24
  • 24. Data Guard Broker: Requirements • DG_BROKER_START initialization parameter set to TRUE • Dataguard configuration in place and syncing • All databases: MOUNT or OPEN mode • DG_BROKER_CONFIG_FILEn: Configured for any RAC databases 25
  • 25. Data Guard Broker and the SPFILE •You must use a server parameter file (SPFILE) for initialization parameters •Using the SPFILE enables the Data Guard broker to keep its configuration file and the database SPFILE consistent •If you use the broker, use Enterprise Manager or DGMGRL to update dataguard related parameters 26
  • 26. Data Guard Monitor: Configuration File • The broker configuration file is: • Automatically created and named using a default path name and file name when the broker is started • Managed automatically by the DMON process • The configuration file and a copy are created at each managed site with default names: • dr1<db_unique_name>.dat • dr2<db_unique_name>.dat • Configuration file default locations are operating-system specific: • Default location for UNIX and Linux: ORACLE_HOME/dbs • Default location for Windows: ORACLE_HOMEdatabase • Use DG_BROKER_CONFIG_FILEn to override the default path name and file name. 27
  • 27. Data Guard Broker: Log Files •The broker log files contain information recorded by the DMON process •There is one file for each database in the broker configuration •Broker log files are created in the same directory as the alert log and are named drc<$ORACLE_SID>.log 28
  • 28. Creating a Broker Configuration 1. Invoke DGMGRL and connect to the primary database 2. Define the configuration, including a profile for the primary database 3. Add standby databases to the configuration 4. Enable the configuration, including the databases 29
  • 29. 30 Defining the Broker Configuration (Primary) DGMGRL> CREATE CONFIGURATION 'DGConfig1' AS > PRIMARY DATABASE IS pc00prmy > CONNECT IDENTIFIER IS pc00prmy; Configuration "DGConfig1" created with primary database "pc00prmy" DGMGRL>
  • 30. 31 Adding Standby Databases to the Configuration DGMGRL> ADD DATABASE pc00sby1 AS > CONNECT IDENTIFIER IS pc00sby1; Database "pc00sby1" added DGMGRL>
  • 31. 32 Enabling the Configuration DGMGRL> ENABLE CONFIGURATION; Enabled. DGMGRL> SHOW CONFIGURATION Configuration Name: DGConfig1 Enabled: YES Protection Mode: MaxPerformance Databases: pc00prmy - Primary database pc00sby1 - Physical standby database Fast-Start Failover: DISABLED Current status for "DGConfig1": SUCCESS
  • 32. Changing Database Properties and States •To alter a database property: •To alter the state of the standby database: •To alter the state of the primary database: 33 DGMGRL> EDIT DATABASE pc00sby1 > SET PROPERTY LogXptMode='SYNC'; DGMGRL> EDIT DATABASE pc00sby1 SET STATE='APPLY-OFF'; DGMGRL> EDIT DATABASE pc00prmy > SET STATE='TRANSPORT-OFF';
  • 33. Managing Redo Transport Services Using DGMGRL •Specify database properties to manage redo transport services: • DGConnectIdentifier • StaticConnectIdentifier • LogShipping • LogXptMode (SYNC/ASYNC) 34
  • 34. Using the DGConnectIdentifier Property • DGConnectIdentifier: • Specifies the connection identifier that is used by the broker to connect to a database • Is set when a database is either added to the Data Guard broker configuration to the value specified in the optional CONNECT IDENTIFIER CLAUSE, or is extracted from the SERVICE attribute of the LOG_ARCHIVE_DEST_n initialization parameter • The DGConnectIdentifier value is used in the FAL_SERVER and FAL_CLIENT initialization parameters • Changing the value of DGConnectIdentifier causes an update of the LOG_ARCHIVE_DEST_n SERVICE attribute and the FAL_SERVER and FAL_CLIENT parameters 35
  • 35. Using StaticConnectIdentifier •In order to have seamless switchover, failover and convert operation we must define a static listener entry •Failing to configure static entries will result with manual steps during these operations •The default entry should be named “<sid>_DGMGRL” but can be modified by changing the StaticConnectIdentifier parameter http://brillix.co.il36
  • 36. Controlling the Shipping of Redo Data •LogShipping controls whether archived redo log files are sent to a specified standby database. •LogShipping is applicable only when the primary database state is set to TRANSPORT-ON. 37
  • 38. Switchover •Transitions the roles of the primary and standby databases •Requires no resetting of the online redo logs of the new primary database •Incurs no data loss •Causes users to disconnect from primary 39
  • 39. Performing a Switchover by Using DGMGRL • After verifying the conditions required for a switchover, execute the SWITCHOVER command: 40 DGMGRL> switchover to orcldg Performing switchover NOW, please wait... Operation requires a connection to instance "orcldg" on database "orcldg" Connecting to instance "orcldg"... Connected. New primary database "orcldg" is opening... Operation requires startup of instance "orcl" on database "orcl" Starting instance "orcl"... ORACLE instance started. Database mounted. Database opened. witchover succeeded, new primary is "orcldg"
  • 40. 41 Failover Standby database becomes primary database. Read/write transactions Online redo logs Local archiving San Francisco Boston Archived redo logs Application Online Redo Logs Local Archiving Archived redo logs Primary database
  • 41. Performing a Failover Using DGMGRL 1. Execute the FAILOVER command to initiate the failover operation: 2. Reset the protection mode (if necessary) 3. Reinstate the primary database to serve as a standby database in the configuration 4. Reinstate or re-create other disabled standby databases in the configuration 42 DGMGRL> FAILOVER TO 'orcldg' [IMMEDIATE];
  • 42. Re-enabling Disabled Databases Using DGMGRL • Disabled databases must be reinstated or re-created to re- enable broker management. • Reinstate a database using REINSTATE DATABASE: • If you cannot reinstate a database, re-create it from a copy of the primary database and then re-enable the database by using ENABLE DATABASE: 43 DGMGRL> REINSTATE DATABASE orcl; DGMGRL> ENABLE DATABASE orcl;
  • 43. Snapshot Standby Databases: Overview •A snapshot standby database is a fully updatable standby database created by converting a physical standby database. •Snapshot standby databases receive and archive—but do not apply—redo data from a primary database. •When the physical standby database is converted, an implicit guaranteed restore point is created and Flashback Database is enabled. 44
  • 44. 45 Snapshot Standby Database: Architecture LGWR Primary database transactions Online redo logs ARC0 RFS MRP Archived redo logs ARC0 Standby redo logs Archived redo logs Oracle net LNSn Transactions Snapshot standby database
  • 45. Converting to a Snapshot Standby Database • To convert a physical standby database to a snapshot standby database: 46 DGMGRL> convert database orcl to snapshot standby; Converting database "orcl" to a Snapshot Standby database, please wait... Database "orcl" converted successfully
  • 46. Converting Snapshot Standby to Physical Standby •Convert the snapshot standby database back to a physical standby database: 47 DGMGRL> CONVERT DATABASE orcl >TO PHYSICAL STANDBY; […] Database "orcl" converted successfully
  • 47. • Disable broker management of the configuration: • Disable broker management of a standby database: Disabling Broker Management 48 DGMGRL> DISABLE CONFIGURATION; DGMGRL> DISABLE DATABASE 'orcl';
  • 48. Removing the Configuration or Standby Database •Remove a standby database from the configuration: •Remove the configuration: 49 DGMGRL> REMOVE DATABASE 'orcldg'; DGMGRL> REMOVE CONFIGURATION;
  • 49. Switchover and Snapshot Standby Demo http://brillix.co.il50
  • 51. Summary •We talked about Oracle Data Guard Broker •We configured a broker for primary and standby •We learned about several of the important parameters http://brillix.co.il52
  • 52. Thank You Zohar Elkayam twitter: @realmgic [email protected] www.realdbamagic.com http://brillix.co.il53