Introduction to Data Guard NY SIG Meeting October 7th, 2003.

Slides:



Advertisements
Similar presentations
ORACLE DATABASE HIGH AVAILABILITY & ORACLE 11GR2 DATA GUARD 1 Güneş EROL.
Advertisements

ITEC474 INTRODUCTION.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
Stephen D. Mund, OCP Database Administrator Nevada System of Higher Education System Computing Services.
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
Oracle9i Data Guard Darl Kuhn Sun Microsystems
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
© 2015 Dbvisit Software Limited | dbvisit.com An Introduction to Dbvisit Standby.
FlareCo Ltd ALTER DATABASE AdventureWorks SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS Slide 1.
1 © Copyright 2010 EMC Corporation. All rights reserved. EMC RecoverPoint/Cluster Enabler for Microsoft Failover Cluster.
Keith Burns Microsoft UK Mission Critical Database.
EIM April 19, Robin Weaver 13 Years with IBM Prior to Assignment at UNC Charlotte Range of Database Development/Data Management Projects and Products.
1© Copyright 2011 EMC Corporation. All rights reserved. EMC RECOVERPOINT/ CLUSTER ENABLER FOR MICROSOFT FAILOVER CLUSTER.
Backup and Recovery Part 1.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Oracle9i Database Administrator: Implementation and Administration
Agenda  Overview  Configuring the database for basic Backup and Recovery  Backing up your database  Restore and Recovery Operations  Managing your.
National Manager Database Services
Oracle backup and recovery strategy
Introduction to Oracle Backup and Recovery
Using RMAN to Perform Recovery
Proven Techniques for Maximizing Availability Maximum Availability Architecture Lawrence To, Shari Yamaguchi High Availability Systems Group Systems Technologies.
ORACLE DATABASE HIGH AVAILABILITY 1. OUTLINE I. Overview Of High Availability II. Oracle Database High Availability Architecture III. Determining Your.
1 Data Guard Basics Julian Dyke Independent Consultant Web Version - February 2008 juliandyke.com © 2008 Julian Dyke.
Chapter 10 : Designing a SQL Server 2005 Solution for High Availability MCITP Administrator: Microsoft SQL Server 2005 Database Server Infrastructure Design.
High-Availability Methods Lesson 25. Skills Matrix.
Presentation #32050 Presentation #32050 Implementing Oracle9i Data Guard For Higher Availability By Daniel T. Liu First American Real Estate Solutions.
Chapter 18: Windows Server 2008 R2 and Active Directory Backup and Maintenance BAI617.
Oracle DataGuard Concepts and Architecture
Sofia, Bulgaria | 9-10 October SQL Server 2005 High Availability for developers Vladimir Tchalkov Crossroad Ltd. Vladimir Tchalkov Crossroad Ltd.
ORACLE 10g DATAGUARD Ritesh Chhajer Sr. Oracle DBA.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
11g(R1/R2) Data guard Enhancements Suresh Gandhi
DATABASE MIRRORING  Mirroring is mainly implemented for increasing the database availability.  Is configured on a Database level.  Mainly involves two.
DB-2: OpenEdge® Replication: How to get Home in Time … Brian Bowman Sr. Solutions Engineer Sandy Caiado Sr. Solutions Engineer.
Rajib Kundu Agenda Definitions Failover Cluster Database Snapshots Log shipping Database Mirroring.
Module 9 Planning a Disaster Recovery Solution. Module Overview Planning for Disaster Mitigation Planning Exchange Server Backup Planning Exchange Server.
Site Power OutageNetwork Disconnect Node Shutdown for Patching Node Crash Quorum Witness Failure How do I make sure my Cluster stays up ??... Add/Evict.
1 Data Guard. 2 Data Guard Reasons for Deployment  Site Failures  Power failure  Air conditioning failure  Flooding  Fire  Storm damage  Hurricane.
Week 3 Lecture 1 The Redo Log Files and Diagnostic Files.
8 Copyright © Oracle Corporation, All rights reserved. Configuring the Database Archiving Mode.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Ashish Prabhu Douglas Utzig High Availability Systems Group Server Technologies Oracle Corporation.
Implementing Oracle9i Data Guard Michael New Senior Technical Consultant ThinkSpark Session id:
Overview of Oracle Backup and Recovery Darl Kuhn, Regis University.
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Log Shipping, Mirroring, Replication and Clustering Which should I use? That depends on a few questions we must ask the user. We will go over these questions.
Agenda Data Guard Architecture & Features
© Puget Sound Oracle Users Group Education Is Our Passion PSOUG Education Education Is Our Passion Hands-on Workshop Series Oracle DataGuard 10gR2.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
Oracle Standby Implementation Tantra Invedy. Standby Database Introduction Fail over Solution Disaster Recovery Solution if remote Ease of implementation.
1 Implementing Oracle Data Guard for the RLS database Kasia Pokorska CERN, IT-DB 30 th March 2004.
Turgay Sahtiyan Istanbul, Turkey
Sponsors.
Agenda Data Guard Architecture & Features
Maximum Availability Architecture Enterprise Technology Centre.
A Technical Overview of Microsoft® SQL Server™ 2005 High Availability Beta 2 Matthew Stephen IT Pro Evangelist (SQL Server)
Introduction of Week 6 Assignment Discussion
SQL Server High Availability Amit Vaid.
Oracle9i Database Administrator: Implementation and Administration
Understanding the Oracle Data Guard Architecture
AlwaysOn Availability Groups
High Availability/Disaster Recovery Solution
Performing Database Recovery
Chapter 5 The Redo Log Files.
Introduction.
Oracle Data Guard Broker Session-3
Oracle Data Guard Session-4
Designing Database Solutions for SQL Server
Presentation transcript:

Introduction to Data Guard NY SIG Meeting October 7th, 2003

Mr. Paranoid (It’s my job) Larry M. Carpenter Senior Principal Consultant Data Guard Development Server Technologies Oracle Corporation

Disaster Recovery Food Chain UsersApplicationsDatabasesNetworks DATA GUARDDATA GUARD Servers Oracle

So, just what is Data Guard?  “An application-transparent high-performance low- impact asymmetrical online reliable Redo or SQL level background standby database transaction exchange utility capable of reporting, switchover and Failover.”  What? ?

Simply put…  Data Guard helps you protect your Data. – Takes your data and automatically puts it elsewhere – Makes it available for Failover in case of failure.  The other capabilities are pure bonus. – Switchover for Maintenance – Reporting – Off-loading Queries – Backups

Data Guard ‘Pyramid’ D a t a G u a r d Physical and Logical Standby Databases Production / Primary Databases Broker and CLI EM Data Guard Manager

High Level  Data Guard comprises of two parts – REDO APPLY (DR)  Maintains a physical, block for block copy of the Production (also called Primary) database. – SQL APPLY (Reporting)  Maintains a logical, transaction for transaction copy of the Production database.

Data Guard Redo Apply: Best for DR  Physical Standby Database is a block-for-block copy of the primary database  Uses the database recovery functionality to apply changes  Can be opened in read-only mode for reporting/queries  Can also perform backup, offloading production database  The best solution for DR Data Guard Broker Primary Database Physical Standby Database Optional Delay Sync or Async Redo Shipping Network Redo Apply Backup

Data Guard SQL Apply  Logical Standby Database is an open, independent, active database  Contains the same logical information (rows) as the production database  Physical organization and structure can be very different  Can host multiple schemas  Can be queried for reports while logs are being applied via SQL  Can create additional indexes and materialized views for better query performance  Not all Data Types supported (See the manual for a list) Optional Delay Additional Indexes & Materialized Views Sync or Async Redo Shipping Network Continuously Open for Reports Transform Redo to SQL and Apply Data Guard Broker Primary Database Logical Standby Database

Standby Databases Are Not Idle Standby database can be used to offload the primary database, increasing the ROI Standby Server Standby Database Reporting Backups Tape

Protection from Human Errors and Data Corruptions  The application of changes received from the primary can be delayed at standby to allow for the detection of user errors and prevent standby to be affected  The apply process also revalidates the log records to prevent application of any log corruptions Primary Site Standby Database Standby Site Production Database Optional Delayed Apply

TANSTAAFL There Ain’t No Such Thing As A Free Lunch! ‘The Moon is a Harsh Mistress” – Robert Heinlein

Not Rocket Science!  "Data Guard now has many sophisticated DR/HA features, but still the thing that impresses me the most is its ease of implementation and long term reliability. We don't have to baby sit it. If there are problems, we don't have to dig through documentation to remember how it works. Our management has told us to do more with less DBAs, and Data Guard has helped us implement a solid DR/HA solution without adding DBAs.“  Darl Kuhn – Lead DBA Sun IT

Setup Overview  Step 1 - Prepare the Primary for Standby  Step 2 - Copy the necessary files to standby system  Step 3 - Configure the Standby Parameters  Step 4 - Configure OracleNet  Step 5 - Startup the Standby Site  Step 6 - Begin Shipping and Applying Redo

Setup the Production Database

Check Archiving and Force Logging

Copy the Data files to the Standby

Standby Control file and Init file

Setup the Standby Init Parameters

Setup the Production Side TNS

Setup the Standby Side TNS

Launch the Standby Database

Start Sending Redo!

Verify the Primary is sending Redo

Add in the Standby Redo Log Files

Make sure they are being used On the Primary On the Standby

We’re Done!  Well, I thought that was easy.

Switchover and Failover  There are two ways to change roles in a standby configuration – Switchover  Changing roles with someone else and letting them take over while you become a standby – Failover  Assigning someone else to take over when the original boss is gone  Different steps for Physical and Logical Standby  We’ll do a Physical Standby Switchover

Prepare the Primary Parameters

Prepare the Standby Parameters

Prepare to Switchover the Primary

Start with the Primary Don’t do this until the standby has received all the redo!

Then Switchover the Standby

Startup the New Standby

Add in the SRL’s to the New Standby

Startup the New Primary

Verify the New Standby

Verify the New Primary

“Switchback?”  Just do the previous slides again! – Without all the parameters changes other than setting the service names and enabling or deferring the remote destinations.

Ok, now let’s do a Failover!  This will recover all of our data since I have it setup as a zero data loss configuration.  The current Primary will have to be recreated after a Failover.

Insert Data and Crash the Primary No Log Switch!

Verify the Standby and Fail Over

Switch over to Primary

Setup Access and Verify Data I ’ m Still there!

Of Course You Could use the GUI

Protection Levels  Transport Services define how the redo gets to the standby site. – In Oracle 9 i Release 1 that is all you had.  The Protection Levels define how the Primary functions in the standby configuration – Maximize Protection – Maximize Availability – Maximize Performance  Each one has a defined set of rules

Protection Modes Protection Mode Failure Protection Redo Shipping Maximum Protection Zero Data Loss Protects Against Primary and Network Failure LGWR using SYNC and SRL Protects Against Primary Failure LGWR using SYNC Maximum Availability Zero Data Loss Best Effort Against Primary Failure ARCH or LGWR using ASYNC Maximum Performance

Maximum Protection Mode  Zero Data Loss!  Highest Level of Protection  Configuration: LGWR SYNC, SRLs  Enforces protection of every transaction  If last standby is unavailable, processing stops at primary  Good for financial systems where no data loss is acceptable ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION; Protection Mode Failure Protection Redo Shipping Protects Against Primary and Network Failure LGWR using SYNC and SRL Maximum Protection Zero Data Loss

Maximum Availability Mode  Zero Data Loss as long as the network stays up!  Enforces protection of every transaction  Configuration: LGWR SYNC, do not need SRLs  If last standby is unavailable, processing continues at primary  When the standby becomes available again, synchronization with the primary is automatic ALTER DATABASE SET STANDBY TO MAXIMIZE AVAILABILITY; Protection Mode Failure Protection Redo Shipping Protects Against Primary Failure LGWR using SYNC Maximum Availability Zero Data Loss

Maximum Performance Mode  Highest level of performance  Configuration: LGWR ASYNC, or ARCH  Protects from failure of any single component  Least impact on production system  Useful for applications that can tolerate some data loss ALTER DATABASE SET STANDBY TO MAXIMIZE PERFORMANCE; Protection Mode Failure Protection Redo Shipping Maximum Performance Best Effort Against Primary Failure ARCH or LGWR using ASYNC

Data Guard and Oracle Apps 11 i  Data Guard standbys require redo in the log – No logging operations on the primary means missing data on the standbys. – Physical Standbys will work but any no logging operations by the Apps means exposure and manual operations to resynchronize  More information ­MetaLink Note &  Oracle 9.2 has Force Logging which will solve these issues  Logical Standby will not work correctly – Missing critical data type support

Installation and Configuration Considerations  Enterprise Edition only for the Server  Requires the same version and release of the Oracle database server for the primary and all standby sites. – Each primary database and standby database must have its own control file. – The primary database must run in ARCHIVELOG mode.  Requires the same hardware architecture on the primary and all standby sites.  Does not require the same version and release of the operating system on the primary and all standby sites.

Minimum Database Requirements  What do you need at a minimum? – An Oracle9 i primary database.  Release 1 – or higher  Release 2 – or higher if possible ­There are several patches to if you do not have ­Trust me, you need them  At Oracle9 i Release 2 if you want SQL Apply – A standby database  Same version as the primary  With Standby Redo Logs if it’s a Physical standby

Minimum Environment Requirements  What else do you need? – A network between the two!  Primary system tnsname to the standby listener  Standby system tnsname to the primary listener  If the pipe isn’t big enough to send the redo it isn’t going to work! ­And no, I do not recommend sneaker net! – Redo Transport Services on the Primary  Defines how the redo gets shipped to the standby – A set of rules for the configuration to follow  Which defines how you expect it to operate

Some other Gotcha’s  Force Logging – If you are at Release 2 use the force logging command  ALTER DATABASE FORCE LOGGING; – If it isn’t in the redo stream, it isn’t in the standby.  Know your Production Database! – If you are using a Physical standby everything is supported provided you force logging! – If you want to use a Logical standby there are several unsupported data types and other considerations

Data Guard and RAC  RAC: high availability and scalability solution within a data center, implemented on a single set of storage  Data Guard: Disaster Recovery and Data Protection solution that can span data centers, implemented on multiple storage systems  Data Guard and RAC are complementary and should be used together as foundations of a Maximum Availability Architecture

Data Guard and Streams  Streams and Data Guard are independent features of Oracle Database Enterprise Edition, based on some common underlying technology  Data Guard: Disaster Recovery & Data Protection – Transactionally consistent standby databases – Zero data loss  Streams: Information Sharing/Distribution – Fine granularity and control over what is replicated – Heterogeneous platforms

Basic Physical Standby Configuration LOG_ARCHIVE_DEST_1= ‘ LOCATION=location1_directory ’ LOG_ARCHIVE_DEST_STATE_1=ENABLE LOG_ARCHIVE_DEST_2= ‘ SERVICE=location2 ’ LOG_ARCHIVE_DEST_STATE_2=ENABLE LOG_ARCHIVE_DEST_1= ‘ LOCATION=location2_directory ’ LOG_ARCHIVE_DEST_STATE_1=ENABLE LOG_ARCHIVE_DEST_2= ‘ SERVICE=location1 ’ LOG_ARCHIVE_DEST_STATE_2=DEFER Primary Database Physical Standby Database Redo Data Enabled Redo Data Deferred Location 1Location 2  One physical standby location provides basic disaster protection (a remote block-for-block copy of the primary database), but there is no additional protection in effect if either location fails  Physical standby database can be used for reporting (redo apply must be temporarily paused)

Improved Physical Standby Configuration  Two physical standby locations maintain full disaster protection after any one location (primary or standby) fails  One standby can be kept current with the primary database to facilitate fast failover while the other can be configured with a redo apply delay to create a “ window of protection ” against user error Primary Database Location 1 Location 2 Location 3 Physical Standby Database Physical Standby Database

Getting More From Your Standby Systems Primary Database Location 1 Location 2 Physical Standby Database Logical Standby Database SQL Apply Redo Apply Remote Archived Logs  Physical standby (in recovery mode): – Maintains block-for-block copy of all primary data for disaster protection – Offloads database backups from primary  Logical standby is optimized for continuous reporting, with additional: – Indexes – Materialized Views

Getting More From Your Standby Systems (cont’d)  Another physical standby can be used to provide disaster protection for the logical standby Primary Database Location 1 Location 2 Location 3 Physical Standby Database Physical Standby Database Logical Standby Database Physical Standby Database

Cascaded Redo Destinations  Standby databases optionally can receive redo data from another standby database instead of the original primary database  Primary database sends redo data only to selected standby databases and not to all standby databases  Reduces the load on the primary system, and also reduces network traffic and use of valuable network resources around the primary site Primary Database Redo Data Regenerated Redo Data Logical Standby Database Standby Database Retransmitted Redo Data Physical Standby Database Standby Database Redo Data

Data Guard Resources  Maximum Availability Architecture, best practices for Data Guard + RAC: –  Data Guard page on OTN: –  Data Guard Consulting Accelerator –

A Q & Q U E S T I O N S A N S W E R S