Data Guard SQL Apply Back to the Future! Larry M. Carpenter Senior Principal Consultant Server Technologies Oracle Corporation Session id: 40144.

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 Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
How Oracle Database 10g Revolutionizes Availability and Enables the Grid Juan Loaiza Vice President, Systems Technologies Oracle Corporation Session id:
High Availability Group 08: Võ Đức Vĩnh Nguyễn Quang Vũ
Oracle Data Guard Ensuring Disaster Recovery for Enterprise Data
© 2015 Dbvisit Software Limited | dbvisit.com An Introduction to Dbvisit Standby.
Introduction to Data Guard NY SIG Meeting October 7th, 2003.
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.
Database Backup and Recovery
Chapter 12 Performing Incomplete Recovery. Background Viewed as one of the more difficult chapters to write Thought it was important to put in material.
Module 14: Scalability and High Availability. Overview Key high availability features available in Oracle and SQL Server Key scalability features available.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Director Product Management
Introduction to Oracle Backup and 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.
Building Highly Available Systems with SQL Server™ 2005 Vineet Gupta Evangelist – Data and Integration Microsoft Corp.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
Oracle Recovery Manager (RMAN) 10g : Reloaded
Oracle Recovery Manager (RMAN) 10g : Reloaded Tammy Bednar Sr. Product Manager Oracle Corporation Session id:
7 Copyright © 2006, Oracle. All rights reserved. Dealing with Database Corruption.
Presentation #32050 Presentation #32050 Implementing Oracle9i Data Guard For Higher Availability By Daniel T. Liu First American Real Estate Solutions.
SRUTHI NAGULAVANCHA CIS 764, FALL 2008 Department of Computing and Information Sciences (CIS) Kansas State University -1- Back up & Recovery Strategies.
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.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
11g(R1/R2) Data guard Enhancements Suresh Gandhi
Oracle Database 10g RMAN and ATA Storage in Action Paul Tsien Oracle Corporation Bob Ng EMC Corporation Session id:
Oracle Data Guard: Maximum Data Protection at Minimum Cost
9 Copyright © 2004, Oracle. All rights reserved. Flashback Database.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
Selling the Storage Edition for Oracle November 2000.
1 Data Guard. 2 Data Guard Reasons for Deployment  Site Failures  Power failure  Air conditioning failure  Flooding  Fire  Storm damage  Hurricane.
Oracle Database 10 g Time Navigation: Human-Error Correction Magnus Lubeck DBA/Systems Analyst CERN, IT-DB Group Session id: Tammy Bednar Sr. Product.
User-mode I/O in Oracle 10g with ODM and DAFS Jeff Silberman Systems Architect Network Appliance Session id: Margaret Susairaj Server Technologies.
OSIsoft High Availability PI Replication
11 Copyright © 2004, Oracle. All rights reserved. Dealing with Database Corruption.
Oracle 9i Release 2, A new set of tips, tricks and Techniques. Steve George Sr. Delivery Manager – Oracle University Oracle Corporation Session id: #32681.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
MGA Duplica Replication Tool. 1. High Availability and Avoidance of Data Loss  Replicate to alternate databases 2. Split activities across databases.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
Ashish Prabhu Douglas Utzig High Availability Systems Group Server Technologies Oracle Corporation.
The Self-managing Database: Proactive Space and Schema Object Management Amit Ganesh Director, Data, Space and Transaction Processing 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.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
CERN IT Department CH-1211 Genève 23 Switzerland 1 Active Data Guard Svetozár Kapusta Distributed Database Operations Workshop November.
18 Copyright © 2004, Oracle. All rights reserved. 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
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
© Puget Sound Oracle Users Group Education Is Our Passion PSOUG Education Education Is Our Passion Hands-on Workshop Series Oracle DataGuard 10gR2.
What is the Flashback Database? Improves a database’s availability Useful alternative to traditional restoration methods Contains Flashback logs Archived.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
OSIsoft High Availability PI Replication Colin Breck, PI Server Team Dave Oda, PI SDK Team.
Oracle Database High Availability
Agenda Data Guard Architecture & Features
Recovery Catalog Creation and Maintenance
Maximum Availability Architecture Enterprise Technology Centre.
Oracle Database High Availability
Introduction.
Oracle Data Guard Broker Session-3
Presentation transcript:

Data Guard SQL Apply Back to the Future! Larry M. Carpenter Senior Principal Consultant Server Technologies Oracle Corporation Session id: 40144

A Quick Review  What’s in the Oracle Data Guard ‘Stack’?  A High Level Overview – Redo Apply – SQL Apply  How does SQL Apply do it today?  A Couple of Customer Case Studies – How they use Oracle Data Guard Today. – What Business Problems they solved. – What can we do to make it better?

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

REDO Apply Architecture Maintains a ‘Physical’ block for block copy of the Primary Database Physical Standby Database Asynchronous/ Synchronous Redo Shipping Primary Database Network Backup Redo Apply MRP

SQL Apply Architecture Logical Standby Database Continuously Open for Reports SQL Apply Transform Redo to SQL Additional Indexes and Materialized Views Asynchronous/ Synchronous Redo Shipping Network Primary Database Maintains a ‘Logical’ transactional copy of the Primary Database

SQL Apply Engine Architecture Logical Standby Database Remote Archived Logs Mining Group Applying Group SQL LSP PX RFS PX Log Transport Services Redo

Customer Case Studies  How are customers using SQL Apply today? – A look at two European Banks and their setup – What Problems were they able to solve?  What are we doing to make life easier and better? – For the Business – For the User – For the DBA!

Bank #1 –Web Site  Users access only the standby outside the firewall.  Web Developers access only the Production DB.  Physical Standby provides extra Disaster Recovery FireWall Logical Standby Physical Standby Production Database Web Developers Internet Users Logical Standby FireWall

Bank #1 – Online Banking  Users access the Production DB outside the firewall.  Query Users access only the Logical Standby  Physical Standby outside firewall provides Disaster Recovery FireWall Production Database Physical Standby Logical Standby Reporting and Query Users Internet Users

Bank #2 – Branch Banking  Branch Users access the Production DB.  Query Users access only the Logical Standby  Physical Standby Disaster Recovery  Production Database and Logical standby on the same server Production Database Physical Standby Logical Standby Reporting and Query Users Branch Users

Oracle Database 10 g Solving Those Problems!  Zero Downtime Logical Standby Database Creation – Faster, Easier, Bulletproof  Support for more Data Types – Wider range of applications and functionality supported by SQL Apply  Real Time Apply  Integration with Flash Back Database  Improved Ease of Use  Rolling Database Upgrades – Going Forward

Zero Downtime Instantiation  Logical standby databases easy to create – Using an On-line backup! – No shut down and no quiesce of the Primary – No shutdown = no downtime of production system – No quiesce = no wait on quiesce  And no dependence on Resource Manager

Zero Down Time Instantiation On-Line Backup Primary Database Physical/Logical Standby Database Create and Copy Logical Standby Control File Transport Service Restore

Zero Down Time Instantiation RecoveryActivation Change DBNAME and DBID Logical Standby Database! Start SQL Apply Services

Support for more Data Primary database Logical standby database Index Organized Tables More datatypes

Data Types  New Support for: – LONG – LONG_RAW – Multi-byte CLOB – NCLOB – BINARY_FLOAT (New in Oracle Database 10 g ) – BINARY_DOUBLE (New in Oracle Database 10 g )

Index Only Tables  IOT Support in a Logical standby database – No LOB columns in the IOT – No IOT with Overflow

Real Time Apply  Redo data is applied to the standby database as it is received from the primary database. – Apply services on the standby do not wait until the current standby redo log file is archived.  Invoked through SQL: – For SQL Apply:  ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE; – For Redo Apply:  ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;

An up-to-date Logical or Physical Standby Database Standby Redo Logs Real Time Apply Archived Redo Logs Archived Redo Logs Primary Database Transactions Online Redo Logs Oracle Net Real Time Apply! RFSLGWR ARCH LSP MRP

Existing Site Recovery Tradeoffs  Log apply may be delayed to protect from user errors but: – Switchover/Failover gets delayed – Reports run on old data  After failing over to standby, production DB must be rebuilt Primary DatabaseStandby Database Redo Shipment Delayed Apply Reporting on delayed data

Flashback Database  A new strategy for point in time recovery  Eliminate the need to restore a whole database backup  Integrated seamlessly with RMAN – Think of it as a continuous backup – Restores just changed blocks  It’s fast - recover in minutes, not hours  It’s easy - single command restore RMAN> FLASHBACK DATABASE TIMESTAMP to_timestamp (' :00:00', 'YYYY-MM-DD HH24:MI:SS');

Enhanced DR with Flashback Database  Flashback DB removes the need to delay application of logs  Flashback DB removes the need to reinstantiate primary after failover  Real-time apply enables real-time reporting on standby Real Time Apply No Delay!Real Time Reporting Flashback Log Flashback Log Primary: No reinstantiation after failover! Redo Shipment Primary DatabaseStandby Database

Ease of Use  New and Improved Data Guard Manager!  Monitoring SQL Apply – Unsupported Storage Attributes – Applied Logs and Apply Progress  Managing the Logical Standby – Bypassing the Guard – Skipping Table Redo – Skipping Failed (and subsequently fixed) Transactions

Enterprise Manager New Features  Streamlined browser-based interface that enables complete standby database lifecycle management  Focus on: – Ease of use – Management based on best practices – Pre-built integration with other HA features

Viewing Unsupported Objects SQL> SELECT DISTINCT table_name, attributes 2> FROM dba_logstdby_unsupported 3> WHERE owner = 'HR'; TABLE_NAME ATTRIBUTES COUNTRIES Index Organized Table DEPARTMENTS Table Compression EMPLOYEES Table Compression JOBS Table Compression JOB_HISTORY Table Compression LOCATIONS Table Compression REGIONS Table Compression 7 rows selected.

Checking for Applied Logs SQL> SELECT thread#, sequence#, applied FROM 2> dba_logstdby_log order by sequence#; THREAD# SEQUENCE# APPLIED YES 1 49 CURRENT 1 50 CURRENT 1 51 CURRENT 1 52 CURRENT 1 53 CURRENT 6 rows selected.

Viewing the Progress of SQL Apply SQL> SELECT applied_scn, applied_thread#, newest_scn, 2> newest_thread# 3> FROM dba_logstdby_progress; APPLIED_SCN APPLIED_THREAD# NEWEST_SCN NEWEST_THREAD#

New Guard Bypass Syntax SQL> ALTER SESSION ENABLE GUARD; SQL> ALTER SESSION DISABLE GUARD;

Using Wildcards to Skip Tables DBMS_LOGSTDBY.SKIP(stmt, schema_name, table_name, proc_name, use_like, esc);  In Oracle9 i Database all names are wildcard matched. – TEST_T% for table_name skips all tables starting with TEST and with anything in the place of the ‘_’.  No way to indicate that you only wanted table TEST_TABLE and not TEST1TABLE.  Set use_like to False to use the escape character.  Set esc to a \ for example to allow better matching – Now TEST\_T% will only skip TEST_TABLE.

Automatically Skipping the Last Failed Transaction ALTER DATABASE START STANDBY APPLY SKIP FAILED TRANSACTION; Logical Standby Database Redo from primary Restart SQL Apply Skip Failed transaction

Remember Those Banks?  Logical Standby Creation simple, fast and online!  Logical standbys no longer have to lag an archive log behind the Primary!  More Data types = More Applications!  Better View of the Logical Standby Status!  Easier to Manage!

Rolling Database Upgrades  In Oracle Database 10 g, SQL Apply provides the starting point for performing rolling upgrades of the Oracle RDBMS software and database with minimal interruption of service.  By utilizing a Logical standby database customers can upgrade one database while running on the original production database and then run in a mixed version environment before returning to the original, but upgraded, configuration!

Those Banks (Again)? Production Database Version X Logical Standby Version X  Initial Data Guard Setup with all databases at Version X  Applications running on Node One, the Production Database.  Reporting and Query Applications running on the Logical standby Node OneNode Two

Upgrade the Logical Standby Production Database Version X Logical Standby Version X+1  Stop Redo shipping to the Logical Standby on Node Two.  Archive logs stack up on Node One.  Upgrade Logical Standby  Test General reporting and queries on the upgraded logical standby  Applications still running on Node One, the Production Database. Node OneNode Two

Run In Mixed Environment Production Database Version X Logical Standby Version X+1  Re-enable Redo Shipping to the Logical Standby on Node Two  Stacked Archive logs automatically sent to resynchronize the Logical Standby (Bring it up to date)  Applications still running on Node One, the Production Database.  Reporting and Query Applications running on upgraded Logical standby Node OneNode Two

Switch Over Applications Logical Standby Version X Production Database Version X+1  Switch over databases from Node One to Node Two.  Original Production Database is now a Logical Standby.  Redo Shipping to Node One is stopped.  Archive logs stack up on Node Two.  Applications running on Node Two, the Upgraded Production Database. Node OneNode Two

Upgrade Node One Logical Standby Version X+1 Production Database Version X+1  Upgrade the Logical Standby database on Node One.  Applications still running on Node Two, the Upgraded Production Database. Node OneNode Two

Re-Enable Redo Shipping Logical Standby Version X+1 Production Database Version X+1  Re-enable Redo Shipping to the Logical Standby on Node One  Stacked Archive logs automatically sent to resynchronize the Logical Standby (Bring it up to date)  Applications still running on Node Two, the Production Database.  Reporting and Query Applications running on upgraded Logical standby Node OneNode Two

Switch Back to Original Setup Production Database Version X+1 Logical Standby Version X+1  Initial Data Guard Setup with all databases at Version X+1  Applications running on Node One, the Production Database.  Reporting and Query Applications running on the Logical standby Node OneNode Two

SQL Apply and Oracle Database 10g  Improving upon a great foundation! – Creating Logical Standby databases is a snap! – Querying up-to-date data with Real-Time Apply! – Supporting more and more Applications! – Moving forward to Rolling Upgrades!

Resources  Maximum Availability Architecture white papers: – New SQL Apply Best Practices Paper now available!  HA Portal on OTN:  Data Guard home page on OTN:  Oracle Consulting Services:

Next Steps High Availability Sessions from Oracle 11:00 AM How Oracle Database 10g Revolutionizes Availability and Enables the Grid 3:30 PM Oracle Recovery Manager (RMAN) 10g: Reloaded 5:00 PM Proven Techniques for Maximizing Availability 8:30 AM Oracle Database 10g - RMAN and ATA Storage in Action 11:00 AM Oracle Data Guard: Maximum Data Protection at Minimum Cost 1:00 PM Oracle Database 10g Time Navigation: Human-Error Correction 4:30 PM Data Guard SQL Apply: Back to the Future Wednesday in Moscone Room 304Tuesday in Moscone Room 304 For More Info On Oracle HA Go To

Next Steps High Availability Sessions from Oracle 8:30 AM in Moscone Room 304 Oracle Database 10g Data Warehouse Backup and Recovery: Automatic, Simple, Reliable 8:30 AM in Moscone Room 104 Building RAC Clusters over InfiniBand Thursday For More Info On Oracle HA Go To Real Application Clusters Data Guard Database Backup & Recovery Flashback Recovery LogMiner, Online Redefinition, and Cross Platform Transportable Tablespaces Database HA Demos All Four Days In The Oracle Demo Campground

Reminder – please complete the OracleWorld online session survey Thank you.

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