Maximum Application Availability with Oracle Database 12c

Slides:



Advertisements
Similar presentations
1.
Advertisements

Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 of the corporate.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Your customer as a segment of one That changes every second! Hein Van Der Merwe Chief.
Oracle Labs Graph Analytics Research Hassan Chafi Sr. Research Manager Oracle Labs Graph-TA 2/21/2014.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer Tips & Tricks Jeff Smith
Virtualization of Fixed Network Functions on the Oracle Fabric Krishna Srinivasan Director, Product Management Oracle Networking Savi Venkatachalapathy.
1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
A Java Architecture for the Internet of Things Noel Poore, Architect Pete St. Pierre, Product Manager Java Platform Group, Internet of Things September.
Oracle Cloud Marketplace Neelesh Gurnani Director, Product Development Arif Khan Director, Product Management September 29, 2014 Copyright © 2014, Oracle.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Track the changes in your Apex application between releases: Yes you can Plsql.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer What’s New in Version 4.1 Jeff Smith
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Advanced Metadata Modeling Modeling for the Oracle Business Intelligence Cloud.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Introduction and Update: Oracle Hyperion Financial Close Management CON8536 Richard.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | 2 Hidden Gems of APEX David Gale Software Engineer Oracle Application Express November,
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle SQL Developer For the DBA Jeff Smith
The Safe Harbor The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated.
HOL9396: Oracle Event Processing 12c
Best Practices for Upgrading Oracle PeopleSoft Environments
Oracle Database 12c Data Protection and Multitenancy on Oracle Solaris 11 Xiaosong Zhu Senior Software Engineer Copyright © 2014, Oracle and/or its affiliates.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Title Slide without Picture Subtitle Presenter’s Name Presenter’s Title Organization,
Best Practices for Maintaining Primavera EPPM Solutions Mike Kieffer, Sr. Manager Mary Wiedenman, Sr. Program Manager Oracle Software Support Primavera.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit The Newest JDE Module – Rental Management Joel Sandberg Sales Consultant.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1 Preview of Oracle Database 12 c In-Memory Option Thomas Kyte
QAD .Net UI: New Enhancements
Getting Started with Oracle Compute Cloud
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit PaaS from an Applications Perspective Charles McGuinness Director,
Oracle Confidential – Internal/Restricted/Highly RestrictedCopyright © 2014, Oracle and/or its affiliates. All rights reserved. | Oracle Identity Management.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Reporting from Contract.
Oracle E-Business Suite Order Management: Presenting the HTML and Mobile User Experience Durgaprasad Bodapati Director, Product Management Bhavana Sharma.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1 Oracle Unified BPM Suite Customer Advisory Board Design Best Practices Overview.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. An Auto-Join Network of Things Wong, H. and Wesson, B. Oracle Confidential – Internal/Restricted/Highly.
Hadoop 2 cluster with Oracle Solaris Zones, ZFS and unified archives Orgad Kimchi - Principal Software Engineer September 29, 2014 Oracle Confidential.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. 1 Quick Tutorial – Part 2 Open Data Web Services for Oracle BPM August, 2013 Forms.
I Copyright © 2004, Oracle. All rights reserved. Introduction Copyright © 2004, Oracle. All rights reserved.
1Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 8 Contract Management.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
CON Software-Defined Networking in a Hybrid, Open Data Center Krishna Srinivasan Senior Principal Product Strategy Manager Oracle Virtual Networking.
1cs Intersection of Concurrent Accesses A fundamental property of Web sites: Concurrent accesses by multiple users Concurrent accesses intersect.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. JD Edwards Summit Really Cool Demo Stuff – 2015 Edition!!!!! For demo content, please.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. | Using Edition-based redefinition with PL/SQL How to deploy database code changes.
1Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
1. When things go wrong: how to find SQL error Sveta Smirnova Principle Technical Support Engineer, Oracle.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Workforce Scheduling Release 5.0 for Windows Implementation Overview OWS Development Team.
RESTful Microservices In Java With Jersey Jakub Podlešák Software Engineer Oracle, Application Server Group September 29, 2014 Copyright © 2014, Oracle.
WebCenter in Education & Research A Transformation in Digital Business Session: CON7709 Golden Gate C3 Room, Marriott Marquis Moderator: Kevin Roebuck,
18 Copyright © 2004, Oracle. All rights reserved. Backup and Recovery Concepts.
Performance/Scalability with JDBC, UCP & Oracle Database 12c
18 Copyright © 2004, Oracle. All rights reserved. Recovery Concepts.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
13 Copyright © 2007, Oracle. All rights reserved. Using the Data Recovery Advisor.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 1.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 5 Lifehacks for the Apex Development environment Five frameworks you should use.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Oracle Java Cloud Service Oracle Develop July 2013.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | PeopleSoft Order Management Pricing Managers: Have We Got Tools for You Oracle Confidential.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Daddy, what's a middle wear? An incredibly oversimplified explanation of what Middleware.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1.
Chapter 2 Database System Concepts and Architecture
Maximum Availability Architecture Enterprise Technology Centre.
Net 431 D: ADVANCED COMPUTER NETWORKS
JD Edwards Support and Oracle Cloud Infrastructure: A Successful Path to Oracle Cloud
OpenWorld 2018 Oracle API Platform: How to Manage Typical Workflows
Objectives In this lesson, you will learn about:
Presentation transcript:

Maximum Application Availability with Oracle Database 12c Kuassi Mensah Director Product Management

The following is intended to outline our general product direction The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3

My Next Session Oracle In-Database MapReduce: When Hadoop Meets Exadata 7/25/13, 12:00– 13:00, Room 431

Program Agenda Problems to Solve New Concepts Transaction Guard Application Continuity Application Design Considerations

Problems to Solve Upon Database Outage Four Problems Confront Applications Hang Errors Outcome of In-Flight Work Resubmission of In-Flight Work

Current Situation Hang -> Fast Application Notification (FAN) Errors Handling? Not formalized In-Flight Work? Lost! Resubmission of In-Flight Work? N/A!

Program Agenda Problems to Solve New Concepts Transaction Guard Application Continuity Application Design Considerations

Recoverable Error Formalized OracleException.IsRecoverable property Applications No longer need to maintain own list of error codes (e.g., ora-1033, ora-1034, ora-xxx) JDBC throws SQLRecoverableException

Database Request Unit of Work Request Begins PoolDataSource pds = GetPoolDataSource(); Connection conn = getConnection(pds); PreparedStatement pstmt = … … SQL, PL/SQL, local calls, RPC conn.commit(); conn.close(); Request Body Usually ends with COMMIT Request Ends

Program Agenda Problems to Solve New Concepts Transaction Guard Application Continuity Application Design Considerations

Transaction Guard Tool that supports known outcome for every transaction Without Transaction Guard, retry can cause logical corruption Used by Application Continuity Can be used independently of Application Continuity Work Request 4. Reliable Commit Outcome 2. DB Calls 4. Enforce Outcome 3. Errors 12c ORACLE Database

Transaction Guard – Typical Usage Upon database instance crash FAN aborts dead session Application gets an error Pool removes orphan connection from pool If “recoverable error” then Get last LTXID from dead session Obtain new database session Get transaction status

Transaction Guard In Action Client/Mid-tier Database Time getConnection() Txn.Commit(); get Last LTXID <new session> Commit outcome? COMMIT/ROLLBACK start transaction assign LTXID COMMIT? Return & Preserve COMMIT OUTCOME SQL, PL/SQL, RPC Results Recoverable Error COMMIT TG in Action Get Logical TX ID

Transaction Guard Configuration On Service COMMIT_OUTCOME Values – TRUE and FALSE Default – FALSE Applies to new sessions RETENTION_TIMEOUT Units – seconds Default – 24 hours (86400) Maximum value – 30 days (2592000) Adding and Modifying a Service for a Server Pool srvctl add service -database orcl -service GOLD -poolname ora.Srvpool -commit_outcome TRUE -retention 604800 -notification TRUE srvctl modify service -database orcl -service GOLD -commit_outcome TRUE -retention 604800 -notification TRUE Adding an Administration-Manager Service srvctl add service -database codedb -service GOLD -prefer serv1 -available serv2 -commit_outcome TRUE -retention 604800 -notification TRUE If you are using a single-instance database, use the DBMS_SERVICE.MODIFY_SERVICE PL/SQL procedure to modify services, and you should always use FAN. Example 25-3 modifies a service (but substitute the actual service name for <service-name>). Modifying a Service (PL/SQL) DECLARE params dbms_service.svc_parameter_array; BEGIN params('COMMIT_OUTCOME'):='true'; params('RETENTION_TIMEOUT'):=604800; params('AQ_HA_NOTIFICATIONS'):='true'; dbms_service.modify_service('<service-name>',params); END; / 15

Transaction Guard in Oracle database 12c JDBC-thin, ODP.NET, OCI, OCCI Commit Models Local TXN Auto-commit, Commit on Success Commit embedded in PL/SQL DDL, DCL, Parallel DDL Remote, Distributed Exclusions XA R/W DBLinks from Active Data Guard or Read Only

Program Agenda Problems to Solve New Concepts Transaction Guard Application Continuity Design Considerations

Application Continuity Mask Database Outage When Successful Replays in-flight work on recoverable errors Masks many hardware, software, network, storage errors and outages when successful Improves end user experience Work Request 5. Response 2. DB Calls 4. Replay 3. Errors 12c ORACLE Database

Phases in Application Continuity 1-Capture 2-Reconnect 3-Replay Demarcates database request Holds original calls with binds & validation Manages queues Checks request has replay enabled Handles timeouts Creates a new connection Validates target database Uses Transaction Guard to enforce last commit Replays held calls Continues replay, if user visible results match, based on validations Continues request

Application Continuity In Action Oracle JDBC Driver RAC Database Instance1 Instance2 Instance3 Call 1 Call 2 Proxy 1 Application Proxy 2 Connection Replay Context

DEMO

Solution Coverage Application Continuity for Java Client JDBC-Thin driver UCP, WebLogic Server Database SQL, PL/SQL, RPC Select, ALTER SESSION, DML, DDL, COMMIT/ROLLBACK/SAVEPOINT Transaction models: Local, Parallel, Remote, Distributed Mutable function support Hardware acceleration on current Intel & SPARC chips

Exclusions Global Request Target Database Do not use default database service Excludes XA For Java, deprecated concrete classes Restricted calls Alter System Alter Database Not supported for Active Data Guard with read/write database links Does not support: Logical Standby Golden Gate Here are some restrictions and other considerations that apply to Application Continuity. There are basically three levels of restrictions for Application Continuity. They are: Global - This restriction prevents Application Continuity from being enabled or used on any request. Do not use the database service , that is, the default service corresponding to the DB_NAME or DB_UNIQUE_NAME. The use of the database service is not recommended for high availability, because this service cannot be enabled or disabled. Replay is not supported for applications developed using Oracle XA. For applications using JDBC, there is no support for oracle.sql deprecated concrete classes like BLOB, CLOB, BFILE, OPAQUE, ARRAY, STRUCT or ORADATA. Request - This restriction disables Application Continuity for part of a request. For JDBC stream arguments, replay is on a "best effort" basis. For example, if the application is using physical addresses, the address is no longer valid with the outage and cannot be repositioned. Replay is disabled if the transaction executes the ALTER SYSTEM or ALTER DATABASE statement. Replay is not supported if you are using Active Data Guard with read/write database links to another database. Target - Application Continuity is not supported for logically different databases - Oracle Logical Standby and Oracle Golden Gate. ClassCastException during runtime with concrete classes: CLOB clob = (CLOB)rs.getClob(1); -- ClassCastException!

Restrictions When Does Replay Not Occur? Normal Runtime Reconnect Replay Any call in same request after successful commit in dynamic mode (default) a restricted call disableReplay API Error is not recoverable Reconnection failure Replay initiation timeout Max connection retries Max retries per incident Target database not valid for replay Last call committed in dynamic mode Validation detects different results If disabled, the disable is in effect until the next request. The following events will disable replay for the request: Normal Runtime: Capture happens on all original calls, until a successful COMMIT (in dynamic mode), or unless disabled for the request. Reconnect: Replay does not occur if the error is not recoverable, if timeouts have been exceeded, if the target database is not the same or an ancestor, or if the request has committed Replay: is aborted and the original error is returned, if the validation for the replayed call does not pass. The call must return the same user visible results that the application has seen and potentially made a decision on

Program Agenda Problems to Solve New Concepts Transaction Guard Application Continuity Application Design Considerations

Application Assessment Decide What to do Request Boundaries Mark Request Boundaries, if you are not using Oracle Pools JDBC Concrete Classes Replace deprecated concrete classes with Java interfaces Side Effects Use disable API if a database request has an external call that should not be replayed Callbacks Ensure a callback is registered if state changes outside any request (WLS/UCP labeling included by default) Mutable Functions Grant keeping mutable values if these are compatible with your application Before using Application Continuity in your application, your application owner needs to make the following checks: Mark Request Boundaries if the application is not using Oracle pools or is not releasing connections to Oracle Pools. Request Boundaries tag the beginning and end of each request. Determine whether the application borrows and returns connections from the WebLogic Server Pool or Universal Connection Pool for each request, or whether beginRequest and endRequest APIs should be added to the application's own connection pool to identify request boundaries. If you are using Oracle Pools, but are not releasing connections, there is often a property to set to release. Releasing connections scales much better. Determine whether the application uses Oracle JDBC concrete classes. For using Application Continuity, the deprecated concrete classes must be replaced. For information about the deprecation of concrete classes, including actions to take if an application uses them, see My Oracle Support Note 1364193.1 (https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1364193.1). 3) Assess the impact of restrictions and side-effects on your application. Use the disable replay API for any request that should not be replayed. For example, if a request makes external calls using one of the external PL/SQL messaging actions, or uses autonomous transactions, check this request. Decide if it should be replayed or not. Assess if you application sets state outside the database request. If state is set when a user starts a request, outside that request, replay needs to know about it in order to re-execute the calls. When using Oracle WebLogic Server or the Universal Connection Pool, connection labeling is recommended. The labeling is used for both runtime and replay. If using an application’s own callback, register this at the WebLogic Admin Console, or at UCP, or JDBC replay driver levels Decide on whether the application can keep mutables at replay. When a request is replayed, this function obtains a new value every time it is called. Keep mutable values when they are compatible with the application. Grant keeping original values for seq.NEXTVAL,  SYSDATE, SYSTIMESTAMP, and SYS_GUID and sequences during failover. Special Almost every application should use the service setting session_state_consistency value DYNAMIC. If you are not sure do not touch it. If session_state_consistency is dynamic, the application changes the environment or settings during the request. Replay is disabled after the first commit until the end of request. Dynamic is the default mode and most applications should use this mode.

Side Effects When Replay is enabled, some calls may be repeated. Apps may need to use disableReplay() API to prevent this: Autonomous transactions UTL_HTTP , UTL_URL UTL_FILE, UTL_FILE_TRANSFER - files operations UTL_SMPT, UTL_TCP, UTL_MAIL - sending messages DBMS_PIPE, RPCs - to external sources DBMS_ALERT - email or other notifications

Configuration Configure JDBC Replay Driver Set replay data source in property file datasource=oracle.jdbc.replay.OracleDataSourceImpl Enable Application Continuity on Service Set FAILOVER_TYPE = TRANSACTION Review settings for: REPLAY_INITIATION_TIMEOUT = 1800 FAILOVER_DELAY = 3 seconds FAILOVER_RETRIES = 60 retries SESSION_STATE_CONSISTENCY = DYNAMIC COMMIT_OUTCOME = TRUE

Mutables and Grant Privileges GRANT [KEEP DATE TIME | KEEP SYSGUID].. [to  USER] REVOKE [KEEP DATE TIME | KEEP SYSGUID][from USER] GRANT KEEP SEQUENCE.. [to  USER] on [sequence object]; REVOKE KEEP SEQUENCE [from USER] on [sequence object]; If owned, ALTER SEQUENCE.. [sequence object] [KEEP|NOKEEP]; CREATE SEQUENCE.. [sequence object] [KEEP|NOKEEP]; 1. The database user running the application may have the KEEP DATE TIME and KEEP SYSGUID privileges granted, and the KEEP SEQUENCE object privilege on each sequence whose value is to be kept.  For example: grant KEEP DATE TIME to user2; grant KEEP SYSGUID to user2; grant KEEP SEQUENCE on sales.seq1 to user2; Note that GRANT ALL ON <object> does not include (that is, does not grant the access provided by) the KEEP DATE TIME and KEEP SYSGUID privileges and the KEEP SEQUENCE object privilege. Do not grant DBA privileges to database users running applications for which you want replay to be enabled. Grant only privileges only to application users and only the privileges that that are necessary for such users. 2. Most applications need sequence values to be kept at replay.  Sequences in the application may use the KEEP attribute, which keeps the original values of sequence.NEXTVAL for the sequence owner. The following example sets the KEEP attribute for a sequence (in this case, one owned by the user executing the statement; for others, use GRANT KEEP SEQUENCE) : SQL> CREATE SEQUENCE my_seq KEEP; Or, if the sequence already exists but without KEEP: SQL> ALTER SEQUENCE my_seq KEEP; Note that specifying ALTER SEQUENCE ... KEEP/NOKEEP applies to the owner of the sequence. It does not affect other users (not the owner) that have the KEEP SEQUENCE object privileges. If you want KEEP for all users, be sure to GRANT the KEEP SEQUENCE object privilege to these users (or to revoke it from each if you do not want it). SQL> GRANT KEEP SEQUENCE on sales.seq1 to user2;

Maximum Application Availability with Oracle database 12c Hang Errors & Connection Handling Outcome of In-Flight Work Resubmission of In-Flight Work