Oracle Data Guard for High Availability and Disaster Recovery



Similar documents
Oracle Data Guard. Caleb Small Puget Sound Oracle Users Group Education Is Our Passion

11. Configuring the Database Archiving Mode.

HOW TO. RMAN Restore for Standby 10gR2

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo tao_zuo@npd.com NPD Inc. 9/2011

Maximum Availability Architecture. Oracle Best Practices For High Availability

Database Recovery For Newbies

If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows:

Daniela Milanova Senior Sales Consultant

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

Backup/Restore Oracle 8i/9i/10g

Backup Types. Backup and Recovery. Categories of Failures. Issues. Logical. Cold. Hot. Physical With. Statement failure

Using RMAN to restore a database to another server in an ASM environment

Oracle 9i Database Release 2 Enterprise Edition

Oracle Active Data Guard Far Sync Zero Data Loss at Any Distance

DisasterRecoverywith. DisasterRecoverywith Oracle Data Guard10gR2

Case Study: Oracle E-Business Suite with Data Guard Across a Wide Area Network

Using Recovery Manager with Oracle Data Guard in Oracle Database 10g. An Oracle White Paper April 2009

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

Recreate Physical Standby Database after Recovery of Primary Database

Database Disaster Recovery using only RMAN Backups

ORACLE CORE DBA ONLINE TRAINING

Recover Oracle Database upon losing all Control Files

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

DOCUMENTATION ORACLE BACKUP & RESTORE OPERATIONS

Restoring To A Different Location With EBU And RMAN An AppsDBA Consulting White Paper

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

HP LeftHand SAN Solutions

High Availability for Oracle 8 Using Double-Take

Oracle9i Data Guard: SQL Apply Best Practices. An Oracle White Paper September 2003

Maximize Availability With Oracle Database 12c

Deloitte Solutions Network (SNET) Disaster Recovery POC on Amazon EC2

A SURVEY OF POPULAR CLUSTERING TECHNOLOGIES

Oracle 11g DBA Training Course Content

Maximum Availability Architecture

High Availability for Oracle 10g Using Double-Take

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

Oracle Data Guard Fast Start Failover understood!

Oracle DBA Course Contents

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

Oracle Recovery Manager 10g. An Oracle White Paper November 2003

Using Physical Replication and Oracle Database Standard Edition for Disaster Recovery. A Dbvisit White Paper

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue:

Best Practices White Paper Using Oracle Database 10g Automatic Storage Management with FUJITSU Storage

12. User-managed and RMAN-based backups.

Rob Zoeteweij Zoeteweij Consulting

Oracle Database Cross Platform Migration Lucy Feng, DBAK

Oracle Backup and Recover 101. Osborne Press ISBN

Maximum Availability Architecture. Oracle Best Practices For High Availability

Installation Companion Oracle Data Guard on Amazon EC2 Configuration Guide

Data Guard Fast-Start Failover

Oracle 11g DBA Online Course - Smart Mind Online Training, Hyderabad. Oracle 11g DBA Online Training Course Content

ASM and for 3rd Party Snapshot Solutions - for Offhost. Duane Smith Nitin Vengurlekar RACPACK

SAP with Oracle Real Application Clusters 11g Release 2 and Oracle Automatic Storage Management 11g Release 2

Oracle Database Backup & Recovery, Flashback* Whatever, & Data Guard

Oracle Database 10g: Backup and Recovery 1-2

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW

Twee remedies tegen systeemuitval en datacorruptie [RAC en Data Guard]

Disaster Recovery Solutions for Oracle Database Standard Edition RAC. A Dbvisit White Paper

Oracle Backup & Recovery

Ultimate Guide to Oracle Storage

Getting all the pieces: Reliable Backup/Recovery

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

An Oracle White Paper March Oracle Data Guard Broker. Best Practices for Configuring Redo Transport for Data Guard and Active Data Guard 12c

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

Module 14: Scalability and High Availability

Oracle Database 11g: RAC Administration Release 2

Connectivity. Alliance Access 7.0. Database Recovery. Information Paper

Maximum Availability Architecture. Oracle Best Practices for High Availability

Why Not Oracle Standard Edition? A Dbvisit White Paper By Anton Els

This article Includes:

Oracle 11g Database Administration

D78850GC10. Oracle Database 12c Backup and Recovery Workshop. Summary. Introduction. Prerequisites

Support Document: Microsoft SQL Server - LiveVault 7.6X

High Availability with Postgres Plus Advanced Server. An EnterpriseDB White Paper

Oracle Database 10g: Administration Workshop II Release 2

Using Recovery Manager with Oracle Data Guard in Oracle9i. An Oracle White Paper January 2007

NEC Storage NV Series

Connectivity. Alliance Access 7.0. Database Recovery. Information Paper

Oracle Database 11g: Administration Workshop II DBA Release 2

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

High Availability Database Solutions. for PostgreSQL & Postgres Plus

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

MCAPS 3000 DISASTER RECOVERY GUIDE

Deploy App Orchestration 2.6 for High Availability and Disaster Recovery

Disaster Recovery for Oracle Database

Setup Flashback Database on Data Guard Physical Standby Database for SAP Customers

<Insert Picture Here> RMAN Configuration and Performance Tuning Best Practices

Informix Dynamic Server May Availability Solutions with Informix Dynamic Server 11

High Availability Infrastructure for Cloud Computing

Oracle Database Disaster Recovery Using Dell Storage Replication Solutions

Maximum Availability Architecture. Oracle Best Practices For High Availability

CA ARCserve and CA XOsoft r12.5 Best Practices for protecting Microsoft SQL Server

CA ARCserve Backup for Linux

Oracle Data Recovery Advisor

Transcription:

Oracle Data Guard for High Availability and Disaster Recovery John Zhong Senior Technical Specialist Global Database Management Group Citigroup and Vice President of American DBAOnline John_j_zhong@yahoo.com

Agenda Data Guard Overview Data Guard 10g New Features Data Guard Configuration Automatic Gap Detection and Resolution Redo Shipping with LGWR Data Protection Modes Managing Data Guard Monitoring Data Guard High Availability and Disaster Recovery

Data Guard Overview Data Guard Configurations Primary Database Standby Databases Data Guard Services Log Transport Log Apply Role Management Data Protection Modes Data Guard Broker

Data Guard Overview Data Guard Configuration

Data Guard Overview Data Guard Configuration: Physical Standby Database Oracle Net

Data Guard Features Automatic log shipping Automatic redo gap detection and resolution Redo shipping using LGWR Data protection modes Role transition management Failover and Switchover

Data Guard 10g New Features Real Time Apply Flashback Database Integration Flashback standby after OPEN RESETLOGS on primary, and remove the need to recreate standby. Flashback failed primary after failover and convert it to a standby. New Default Behavior for the STARTUP, MOUNT, and OPEN Statements on Physical Standby RAC Integration Simplified Browser-based Interface Focused on Best Practices

Data Guard 10g New Features Primary Database Redo Shipment Real Time Apply Standby Database Real Time Reporting No Delay! Flashback Log Flashback Log Primary: No reinstantiation after failover!

Data Guard Configuration Creating a physical standby database Tasks on primary Tasks on standby

Data Guard Configuration Tasks on Primary Enable archiving: Database in ARCHIVELOG mode Set local archive destination: LOG_ARCHIVE_DEST_1 Enable automatic archiving: log_archive_start = true or alter system archive log start;

Data Guard Configuration Tasks on Primary Backup primary database Create standby controlfile, for example, alter database create standby controlfile as 'TEST1_stdby.ctl'; Prepare init file: log_archive_start = true log_archive_dest_1 = 'LOCATION=<arch_directory> MANDATORY REOPEN=30' log_archive_dest_state_1=enable log_archive_format = "log_%s_%t.arc" remote_archive_enable=true log_archive_dest_2 = 'service=<standby_tns> reopen=30 log_archive_dest_state_2=enable Add standby_tns to tnsnames.ora Copy primary database backup and standby controlfile to standby Start up listener

Data Guard Configuration Tasks on Standby Set environment for standby database ORACLE_SID for standby does not have to be the same as primary Create data file and admin directories: /oradata/<db_name> $ORACLE_BASE/admin/<db_name>/udump, bdump, cdump, arch Prepare init file: log_archive_start = true log_archive_dest_1 = 'LOCATION=<arch_directory> MANDATORY REOPEN=30' log_archive_dest_state_1=enable log_archive_format = "log_%s_%t.arc" remote_archive_enable=true # Standby role parameters standby_archive_dest=<standby_arch_dir> standby_file_management=auto fal_server=<primary_tns> fal_client=<standby_tns>

Data Guard Configuration Tasks on Standby Add TNS entries primary_tns and standby_tns to tnsnames.ora Restore database backup: Restore database files Restore archive logs Copy standby controlfile to directories as specified in init file Startup and mount standby database: startup nomount alter database mount standby database; Recover managed standby database: alter database recover managed standby database disconnect from session;

Data Guard Configuration Tasks on Standby Open database in read only mode: alter database recover managed standby database cancel; alter database open read only; Add temp file to locally managed temporary tablespace: alter tablespace temp add tempfile file_name size <nnn> reuse; Switch back to managed recover mode: alter database recover managed standby database disconnect from session; Startup standby listener Standby is created and receiving / applying logs

Data Guard Configuration Verify Check log shipping: Standby Run this query on primary and standby: select sequence# from v$archived_log order by 1; Do a log switch from primary, run the query again, the log should be shipped to standby automatically Check log apply: Put standby in managed recover mode. Run query to get last applied log: select SEQUENCE#, APPLIED from v$archived_log order by 1; Do a log switch from primary, new archived logs should be applied. Check database changes are synced: Make some changes on primary and do a log switch Make sure last archived log is shipped and applied on standby Open standby in read only, and verify the changes.

Automatic Gap Detection and Resolution Automatic Gap Resolution ARCH (primary) sends log to standby RFS (remote file server process on standby) receives the redo and detects gap ARCH sends missing logs as requested by RFS Starting 9.2.x, ARCH on primary polls standby every minute to see if any gap and sends missing logs Gap Resolution by Fetch Archive Log (FAL) Managed recover process (MRP) applies log on standby. If MRP finds missing or corrupted logs, it asks primary to fetch archive log (FAL). Two parameters are needed for FAL to work fal_server=<primary_tns> fal_client=<standby_tns>

Automatic Gap Detection and Resolution

Redo Shipping with LGWR Redo data can be transmitted to standby by ARCH process or LGWR (log writer) Oracle Data Guard feature. Redo log is shipped directly to standby as it is being written to local online redo log. Redo shipping with LGWR SYNC Zero data loss Performance impact ASYNC Minimum data loss Little performance impact

Redo Shipping with LGWR

Redo Shipping with LGWR Redo shipping with LGWR: Create standby redo logs on standby. Create same number of standby redo logs as primary s: alter database add standby LOGFILE ( /oradata/test1/s_redo_01a.log, /oradata/test1/s_redo_01b.log ) ) SIZE 100M, ; Configure primary parameter log_archive_dest_2 = 'service=<standby_tns> LGWR SYNC ASYNC reopen=30'

Data Protection Modes Maximum protection Redo transmission: LGWR SYNC Zero data loss. Transaction will not commit until redo is written to standby Primary will shutdown if it can not write redo to a standby Impact on the performance and availability of the primary database. Maximum availability Redo transmission: LGWR SYNC Zero data loss. Transaction will not commit until redo is written to standby Primary will NOT shutdown if it can not write redo to standby (Lower to maximum performance mode). Impact on the performance, but not on availability of primary database

Data Protection Modes Maximum performance Default mode Redo transmission: LGWR ASYNC or ARCH (default) Transaction will not wait to commit until redo is written to standby. Minimum data loss, little impact on the performance and no impact on availability of the primary database. Data loss exposure is limited by the size of the configurable ASYNC buffer LGWR ASYNC=<buffer size> Maximum buffer size: 10MB (9i), 50MB (10g) Set database protection mode: ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE {PROTECTION AVAILABILITY PERFORMANCE}

Managing Data Guard Startup and shutdown standby database Recover managed standby database Open in read only mode Create primary backup from standby Recover when standby data files are corrupted. Resolve log gaps Manage database files Switchover Failover

Managing Data Guard Manage database files standby_file_management=auto New datafiles created on the primary database are automatically created on the standby Renaming datafiles in the primary database is not propagated to the standby database. Need to rename the same datafiles on the standby.

Managing Data Guard Graceful switchover planned maintenance, DR test Prepare switchover Edit / verify init.ora on primary and standby to support role transition Verify that there are no active users connected to either database. Do a log switch on primary. Recover standby until the last archived log applied Convert primary database to new standby (perform this on primary) alter database commit to switchover to physical standby with session shutdown; Shutdown immediate edit parameters in init.ora for standby role startup nomount and mount new standby

Managing Data Guard Graceful switchover Convert standby database to new primary (perform this on standby) alter database commit to switchover to primary; shutdown immediate Edit parameters in init.ora for primary role startup

Managing Data Guard Failover Finish recovery of standby database LGWR log shipping: alter database recover managed standby database finish; ARCH log shipping alter database recover managed standby database finish skip standby logfile; Convert the standby database to the primary role alter database commit to switchover to primary; Shutdown immediate Edit init.ora for primary role Startup

Monitoring Data Guard Alert log V$ views

Monitoring Data Guard Primary and standby instances Primary and standby listeners Standby mode not mounted mounted read only managed recovery

Monitoring Data Guard Redo shipping Alert log or v$dataguard_status v$ managed_standby (standby) or v$archive_dest (primary) Standby processes: v$managed_standby ARC0 MRP/MRP0 RFS Archive log latency v$archived_log (primary, standby) Archive log gap v$archived_log (primary or standby), v$archive_gap (standby) Apply log latency v$log_history, v$archived_log (standby, primary)

High Availability and Disaster Recovery Redundant Components Site Network Production Contingency Machine Storage Mirror

High Availability Server Cluster Active / Inactive Protect from machine or instance failure Some down time to failover if primary fails. Not protect from storage failure or disasters Primary (Active) Heart beats Secondary (Inactive) Database

High Availability Real Application Cluster Protect from machine or instance failure No down time if a cluster node or an instance fails. Not protect from storage failure or disasters Instance1 (Active) heart beats cache fusion Instance2 (Active) Database

High Availability and Disaster Replications: Recovery Protect from machine and storage failure or disasters Database changes on both sites, hot-hot configuration Issues with DBA maintenance cost and a small window of down time and data loss NY NJ DBNY DBNJ

High Availability and Disaster Recovery Data Guard Protect from machine and storage failure or disasters Protect data loss Easy to setup and maintain Some down time to failover if primary fails. Production DR NY Redo shipping NJ Standby Storage Storage

High Availability and Disaster Recovery Data Guard Data Guard can be used for HA and disaster recovery Primary DR Redo shipping NY Redo shipping NY Standby NJ Standby Storage Storage Storage

High Availability and Disaster Recovery Maximum Availability Architecture (MAA): combined RAC and Data Guard

Summary Automatic gap detection and resolution Redo shipping with LGWR Data protection modes High availability Disaster recovery Simple management Efficient use of system resource

Q & A