Oracle Data Guard 11gR2 Administration Beginner's Guide
By Emre Baransel and Nassyam Basha
()
About this ebook
Related to Oracle Data Guard 11gR2 Administration Beginner's Guide
Related ebooks
Oracle 11g Streams Implementer's Guide Rating: 0 out of 5 stars0 ratingsGetting Started with Oracle Data Integrator 11g: A Hands-On Tutorial Rating: 5 out of 5 stars5/5Oracle GoldenGate 12c Implementer's Guide Rating: 0 out of 5 stars0 ratingsOracle Database 12c Backup and Recovery Survival Guide Rating: 5 out of 5 stars5/5Introduction to Oracle Database Administration Rating: 5 out of 5 stars5/5Oracle Information Integration, Migration, and Consolidation Rating: 0 out of 5 stars0 ratingsStarting Database Administration: Oracle DBA Rating: 3 out of 5 stars3/5Advanced Oracle PL/SQL Developer's Guide - Second Edition Rating: 4 out of 5 stars4/5Oracle Database 11g - Underground Advice for Database Administrators: Beyond the basics Rating: 0 out of 5 stars0 ratingsGetting Started with Oracle WebLogic Server 12c: Developer’s Guide Rating: 0 out of 5 stars0 ratingsOracle SOA Suite 12c Administrator's Guide Rating: 0 out of 5 stars0 ratingsOracle GoldenGate 11g Implementer's guide Rating: 5 out of 5 stars5/5Oracle Recovery Appliance Handbook: An Insider’S Insight Rating: 0 out of 5 stars0 ratingsOracle ADF 11gR2 Development Beginner's Guide Rating: 0 out of 5 stars0 ratingsOracle: Protect Your Data Rating: 0 out of 5 stars0 ratingsLearning Hadoop 2 Rating: 4 out of 5 stars4/5IBM WebSphere Application Server 8.0 Administration Guide Rating: 0 out of 5 stars0 ratingsSQL Server 2016 Developer's Guide Rating: 0 out of 5 stars0 ratingsMicrosoft SQL Server 2014 Business Intelligence Development Beginner’s Guide Rating: 0 out of 5 stars0 ratingsHadoop: Data Processing and Modelling Rating: 0 out of 5 stars0 ratingsLearning Informatica PowerCenter 9.x Rating: 3 out of 5 stars3/5Oracle SOA Suite 11g Administrator's Handbook Rating: 0 out of 5 stars0 ratingsOracle Database 12c Release 2 New Features Rating: 0 out of 5 stars0 ratingsOracle Ultimate DBA Interview Questions Rating: 5 out of 5 stars5/5Oracle 11g R1/R2 Real Application Clusters Essentials Rating: 5 out of 5 stars5/5Basic DBA Query v.1: Oracle Database Rating: 5 out of 5 stars5/5Oracle Database 12c Quickstart Rating: 5 out of 5 stars5/5Oracle Data Guard A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsOracle 19c AutoUpgrade Best Practices: A Step-by-step Expert-led Database Upgrade Guide to Oracle 19c Using AutoUpgrade Utility Rating: 0 out of 5 stars0 ratingsOCA Oracle Database 11g Database Administration I: A Real-World Certification Guide Rating: 4 out of 5 stars4/5
Enterprise Applications For You
QuickBooks 2024 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsBitcoin For Dummies Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Enterprise AI For Dummies Rating: 3 out of 5 stars3/5QuickBooks 2023 All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsExcel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsExcel Formulas That Automate Tasks You No Longer Have Time For Rating: 5 out of 5 stars5/5Scrivener For Dummies Rating: 4 out of 5 stars4/5Excel 2016 For Dummies Rating: 4 out of 5 stars4/5Managing Humans: Biting and Humorous Tales of a Software Engineering Manager Rating: 4 out of 5 stars4/5Excel All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsExcel Formulas and Functions 2020: Excel Academy, #1 Rating: 4 out of 5 stars4/5Learn Windows PowerShell in a Month of Lunches Rating: 0 out of 5 stars0 ratingsExcel Data Analysis For Dummies Rating: 0 out of 5 stars0 ratingsQuickBooks 2021 For Dummies Rating: 0 out of 5 stars0 ratingsAccess 2019 For Dummies Rating: 0 out of 5 stars0 ratingsChatGPT Ultimate User Guide - How to Make Money Online Faster and More Precise Using AI Technology Rating: 1 out of 5 stars1/5The New Email Revolution: Save Time, Make Money, and Write Emails People Actually Want to Read! Rating: 5 out of 5 stars5/5101 Ready-to-Use Excel Formulas Rating: 4 out of 5 stars4/5Microsoft Teams For Dummies Rating: 0 out of 5 stars0 ratings50 Useful Excel Functions: Excel Essentials, #3 Rating: 5 out of 5 stars5/5
Reviews for Oracle Data Guard 11gR2 Administration Beginner's Guide
0 ratings0 reviews
Book preview
Oracle Data Guard 11gR2 Administration Beginner's Guide - Emre Baransel
Table of Contents
Oracle Data Guard 11gR2 Administration Beginner's Guide
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Time for action – heading
What just happened?
Pop quiz – heading
Have a go hero – heading
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started
What is Data Guard?
Standby database
Physical standby database
Logical standby database
Snapshot standby database
Oracle Data Guard evolution
Version 7.3 – stone age
Version 8i – first age
Version 9i – middle age
Version 10g – new age
Version 11g – modern age
Oracle Data Guard architecture
Data Guard services
Redo transport services
Protection modes
Apply services
Redo Apply (physical standby databases)
Monitoring Redo Apply
Time for action – monitoring Redo Apply
What just happened?
Pop quiz – real-time apply consideration
SQL Apply (logical standby databases)
Role transitions
Switchover
Failover
Fast-start failover
User interfaces for administering Data Guard
SQL*Plus
DGMGRL
Enterprise Manager
Time for action – using interfaces to monitor Data Guard
What just happened?
Data Guard background processes
Other replication solutions and Data Guard
Storage-based replication solutions
GoldenGate and Streams
Summary
2. Configuring the Oracle Data Guard Physical Standby Database
Preconfiguration for Data Guard
Data loss consideration
Network bandwidth consideration
Preparing the primary database
Archive log mode
Time for action – enabling the archive log mode
What just happened?
Force logging
Time for action – enabling force logging
What just happened?
Standby redo logs
Time for action – configuring standby redo logs on primary
What just happened?
Fast recovery area (FRA)
Time for action – enabling FRA
What just happened?
Understanding initialization parameters
DB_NAME
DB_UNIQUE_NAME
LOG_ARCHIVE_CONFIG
LOG_ARCHIVE_MAX_PROCESSES
LOG_ARCHIVE_DEST_n
LOCATION and SERVICE
VALID_FOR
SYNC and ASYNC
AFFIRM and NOAFFIRM
COMPRESSION
MAX_CONNECTIONS
MAX_FAILURE
REOPEN
NET_TIMEOUT
DELAY
LOG_ARCHIVE_DEST_STATE_n
What just happened?
Creating the physical standby database
Standby database related initialization parameters
FAL_SERVER
STANDBY_FILE_MANAGEMENT
DB_FILE_NAME_CONVERT
LOG_FILE_NAME_CONVERT
The physical standby database instance
Time for action – starting the physical standby instance and making it ready for the RMAN duplicate
What just happened?
Using RMAN duplicate to create physical standby databases
Time for action – running an RMAN duplicate
What just happened?
Post-installation steps
Verifying the standby database configuration
Time for action – verifying the standby database configuration
What just happened?
Managing Redo Apply
Time for action – starting, stopping, and monitoring MRP
What just happened?
Verifying synchronization between the primary and standby databases
Time for action – verifying synchronization between the primary and standby databases
What just happened?
Time for action – testing real-time apply
What just happened?
Have a go hero – checking the network latency effect on real-time apply
Summary
3. Configuring Oracle Data Guard Logical Standby Database
Logical standby database characteristics
Not everything must be duplicated
Use for reporting at all times
Independent standby database objects
Protecting writes on replicated standby tables
Limitation for specific data types and objects
High availability and disaster recovery considerations
Preparation for the configuration
Time for action – checking for the unsupported data types
What just happened?
Time for action – searching for and fixing any table row uniqueness problem
What just happened?
Creating a logical standby database
Time for action – making a physical standby database environment ready for conversion
What just happened?
Time for action – converting a physical standby database into a logical standby database
What just happened?
Verifying the logical standby database
Time for action – checking the redo transport service status
What just happened?
Time for action – checking the SQL Apply service status
What just happened?
Have a go hero – check the services in a broken configuration
Customization and management in a logical standby database
Selective replication in a logical standby database
Time for action – working with skip rules on a logical standby database
What just happened?
Database Guard settings for the logical standby database
Time for action – changing the Database Guard setting
What just happened?
Disabling database guard for a session
Have a go hero – testing the NONE Database Guard mode
Creating objects on the logical standby database
Creating and re-creating tables
Creating scheduler jobs
Creating materialized views
Time for action – creating objects on the logical standby database
What just happened?
Have a go hero – skip, disable guard, insert, instantiate, and disable skip
Automatic deletion of archived logs
Deletion of the foreign archived logs
Files inside the fast recovery area
Files outside the fast recovery area
Deletion of the local archived logs
Summary
4. Oracle Data Guard Broker
Introduction to Data Guard broker
Data Guard broker features and benefits
Centralized and simple management
Cloud Control integration
Oracle Data Guard and RAC
Role transition with Data Guard broker
Data Guard fast-start failover
Recommendation
Data Guard broker components
Oracle Data Guard broker server-side components
Data Guard Monitor process (DMON)
Configuration file
Oracle Data Guard broker client-side components
DGMGRL utility
Enterprise Manager Cloud Control client
Implementation of Oracle Data Guard broker
Time for action – initial setup of Data Guard broker
What just happened?
Time for action – connecting to Data Guard broker
What just happened?
Time for action – basic monitoring with Data Guard broker
What just happened?
Management with Data Guard broker
Enabling and disabling broker configuration
Time for action – disabling broker configuration
What just happened?
Enabling and disabling a standby database
Time for action – disabling and enabling database
What just happened?
Changing configuration and database properties using broker
Have a go hero – more examples on property changes
Time for action – changing the database name
What just happened?
Changing the state of the database
Have a go hero – more examples on state changes
Troubleshooting Data Guard broker
Data Guard tracing
Most Common Data Guard broker issues
ORA-16797: database is not using a server parameter file
ORA-10458:standby database requires recovery
ORA-16737:the redo transport service for standby database string
has an error
ORA-16715:redo transport-related property string of standby database string
is inconsistent
ORA-12514:TNS:listener does not currently know of service requested in connect descriptor
Current listener description
Oracle Data Guard fast-start failover
Time for action – configuring fast-start failover
What just happened?
Troubleshooting observer configuration
Script to stop and start observer
Summary
5. Data Guard Protection Modes
The Maximum Protection mode
The Maximum Performance mode
The Maximum Availability mode
Choosing the correct mode for your requirements
Changing Data Guard protection mode
Time for action – changing the protection mode with SQL*Plus
What just happened?
Time for action – changing the protection mode with Data Guard broker
What just happened?
Have a go hero - protection mode transitions with DGMGRL
Time for action – changing the protection mode with Enterprise Manager Cloud Control
What just happened?
Pop quiz – precautions for primary database availability issue in the Maximum Protection mode
Summary
6. Data Guard Role Transitions
Role transition considerations
Switchover
Performing switchover with a physical standby database using SQL*Plus
Time for action – preliminary tests before performing switchover
What just happened?
Time for action – switchover with a physical standby using SQL*Plus
Performing switchover with a physical standby database using broker
Time for action – switchover with a physical standby using broker
What just happened?
Performing switchover with a physical standby database using EM Cloud Control
Time for action – switchover with a physical standby using EM Cloud Control
Performing switchover with a logical standby database using SQL*Plus
Time for action – switchover with a logical standby database using SQL*Plus
What just happened?
Pop quiz
Performing switchover with a logical standby database using broker
Time for action – switchover with a logical standby using broker
What just happened?
Failover
Performing failover with a physical standby database
Time for action – failover with a physical standby database using SQL*Plus
Have a go hero
Performing failover with a logical standby database
Time for action – failover with a logical standby using broker
What just happened?
Summary
7. Active Data Guard, Snapshot Standby, and Advanced Techniques
Oracle Active Data Guard
Why Active Data Guard?
Oracle Data Guard license
Enabling Active Data Guard
Time for action – enabling Active Data Guard if Redo Apply is running using SQL *PLUS
Time for action – enabling Active Data Guard if the standby database is shut down
Time for action – enabling Active Data Guard using broker
What just happened?
Monitoring Active Data Guard
From primary
From standby
Active Data Guard with applications
Active Data Guard with PeopleSoft
Time for action – Active Data Guard with PeopleSoft
Active Data Guard with EBS
Active Data Guard with TopLink
Active Data Guard with Oracle BI
Active Data Guard with SAP
Active Data Guard features
EXPDP from standby database using NETWORK_LINK (ADG)
Time for action – exporting a database backup from Active Data Guard
What just happened?
Time for action – using the ASH report from the standby database
What just happened?
Have a go hero – running Statspack from a standby database
Using a snapshot standby database
Time for action – converting to a snapshot standby database
What just happened?
Time for action – converting to a physical standby database
What just happened?
Have a go hero – convert the physical standby to a snapshot and vice versa using broker
Cascade standby databases
Limitations with cascade standby database
Time for action – cascade standby database
What just happened?
Advanced compression in Data Guard
Time for action – enabling advanced compression
What just happened?
Preparation of standby on a cross-platform Data Guard
Time for action – creating a cross-platform Data Guard setup
What just happened?
Data Guard tuning and wait events
Network tuning
Redo transport and apply tuning
Data Guard wait events
Summary
8. Integrating Data Guard with the Complete Oracle Environment
The Oracle Enterprise Manager Cloud Control integration
Time for action – adding the Data Guard configuration into Cloud Control
What just happened?
Have a go hero
Cloud Control Data Guard administration home page
Modifying the Data Guard configuration
Time for action – enabling/disabling fast-start failover
What just happened?
Have a go hero
Monitoring Data Guard performance
Using Incident Manager to monitor Data Guard
Time for action – setting the threshold and creating an incident for estimated failover time metric
What just happened?
RMAN integration
Integration requirements and best practices
Physical standby requirement
RMAN Catalog requirement
Using a different DB_UNIQUE_NAME
General RMAN best practices
RMAN settings for the Data Guard environment
Registering primary database in the catalog
Configuring RMAN settings for primary database:
Configuring RMAN settings for standby database
Checking the RMAN configuration
Time for action – recovering a primary database using a standby database disk backup
What just happened?
Have a go hero
Using block change tracking with Data Guard
RAC integration
A RAC primary database with a single instance standby database
A RAC primary database with a RAC standby database
Summary
9. Data Guard Configuration Patching
What is patch and what are patch types?
Interim patch
CPU/SPU patches
PSU patches
Patch set
Patching on Data Guard
What just happened?
Best practices of patching
Upgrading OPatch
Performing prerequisite checks of patch
How to clean up patch history?
What just happened?
Patching on Data Guard configuration
How to apply an interim/bug patch on logical standby?
Time for action – applying a patch on logical standby
What just happened?
How to apply a PSU patch on physical standby database using broker?
Time for action – applying PSU on a physical standby database
Pop quiz
What just happened?
How to apply patch set on physical standby (11.2.0.1 to 11.2.0.3)?
Time for action – patch set upgrade of physical standby
What just happened?
Have a go hero – in-place patch set installation
Summary
10. Common Data Guard Issues
Recreating the standby control file
Time for action – recreating the standby control file
What just happened?
Dealing with redo transport authentication problems
Time for action – changing the SYS password in a Data Guard environment
Pop quiz – the redo transport authentication problem in only one instance of the primary database
What just happened?
Time for action – changing the redo transport user
What just happened?
Dealing with UNNAMED datafiles
Time for action – resolving UNNAMED datafile errors
What just happened?
Have a go hero
Closing a gap with an RMAN incremental backup
Time for action – closing a gap with an RMAN incremental backup
What just happened?
Pop quiz – using a tape for SCN incremental backup
Fixing NOLOGGING changes on the standby database
Time for action – fixing NOLOGGING changes on a standby database with incremental datafile backups
What just happened?
Time for action – fixing NOLOGGING changes in the standby database with incremental database backups
What just happened?
Turning on Data Guard tracing
Have a go hero
Gathering diagnostic data
Alert log and trace files
Time for action – monitoring the database alert log using ADRCI
What just happened?
Data Guard broker logs
Dynamic performance views
Summary
11. Data Guard Best Practices
Configuring a connection failover
Transparent Application Failover (TAF)
Configuring the client-side TAF
Configuring the server-side TAF
Fast Connection Failover (FCF)
Time for action – configuring FCF for JDBC connections
What just happened?
Fast Application Notification (FAN)
What just happened?
The archived log deletion policy on the standby database
Time for action – the recommended configuration for archived log maintenance on a standby database
What just happened?
Using flashback on a standby database
Time for action – using flashback on a standby database
What just happened?
Database rolling upgrade using the transient logical standby database
Time for action – performing a rolling upgrade using the transient logical standby database
What just happened?
Have a go hero – one last switchover
Corruption detection, prevention, and automatic repair with Oracle Data Guard
DB_BLOCK_CHECKSUM
DB_BLOCK_CHECKING
DB_LOST_WRITE_PROTECT
Automatic block media repair
Summary
Pop Quiz Answers
Chapter 1, Getting Started
Pop quiz – real-time apply consideration
Chapter 5, Data Guard Protection Modes
Pop quiz – precautions for primary database availability issue in maximum protection mode
Chapter 6, Data Guard Role Transitions
Pop quiz
Chapter 9, Data Guard Configuration Patching
Pop quiz
Chapter 10, Common Data Guard Issues
Pop quiz – redo transport authentication problem in only one instance of primary database
Pop quiz – using tape for SCN incremental backup
Index
Oracle Data Guard 11gR2 Administration Beginner's Guide
Oracle Data Guard 11gR2 Administration Beginner's Guide
Copyright © 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2013
Production Reference: 1170613
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84968-790-4
www.packtpub.com
Cover Image by Sandeep Babu (<[email protected]>)
Credits
Authors
Emre Baransel
Nassyam Basha
Reviewers
Syed Jaffar Hussain
Michael Seberg
Joel Perez
Acquisition Editor
Martin Bell
Lead Technical Editor
Susmita Panda
Technical Editors
Ankita Meshram
Veena Pagare
Zafeer Rais
Copy Editors
Insiya Morbiwala
Aditya Nair
Alfida Paiva
Laxmi Subramanian
Project Coordinator
Leena Purkait
Proofreaders
Dirk Manuel
Stephen Copestake
Indexer
Hemangini Bari
Graphics
Abhinash Sahu
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Authors
Emre Baransel is a graduate of Electrical and Electronic engineering and has two Master's, one in Business Administration and the other one in Information Systems. He has been working in the IT industry for the past 10 years. He has worked for one of the largest fixed-line and GSM technology-based companies in Turkey. He was nominated as an Oracle ACE in 2012. He's an Oracle Certified Professional (OCP), a founding member of TROUG (Turkish Oracle User Group), and a blogger at emrebaransel.blogspot.com. He has spoken at the Oracle Open World in the US and at user group conferences in different countries of Europe. He has also contributed to the Oracle RMAN 11g Backup and Recovery book in 2010. He has focused specially on high database availability and disaster recovery solutions, cloud technologies, and database security.
First of all, I would like to thank the love of my life, my wife Tulay, for her patience and support during the time I was writing this book, and my super sweet son Demir for his presence in my life. I would also like to thank my co-author Nassyam for his great effort on this book under intense work pressure, the technical reviewers Jaffar, Joel, and Michael for their valuable time, and the Packt Publishing team for all their help and labor on this book. Thousands of hours were spent on this book by many different people. Thank you all who made this book possible.
Nassyam Basha is a Database Administrator. He has around seven years of IT experience of which the last five years have been as a Production Oracle DBA. He is a post graduate who holds a master's degree in Computer Applications from the University of Madras. He started working with dBase and FoxPro, and has participated in several projects with FoxPro and Oracle database starting from Oracle 7. He is an Oracle 10g Certified Professional having good knowledge in Oracle technologies such as Data Guard, RMAN, RAC, and performance tuning. He has completed more than 90 Data Guard setups on all platforms, from RAC to non-RAC and successful cluster migrations with switchovers and failovers for many business-critical production databases with major Data Guard-related issues. He actively participates in Oracle-related forums such as OTN, having 9000+ posts, using the profile Freelists (https://forums.oracle.com/forums/profile.jspa?editMode=true&userID=651869). He maintains an Oracle technology-related blog, (www.oracle-ckpt.com) and he is reachable at
Above and beyond all others, I have to thank my Almighty Allah and my parents N. Abdul Aleem and Rahimunnisa. Without them I wouldn't have been able to be what I am today. A special thanks to my brother Nawaz Basha who has been with me all the time, in joy and even in sadness, and to my family members Zaheer Ahamed, Farhana, Riyana, niece Fathima Zehra, and my nephew Azzoo. I would also like to express my gratitude to Oracle professionals such as Shahbaz, Mohammad Farhan, Syed Jaffar Hussain, Chinar Aliyev, Michael Seberg, Uwe Hesse, Mohamed Houri, Adi Narayana, and all my friends along with my favorite authors Larry Carpenter and Joseph Meeks. I shall not forget to thank my clients and colleagues who have provided me with invaluable opportunities to expand my knowledge and shape my career. My heartfelt appreciation goes to the technical reviewers of this book, Syed Jaffar Hussain, Michael Seberg, and Joel Perez for the time they have spent reviewing this book, and to Packt Publishing's team members, Stephanie Moss, Leena Purkait, and Martin Bell for their support. Thanks to all of them and to their team members for giving me the opportunity to write this book. Last but not the least, I would like to say a big thanks to Emre Baransel who gave me the opportunity to co-author this book with him. His help, along with his direction were strong assets to write. Thank you Emre.
About the Reviewers
Syed Jaffer Hussain has been an Oracle Database Expert for over 14 years in his 20 years of Information Technology (IT) career. Over the past 14 years of his Oracle journey, he has been associated with several local and large-scale international banks where he implemented and managed very complex cluster and non-cluster environments with hundreds of business critical databases. Recognizing his efforts and contribution towards the community, Oracle awarded him the prestigious Best DBA of the year award in 2011, and bestowed him with the Oracle ACE Director status. He has also acquired a number of industry best-Oracle credentials, such as Oracle Certified Master (OCM), Oracle RAC Expert, and OCP DBA 8i, 9i, 10g, and 11g in addition to ITIL expertise.
Syed is an active Oracle speaker. He regularly presents technical sessions and webinars on various Oracle technologies at many Oracle events. You can visit his technical blog at http://jaffardba.blogspot.com, where he discusses and writes about workarounds/solutions for the issues confronted by him in his day-to-day activities.
Apart from being a part of the core Technical Review committee for a few Oracle technology-oriented books, he has also co-authored the books Oracle 11g R1/R2 Real Application Cluster Essentials and Oracle Expert RAC.
I would like to thank the Almighty and my parents for giving me everything I needed to become what I am today in life. Also, I owe a very big thanks to my wife Ayesha and my three champs (Ashfaq, Arfan, and Aahil) for allowing me to concentrate on my work by sacrificing their family time. Last but not the least, from the bottom of my heart, I would like to thank every individual who stood behind me and supported me morally during my ups and downs and encouraged me all through my life.
Michael Seberg has worked with Oracle since Version 7.3 in programming and administration. In the spring of 2010, Michael took on data protection for his employer, designing a complete failover site for Oracle using Data Guard. He has done extensive testing of switchover, failover, and monitoring of Data Guard. An Oracle generalist, Michael also works with Fusion Middleware, Forms and Reports, PHP, JSP, and Linux. He also does development in PL SQL, Object Pascal, and Java. Michael maintains a large personal website dedicated to Oracle technologies. He is a frequent contributor to the Oracle Technology Network (OTN) forum.
I would like to thank my wife Andrea for her commitment and patience with me.
Joel Perez is an expert DBA with over 12 years of specialized experience in several database areas with special focus on high availability and disaster recovery solutions (RAC, RMAN, Data Guard, and so on), upgrades, backup and recovery, database hardening, performance tuning, and others. During these years, Joel has worked as a Senior Consultant with a large number of companies and clients in various countries namely Venezuela, Panama, Costa Rica, Dominican Rep., Haiti, Nicaragua, Guatemala, Colombia, Honduras, Ecuador, Mexico, India, and others. Joel is a frequent speaker at many events such as OTN LAD TOUR. Among other complementary activities, Joel teaches high availability courses in Oracle University of several countries in Latin America and publishes articles for OTN LAD. Joel was the first Latin American to be named OTN Expert in the year 2003. Joel has been an Oracle ACE since 2004 and an Oracle ACE Director since 2012.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Instant Updates on New Packt Books
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.
Preface
Data Guard is the Oracle technology that meets high availability, disaster recovery, and data protection requirements for the Oracle Database, and is the market leader product for this scope. In enterprise systems, Data Guard is very widely used, so managing Data Guard configurations is a common task of Oracle DBAs. This administration task is not just about installing and keeping standby databases synchronized with the primary database. DBAs also provide standby databases for reporting and testing purposes, recovering partial data by using them, performing role transitions for disaster recovery testing or for planned maintenance operations, integrating Data Guard with the existing Oracle environment, and so on. As an Oracle DBA, you need to learn how to install and maintain Data Guard and benefit from it as much as possible.
In this practical book, you'll not only be introduced to Oracle Data Guard, you'll also see all aspects of Data Guard administration with examples, recipes, and best practices. We'll start by learning about the fundamental components of Data Guard, and then continue with configuring physical and logical standby databases of Data Guard. The important details and best practices of Data Guard administration will be covered later on.
What this book covers
Chapter 1, Getting Started, includes an introduction to Oracle Data Guard. Configuration elements, the architecture of the physical and logical standby databases, Data Guard services, the history of Data Guard, and a comparison with other replication solutions are covered in this chapter.
Chapter 2, Configuring the Oracle Data Guard Physical Standby Database, explains how to prepare the configuration from scratch, create a physical standby database including post tasks with a step-by-step approach, and verify the physical standby database recovery including real-time apply.
Chapter 3, Configuring Oracle Data Guard Logical Standby Database, shows you how to prepare a logical standby database configuration with pre and post steps. Customization and management in a logical standby database are also covered.
Chapter 4, Oracle Data Guard Broker, explains the detailed implementation of the Data Guard broker, monitoring and managing Data Guard using the broker, troubleshooting the Data Guard broker, and configuring fast-start failover (FSFO).
Chapter 5, Data Guard Protection Modes, focuses on the three data protection modes of Oracle Data Guard. You'll learn how to choose the correct mode for your requirements and how to change modes using SQL*Plus, the Data Guard broker, and Enterprise Manager Cloud Control.
Chapter 6, Data Guard Role Transitions, will include the necessary steps to accomplish successful switchover and failover operations in the physical and logical standby database environments. It also covers different tools to perform role transitions.
Chapter 7, Active Data Guard, Snapshot Standby, and Advanced Techniques, explains what Active Data Guard is, how to integrate applications with Active Data Guard, and several advantages of using it, such as performing Data Pump exports, gathering ASH reports, and advanced compression. This chapter also describes how to use snapshot standby, implement cascade standby databases, configure the cross-platform Data Guard setup, and also provides a brief on Data Guard tuning.
Chapter 8, Integrating Data Guard with the Complete Oracle Environment, explains the configuration steps required to integrate Data Guard with Enterprise Manager Grid Control, RMAN, and RAC. Integrating Data Guard with these products is crucial to make an efficient configuration and take advantage of all of these products together.
Chapter 9, Data Guard Configuration Patching, explains how to apply one-off patches and patch set updates to databases in a Data Guard environment, and some best practices of patching.
Chapter 10, Common Data Guard Issues, gives practical information for dealing with some very common issues in Data Guard that every administrator needs to know and experience.
Chapter 11, Data Guard Best Practices, includes very important information regarding how to make a Data Guard configuration perfect and take maximum advantage of Data Guard properties. Connection failover, deletion of archived log files, using flashback, database rolling upgrade using transient logical standby and corruption detection, and prevention and automatic repair with Oracle Data Guard are covered.
What you need for this book
In order to follow the exercises in this book, you must install the Oracle Database 11g Release 2 software on two separate database servers (primary and standby). You can use a virtual machine to create virtual database servers on your PC. Also, a database has to be created on the primary database server. The Oracle management software, Enterprise Manager 12c Cloud Control, needs to be installed to follow specific exercises using this tool.
Who this book is for
If you are an Oracle DBA who wants to configure and administer Data Guard and improve your knowledge on Data Guard with a step-by-step approach and hands-on scenarios, this book is for you. With a basic understanding of Oracle database administration you'll easily be able to follow the book.
Conventions
In this book, you will find several headings appearing frequently.
To give clear instructions of how to complete a procedure or task, we use:
Time for action – heading
Action 1
Action 2
Action 3
Instructions often need some extra explanation so that they make sense, so they are followed with:
What just happened?
This heading explains the working of tasks or instructions that you have just completed.
You will also find some other learning aids in the book, including:
Pop quiz – heading
These are short multiple-choice questions intended to help you test your own understanding.
Have a go hero – heading
These are practical challenges that give you ideas for experimenting with what you have learned.
You will also find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: The LOG_ARCHIVE_DEST_n parameters must be configured properly on every instance of primary and standby databases to show remote archiving destinations.
A block of code is set as follows:
LOG_ARCHIVE_CONFIG =
{
[ SEND | NOSEND ]
[ RECEIVE | NORECEIVE ]
[ DG_CONFIG=(remote_db_unique_name1, ... remote_db_unique_name9) | NODG_CONFIG ]
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
2 DBMS_SCHEDULER.CREATE_JOB (
3 JOB_NAME =>
'REFRESH_EMPDEPT_MV_PRIMARY'
,
4 JOB_TYPE => 'PLSQL_BLOCK',
Any command-line input or output is written as follows:
RFS LogMiner: Registered logfile [/u01/app/oracle/archive_std/1_106_791552282.arc] to LogMiner session id [1] ... LOGMINER: Begin mining logfile for session 1 thread 1 sequence 106, /u01/app/oracle/archive_std/1_106_791552282.arc LOGMINER: End mining logfile for session 1 thread 1 sequence 106, /u01/app/oracle/archive_std/1_106_791552282.arc
New terms and important words are shown in bold. Words that you