An Oracle White Paper September Application Failover with Oracle Database 11g



Similar documents
An Oracle White Paper July Introducing the Oracle Home User in Oracle Database 12c for Microsoft Windows

An Oracle White Paper November Oracle Real Application Clusters One Node: The Always On Single-Instance Database

One View Report Samples Warehouse Management

Oracle Database Resident Connection Pooling. Database Resident Connection Pooling (DRCP) Oracle Database 11g. Technical White paper

Monitoring and Diagnosing Production Applications Using Oracle Application Diagnostics for Java. An Oracle White Paper December 2007

Oracle Net Services for Oracle10g. An Oracle White Paper May 2005

An Oracle White Paper July Oracle Database 12c: Meeting your Performance Objectives with Quality of Service Management

Instant Client: An Overview. An Oracle White Paper May 2004

An Oracle White Paper October BI Publisher 11g Scheduling & Apache ActiveMQ as JMS Provider

An Oracle White Paper October Oracle Database and IPv6 Statement of Direction

An Oracle White Paper January A Technical Overview of New Features for Automatic Storage Management in Oracle Database 12c

Disaster Recovery for Oracle Database

An Oracle White Paper May Oracle Tuxedo: An Enterprise Platform for Dynamic Languages

An Oracle White Paper June Oracle Real Application Clusters One Node

Automatic Service Migration in WebLogic Server An Oracle White Paper July 2008

An Oracle White Paper September Oracle Database and the Oracle Database Cloud

An Oracle White Paper January Using Oracle's StorageTek Search Accelerator

Managed Storage Services

Oracle VM Manager Template. An Oracle White Paper February 2009

An Oracle White Paper September Oracle Database Smart Flash Cache

An Oracle White Paper June Creating an Oracle BI Presentation Layer from Imported Oracle OLAP Cubes

ORACLE DATA SHEET KEY FEATURES AND BENEFITS ORACLE WEBLOGIC SERVER STANDARD EDITION

An Oracle White Paper July Accelerating Database Infrastructure Using Oracle Real Application Clusters 11g R2 and QLogic FabricCache Adapters

An Oracle White Paper October Frequently Asked Questions for Oracle Forms 11g

Oracle Database Gateways. An Oracle White Paper July 2007

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Oracle Communications Network Discovery Overview. Updated June 2007

An Oracle White Paper June Migrating Applications and Databases with Oracle Database 12c

Oracle Easy Connect Naming. An Oracle White Paper October 2007

Express Implementation for Electric Utilities

Oracle BI Publisher Enterprise Cluster Deployment. An Oracle White Paper August 2007

An Oracle Technical White Paper June Oracle VM Windows Paravirtual (PV) Drivers 2.0: New Features

Oracle Database 12c - Global Data Services

Maximum Availability Architecture. Oracle Best Practices For High Availability. Backup and Recovery Scenarios for Oracle WebLogic Server: 10.

Driving the Business Forward with Human Capital Management. Five key points to consider before you invest

MANAGING A SMOOTH MARKETING AUTOMATION SOFTWARE IMPLEMENTATION

Oracle On Demand Infrastructure: Virtualization with Oracle VM. An Oracle White Paper November 2007

An Oracle White Paper December Advanced Network Compression

Using Oracle Real Application Clusters (RAC)

An Oracle White Paper February Integration with Oracle Fusion Financials Cloud Service

An Oracle White Paper February, Oracle Database In-Memory Advisor Best Practices

Oracle Business Intelligence Enterprise Edition Plus and Microsoft Office SharePoint Server. An Oracle White Paper October 2008

An Oracle White Paper November Leveraging Massively Parallel Processing in an Oracle Environment for Big Data Analytics

Oracle Business Intelligence ADF Custom Visualizations and Integration. An Oracle White Paper November 2012

WEBLOGIC SERVER MANAGEMENT PACK ENTERPRISE EDITION

Primavera Unifier Integration Overview: A Web Services Integration Approach O R A C L E W H I T E P A P E R F E B R U A R Y

Migrating from Unix to Oracle on Linux. Sponsored by Red Hat. An Oracle and Red Hat White Paper September 2003

Oracle Database 10g: Building GIS Applications Using the Oracle Spatial Network Data Model. An Oracle Technical White Paper May 2005

New 11g Features in Oracle Developer Tools for Visual Studio. An Oracle White Paper January 2008

Oracle Insurance General Agent Hardware and Software Requirements. Version 8.0

Guide to Database as a Service (DBaaS) Part 2 Delivering Database as a Service to Your Organization

Manage Oracle Database Users and Roles Centrally in Active Directory or Sun Directory. Overview August 2008

An Oracle White Paper June High Performance Connectors for Load and Access of Data from Hadoop to Oracle Database

An Oracle White Paper November Oracle Business Intelligence Standard Edition One 11g

An Oracle White Paper March Oracle s Single Server Solution for VDI

March Oracle Business Intelligence Discoverer Statement of Direction

Using DataDirect Connect for JDBC with Oracle Real Application Clusters (RAC)

Long User ID and Password Support In JD Edwards EnterpriseOne

Oracle Primavera P6 Enterprise Project Portfolio Management Performance and Sizing Guide. An Oracle White Paper October 2010

Oracle Utilities Mobile Workforce Management Benchmark

An Oracle Technical Article November Certification with Oracle Linux 6

Oracle Application Server 10g Web Services Frequently Asked Questions Oct, 2006

An Oracle White Paper September Highly Available and Scalable Oracle RAC Networking with Oracle Solaris 10 IPMP

The Bayesian Approach to Forecasting. An Oracle White Paper Updated September 2006

Top Ten Reasons for Deploying Oracle Virtual Networking in Your Data Center

An Oracle White Paper February Oracle Data Integrator 12c Architecture Overview

One View Report Samples Financials

An Oracle White Paper June Security and the Oracle Database Cloud Service

An Oracle White Paper May Oracle Database Cloud Service

Driving Down the High Cost of Storage. Pillar Axiom 600

Oracle FLEXCUBE Direct Banking Release Corporate Foreign Exchange User Manual. Part No. E

An Oracle White Paper May Distributed Development Using Oracle Secure Global Desktop

Oracle SQL Developer Migration. An Oracle White Paper September 2008

Oracle Database Backup Service. Secure Backup in the Oracle Cloud

October Oracle Application Express Statement of Direction

Integrating Tutor and UPK Content: A Complete User Documentation Solution. An Oracle White Paper April 2008

An Oracle White Paper March Integrating Microsoft SharePoint Server With Oracle Virtual Directory

Oracle Primavera Gateway

Field Service Management in the Cloud

Best Practices for Optimizing Storage for Oracle Automatic Storage Management with Oracle FS1 Series Storage ORACLE WHITE PAPER JANUARY 2015

An Oracle White Paper October Oracle Data Integrator 12c New Features Overview

Deliver Oracle BI Publisher documents to Microsoft Office SharePoint Server An Oracle White Paper July 2008

Introduction. Automated Discovery of IT assets

An Oracle White Paper August Automatic Data Optimization with Oracle Database 12c

An Oracle Technical Article March Certification with Oracle Linux 7

Evolution from the Traditional Data Center to Exalogic: An Operational Perspective

Siebel CRM Reports. Easy to develop and deploy. Administration

An Oracle Technical Article October Certification with Oracle Linux 5

Oracle Directory Services Integration with Database Enterprise User Security O R A C L E W H I T E P A P E R F E B R U A R Y

managing planned downtime with RAC Björn Rost

HA for Enterprise Clouds: Oracle Solaris Cluster & OpenStack

The Case for a Stand-alone Rating Engine for Insurance. An Oracle Brief April 2009

Improve your Customer Experience with High Quality Information

Transcription:

An Oracle White Paper September 2010 Application Failover with Oracle Database 11g

Summary This paper is a brief overview of high availability mechanisms built into the Oracle database server and its clients (i.e., drivers, adapters) to support application failover, during planned as well as unplanned database outages. The primary goal of this paper is to clarify Oracle s HA features FAN, FCF and TAF and make recommendations on when to use which. In a follow-up paper, we will discuss in greater details how to use these mechanisms. Oracle Database HA Configurations The Oracle Database furnishes the following High Availability configurations: Single Instance HA Cold Failover Cluster RAC, RAC One, RAC with Vendor Clusterware Data Guard Physical Standby (single Instance or RAC with/without Broker) Data Guard Logical Standby (Single Instance or RAC with/without Broker) Detailed coverage of each of these configurations can be found in the Oracle Database 11g Release 2 High Availability Overview document @ http://download.oracle.com/docs/cd/e14072_01/server.112/e10804.pdf The Why and What of Application Failover When a database outage occurs, two problems (the Evil Twins) confront applications: errors and hangs. Applications encounter errors, because the work they were doing (queries, transactions) is interrupted. Even worse, those errors may take some time to arrive. When the database outage occurs, the client application may have to wait for network timeouts (which may be minutes) before being informed of the outage. This can cause the application to hang for some time, leading to user frustration. Oracle s HA features address these Twin Evils by helping to speed application response to failure, and by helping to mask the error from the end user in some situations 1

Fast Application Notification (FAN) FAN addresses one of the Evil Twins: hangs. FAN is an Oracle High Availability mechanism that emits events when database conditions change i.e., a managed service, instance or site 1 goes up or down. The events are propagated by either Oracle Notification System (ONS) to Java subscribers, or Streams AQ to OCI (C, C++, PHP, Python) and.net subscribers. The main benefits of FAN when compared to TCP timeouts are: fast detection of condition change and fast notification. FAN is available through the following Oracle components: CMAN session pools; Oracle Call Interface (OCI) and a number of drivers or adapters that use OCI libraries (including OCCI, PHP, Python); Universal Connection Pool for Java; JDBC SimpleFAN API; and ODP.NET connection pools. How to use Fan events? a) Non-programmatically through Oracle database integrated clients (using Oracle Restart): Oracle JDBC, Universal Connection Pool for Java, Oracle Call Interface, and ODP.NET. These clients can be configured to enable FAN and automatically connect to a new primary database upon failover using Fast Connection Failover (FCF), see later. b) Programmatically: 3 rd party drivers, containers or frameworks may use Java FAN API (SimpleFAN) or OCI Callbacks, to handle FAN events themselves. c) FAN callout scripts can be configured on the database tier and allow server-side actions when conditions change. In an upcoming paper, we will furnish a more detailed and complete coverage of how to use FAN. Transparent Application Failover (TAF) Overview Transparent Application Failover (TAF) helps to address the other Evil Twin: errors. TAF is an OCI feature providing connection recovery capabilities: connection failover, session state restoration, query failover, and graceful session migration for planned downtime 2. TAF operates at session or connection level and is available to database clients that use the OCI driver including: OCI, OCCI, Pre-compilers (Pro*), ODP.Net, JDBC-OCI (not JDBC thin), PHP OCI8, Ruby OCI8, Python cx-oracle, etc. TAF is particularly useful for read-only and read-mostly applications. When failure occurs amid a query or transaction and the client has subscribed to FAN events, TAF will re- 1 After a failover, the Oracle Data Guard Broker (broker) publishes FAN events. 2 See the TAF Best Practices white paper @ for a more detailed explanation of TAF features. 2

execute the query and re-position the cursor. As a result, the application may continue fetching after a failure occurs. If failure occurs during a transaction, the database rolls back the transaction, TAF notifies the client to clean up application state (by issuing ROLLBACK) before resuming normal operations on a new connection. TAF may be used with or without FAN. a) In TAF-only environments (i.e., when not subscribing to FAN events), upon condition change (i.e., node down), and upon expiration of TCP timeout, TAF executes the recovery and failover process; the client may experience longer delay (varies with systems) because, unlike FAN, application threads may remain blocked until the TCP timeout expires. b) When combined with FAN, in RAC and Data Guard environments, delays due to TCP timeouts are eliminated. c) TAF callback functionality 3 (covered in details in upcoming paper), allows applications to extend the TAF recovery mechanism. Fast Connection Failover (FCF) FCF designates the set of actions that integrated Oracle clients (UCP, OCI Session pool, etc) take to process FAN events. The key features of FCF are: a) Rapid database service/instance/node failure detection then abort and removal of invalid connections from the pool Unplanned outages -- Dead connections are rapidly detected: the borrowed and inuse connections are aborted and removed from the pool; idle connections are cleaned up as well. Planned Outages (graceful shutdown) -- Borrowed or in-use connections are not interrupted however, at the completion of the database operation the connections are marked for removal and returned to the pool. When all connections are checked-in, back to the pool, the database can shutdown gracefully. b) Recognition of new nodes that join an Oracle RAC cluster c) Runtime distribution of connection requests to all active Oracle RAC instances Recommendations 3 http://download.oracle.com/docs/cd/e14072_01/appdev.112/e10646.pdf 3

The following rules of thumb or recommendations apply: 1. When using integrated Oracle clients (JDBC, OCI,.Net etc), FAN with FCF is highly recommended as it provides immunity from TCP timeouts for in-flight calls, and eagerly cleans up dead connections from connection pools to minimize application exposure to the failure. 2. For - read-only and read-mostly applications, TAF (in conjunction with FAN) is the recommended choice; it provides query failover (i.e. it allows active queries to continue) without disrupting the application. 3. Java containers, drivers, frameworks, or applications may use FAN API to directly manage FAN events themselves. OCI-based containers, drivers, frameworks or applications (C, C++, OCCI, PreComps, PHP, Ruby, Python, Perl) may use OCI callbacks to directly manage FAN events themselves. 4

Application Failover with Oracle Database 11g September 2010 Author: Kuassi Mensah, Norman Woo Contributing Authors: Nancy Ikeda, Kevin Neel Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2009, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. 0109