Load Balancing & Failover (RAC) RAC 负载均衡和失效接管. About ACOUG  ACOUG: All China Oracle User Group 

Slides:



Advertisements
Similar presentations
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Oracle High Availability Solutions RAC and Standby Database Copyright System Managers LLC 2008.
Advertisements

Tux2 Database The Architecture of Our System © Juhani Välimäki 2005.
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
ORISIS Client Software Installing Additional Tools For OSIRIS Users Niall Hedderley, Central Admin MIS 2005 ITSS Conference.
Oracle Services on RAC Five Things You Might Not Know.
#.1 SQL*Net Kyle Hailey http//ashmasters.com/
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Backup The flip side of recovery. Types of Failures Transaction failure –Transaction must be aborted System failure –Hardware or software problem resulting.
Harvard University Oracle Database Administration CSCI E256 Session 7 Oracle Networking.
Basic JDBC Use Oracle JDBC Drivers must be in the CLASSPATH
1 © 2006 Julian Dyke Logical Standby Julian Dyke Independent Consultant juliandyke.com Web Version.
CERN - IT Department CH-1211 Genève 23 Switzerland t Oracle Data Guard for RAC migrations WLCG Service Reliability Workshop CERN, November.
Presentation #36576 Presentation #36576 Oracle9i LDAP: Advanced Configuration of Directory Naming Daniel T. Liu Senior Technical consultant First American.
1 © Talend 2014 Service Locator Talend ESB Training 2014 Jan Bernhardt Zsolt Beothy-Elo
© 2008 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. James Harding - Database Manager.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Client-Server – Lecture 4 Copyright System Managers LLC 2007 all rights reserved.
Oracle Database Administration
Enabling Advanced Net8 Features. Configuring Advanced Network Address and Connect Data Information.
Oracle for Software Developers. What is a relational database? Data is represented as a set of two- dimensional tables. (rows and columns) One or more.
5 Copyright © 2008, Oracle. All rights reserved. Configuring the Oracle Network Environment.
5 Copyright © 2007, Oracle. All rights reserved. Configuring the Oracle Network Environment.
Oracle8 JDBC Drivers Section 2. Common Features of Oracle JDBC Drivers The server-side and client-side Oracle JDBC drivers provide the same basic functionality.
INFS 752 Summer Juan Salazar Please right click the symbol in the lower right corner, and then press preview, to hear the presentation for each page.
12 Copyright © 2004, Oracle. All rights reserved. Oracle Net Services.
11 Copyright © 2005, Oracle. All rights reserved. Configuring the Oracle Network Environment.
1 © 2006 Julian Dyke Streams Julian Dyke Independent Consultant juliandyke.com Web Version.
CHAPTER 2 Implementing a Database. Introduction to Creating Databases After you’ve installed the Oracle software, the next logical step is to create a.
DBA’s Guide to Physical Dataguard Part II. DBA’s Guide to Physical Dataguard Part II, NoCOUG May 21 st / 43 Overview.
A Practical Guide to Oracle 10g RAC Its REAL Easy! Gavin Soorma, Emirates Airline, Dubai Session# 106.
Oracle10g RAC Service Architecture Overview of Real Application Cluster Ready Services, Nodeapps, and User Defined Services.
11 Copyright © 2005, Oracle. All rights reserved. Configuring the Oracle Network Environment.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
1 Oracle Database (9i) For Sun SPARC Solaris Installation Guide Version : 전자계산소 전자계산소 조성환
Learningcomputer.com SQL Server 2008 Configuration Manager.
SURENDER SARA 10GAS Building Corporate KPI’s
Deploying Oracle Names Jeff D’Abate Sr. Database Administrator Enterprise Application Services November 19, 2004.
Using OUI to install Oracle9i Release 2 on an OpenVMS System.
6 Copyright © 2009, Oracle. All rights reserved. Configuring the Oracle Network Environment.
Installing Oracle9i RAC Release 2 on HP OpenVMS Systems.
B Copyright © 2009, Oracle. All rights reserved. Configuring Warehouse Builder in RAC Environments.
Oracle 10g Database Administrator: Implementation and Administration Chapter 2 Tools and Architecture.
SQL*Net & Other Waits. #.2 Copyright 2006 Kyle Hailey Network Redo Lib Cache Buffer Cache IO Locks Network.
Oracle9 i * Real Application Clusters (RAC) with Red Hat Linux Advanced Server* 2.1 Powered by Intel ® Itanium ® 2 Processors Bill Garner, Sr. Oracle.
3 Copyright © Oracle Corporation, All rights reserved. Basic Oracle Net Server Side Configuration.
1 Copyright © 2009, Oracle. All rights reserved. Administrative Tasks in Warehouse Builder.
3 Copyright © 2004, Oracle. All rights reserved. Controlling Access to the Oracle Listener.
Donna C. Hamby Sr. Principal Instructor Oracle University Oracle Corporation.
High Availability in DB2 Nishant Sinha
Maximum Application Availability with Oracle Database 12c
Oracle Database Architecture By Ayesha Manzer. Automatic Storage Management Spreads database data across all disks Creates and maintains a storage grid.
Chapter 13Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 13 Network Administration and Server-side Configuration.
C Copyright © 2006, Oracle. All rights reserved. Services.
Oracle9i Performance Tuning Chapter 11 Advanced Tuning Topics.
IWR Ideen werden Realität Forschungszentrum Karlsruhe in der Helmholtz-Gemeinschaft Institut für Wissenschaftliches Rechnen Oracle Network Configuration.
External Routines Oracle Database PL/SQL 10g Programming Chapter 12.
1 Chapters 21, 22, 23, 37  Ch. 21: SQL*Loader  Ch. 22: Database Links, Oracle Net  Ch. 23: Materialized Views (aka Snapshots)  Ch. 37: Data Dictionary.
LHC Logging Cluster Nilo Segura IT/DB. Agenda ● Hardware Components ● Software Components ● Transparent Application Failover ● Service definition.
© 2005 Solution Beacon, LLC. All Rights Reserved. Release 11i Workshops Release 11i … Please Add RAC Session Leader Kevin Dahl, Solution Beacon Release.
Basic Oracle Net Services Client-Side Configuration
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Oracle Services on RAC How They Work and What You Should Use Them For Five Things You Might Not Know.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 1.
ODBC, OCCI and JDBC overview
Naming convention for Database Services at CERN
Maximum Availability Architecture Enterprise Technology Centre.
Enabling Distributed Transactions
Oracle10g RAC Service Architecture
RAC Networking Lab.
Introduction of Week 5 Assignment Discussion
Presentation transcript:

Load Balancing & Failover (RAC) RAC 负载均衡和失效接管

About ACOUG  ACOUG: All China Oracle User Group 

About Me  Kamus   Oracle -> Enmou

与技术无关  将技术作为艺术对待  以兴奋的状态面对知识

Load Balancing 负载均衡

Load Balancing  Client-side Load Balancing  Connection Balancing = client-side connect-time LB  Server-side Load Balancing  Listener Balacing = server-side connect-time LB  Runtime Service Balancing = runtime connection load balancing

Client-side Load Balancing RACDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = vip1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip2)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip3)(PORT = 1521)) (LOAD_BALANCE = yes) ) (CONNECT_DATA = (SERVICE_NAME = racdb) ) TNSNAMES.ORA :

Client-side Load Balancing netmgr

Server-side Load Balancing  Listener (Connection) Balancing  Oracle9i and Higher  Service Balancing  Only on Oracle10gR2 and Higher

Listener Balancing sql> ALTER system SET REMOTE_LISTENER='LISTENERS_RAC' scope=BOTH; TNSNAMES.ORA : LISTENERS_RAC = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = vip1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip2)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip3)(PORT = 1521)) )

Listener Balancing

 Listener Log  Oracle10g: $ORACLE_HOME/log  Oracle11g: diagnostic_dest/diag/tnslsnr/ /listener/tr ace  Service Register  月 :54:07 * service_register * orcl11g * 0  Service Update  月 :54:13 * service_update * orcl11g * 0

Listener Balancing  V$SERVICEMETRIC  GOODNESS  DELTA

Load Based & Session Based  PREFER_LEAST_LOADED_NODE_  Undocumented parameter on Oracle and higher  Defaults to “ON”  PREFER_LEAST_LOADED_NODE_ =OFF  = listener_nodename  After 10gR2, set the CLB_GOAL on the service

Service Balancing  Powerful automatic workload management  Define PREFERRED instances  Define AVAILABLE instances  Runtime load balancing  Opposite to Connect time load balancing srvctl add service -d orcl -s orclcluster -r "orcl1,orcl2" -a "orcl3,orcl4"

Service Statistics

Fast Application Notification (FAN)  Fast Connection Failover(FCF)  This is the ability of Oracle Clients to provide rapid failover of connections by subscribing to FAN events.  FAN events are published using ONS and an Oracle Streams Advanced Queuing.  ONS: JDBC  AQ: OCI & ODP.NET clients  Automate fail back by using FAN callouts

Load Balancing Advisory  Oracle10gR2 and Above  Allows listeners to distribute connection requests to best instances.  How to enable EXECUTE DBMS_SERVICE.MODIFY_SERVICE ( service_name => 'OE' -, goal => DBMS_SERVICE.GOAL_SERVICE_TIME -, clb_goal => DBMS_SERVICE.CLB_GOAL_SHORT);

DBMS_SERVICE.MODIFY_SERVICE GOAL TypeValueDescription GOAL_NONE0Load Balancing Advisory is disabled GOAL_SERVICE_TIME1Load Balancing Advisory is enabled GOAL_THROUGHPUT2Load Balancing Advisory is enabled CLB GOAL TypeValueDescription CLB_GOAL_SHORT1Connection load balancing uses Load Balancing Advisory based on GOAL Type CLB_GOAL_LONG2Balances the number of connections per instance using session count per service

GV$SERVICEMETRIC  Measured in 5 sec, 1 min intervals  CALLSPERSEC  DBTIMEPERSEC

Load Balancing Issues  Metalink Note:  Subject: RAC Connection Redirected To Wrong Host/IP ORA  ORA when orapwd file not identical ORA-12545: Connect failed because target host or object does not exist ORA-01017: invalid username/password; logon denied

Failover 失效接管

Failover  Client-side Failover  Connect Time Failover  Transparent Application Failover (TAF)  Serer-side Failover  Transparent Application Failover(TAF) with Service

Client-side Failover  Connect Time Failover  Tnsnames Parameter: FAILOVER  (failover=on) is default for ADDRESS_LISTs, DESCRIPTION_LISTs

Client-side Connect Time Failover RACDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = vip1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip2)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip3)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = racdb) )

Client-side Failover  TAF  Tnsnames Parameter: FAILOVER_MODE  Feature of the Oracle Call Interface (OCI) driver at client side  Must modify tnsnames.ora manually

Client-side TAF RACDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = vip1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip2)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip3)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = vip4)(PORT = 1521)) (LOAD_BALANCE = yes) ) (CONNECT_DATA = (SERVICE_NAME = racdb) (FAILOVER_MODE= (TYPE=SELECT) (METHOD=BASIC)) )

Server-side TAF  Use dbms_service.modify_service srvctl add service -d orcl -s orclcluster -r "orcl1,orcl2”-P BASIC sql>execute dbms_service.modify_service (service_name => 'orclcluster', goal => DBMS_SERVICE.GOAL_SERVICE_TIME, clb_goal => dbms_service.CLB_GOAL_SHORT, failover_method => dbms_service.FAILOVER_METHOD_BASIC, failover_type => dbms_service.FAILOVER_TYPE_SESSION, failover_retries => 20, failover_delay => 5, aq_ha_notifications => true );

Server-side TAF  Only BASIC method is supported with server side TAF (which is to say, PRECONNECT is not supported).  Both the client and server must be 10.2 and aq_ha_notifications must be set to true for the service.  Only server side service settings

Failover Issues  ORA with GLOBAL_DBNAME SID_LIST_LISTENER_PROD2 = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME=prod) (ORACLE_HOME = /oracle/product/9.2) (SID_NAME = prod2) )