Beruflich Dokumente
Kultur Dokumente
1/22/2012
Agenda
Introduction to Oracle RAC Connecting to Oracle RAC using SCAN Load balancing, TAF, FAN and Oracle RAC More Information and Q&A
Clients
1/22/2012
Agenda
Introduction to Oracle RAC Connecting to Oracle RAC using SCAN Load balancing, TAF, FAN and Oracle RAC More Information and Q&A
1/22/2012
Siebel
PSFT
Used by clients to connect to any database in the cluster ClusterSCANname Removes the requirement to change the client connection if cluster changes Load balances across the instances providing a service Provides failover between moved instances
RAC DB1
RAC DB2
RAC One
FREE
With SCAN only 1 entry per cluster is used, regardless of the # of nodes:
PMRAC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = clusterSCANname)(PORT = 1521)) (CONNECT_DATA = ))
1/22/2012
Application Server
Local Listeners
Application Server
Local Listeners
1/22/2012
Each cluster will have 3 SCAN-Listeners, combined with a SCAN-VIP defined as cluster resources The SCAN VIP/LISTENER combination will failover to another node in the cluster, if the current node fails
Cluster Resources -------------------------------------------ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE ora.LISTENER_SCAN2.lsnr 1 ora.LISTENER_SCAN3.lsnr 1 ONLINE ONLINE ONLINE ONLINE
11
SCAN re-configuration
Requires a DNS entry (or GNS) to be used for full functionality What if the configuration needs to change?
Change the DNS entry first e.g.: NEWclusterSCANname.example.com IN A 133.22.67.184 IN A 133.22.67.183
Then issue:
srvctl modify scan -n NEWclusterSCANname.example.com
Most changes to the SCAN configuration can be performed using 'srvctl modify scan online, including:
name changes (changes to the SCAN name) IP address changes (assuming that the new IP addresses are taken from the same subnet as the old ones).
The SCAN listeners need to be restarted using 'srvctl stop / start scan' to reflect an IP address change
12
1/22/2012
Using an Oracle Database 11g Release 2, the following configuration will be the default for a newly, DBCA-created DB:
NAME local_listener TYPE string VALUE (DESCRIPTION=(ADDRESS_LIST=(AD DRESS=(PROTOCOL=TCP)(HOST=133. 22.67.111)(PORT=1521)))) remote_listener string sales1-scan.example.com:1521 -------------------------- ----------- ------------------------------
Note the notation of the remote_listener for SCAN More information: Oracle Real Application Clusters 11g Release 2 Overview of SCAN on http://www.oracle.com/goto/rac
13
No change required, since node VIPs can be used, but use of SCAN is recommended.
14
1/22/2012
Agenda
Introduction to Oracle RAC Connecting to Oracle RAC using SCAN Load balancing, TAF, FAN and Oracle RAC More Information and Q&A
15
SCAN
Connection Pool
16
1/22/2012
TNSNAMES.ora or JDBC(:THIN)
PMRAC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = MySCAN)(PORT = 1521)) (CONNECT_DATA = )) jdbc:oracle:thin:@MySCAN:1521/Email
BATCH Production
MySCAN
Connection Pool
17
MySCAN
Connection Pool
18
1/22/2012
MySCAN
Connection Pool
19
MySCAN
Connection Pool
20
10
1/22/2012
MySCAN
Connection Pool
21
empno
7369 7499 7521 7566 7654 7698
name
Smith Allen Ward Jones Martin Blake
MySCAN
Connection Pool
22
11
1/22/2012
MySCAN
Connection Pool
23
24
12
1/22/2012
MySCAN
Connection Pool
25
Connection Pool
MySCAN
26
13
1/22/2012
The application needs to handle the transaction failure that might have occurred.
BATCH Production Email
Connection Pool
MySCAN
27
MySCAN
Connection Pool
28
14
1/22/2012
MySCAN
Connection Pool
29
Production Email
MySCAN
Connection Pool
?
Traditionally, PMON dynamically registers the services to the specified listeners with: service names for each running instance of the database and instance names for the DB The listener is updated with the load information for every instance and node as follows: 1-Minute OS Node Load Average all 30 secs. Number of Connections to Each Instance Number of Connections to Each Dispatcher
30
15
1/22/2012
Using an Oracle Database 11g Release 2, the following configuration will be the default for a newly, DBCA-created DB:
NAME local_listener TYPE string VALUE (DESCRIPTION=(ADDRESS_LIST=(AD DRESS=(PROTOCOL=TCP)(HOST=133. 22.67.111)(PORT=1521)))) remote_listener string sales1-scan.example.com:1521 -------------------------- ----------- ------------------------------
Note the notation of the remote_listener for SCAN More information: Oracle Real Application Clusters 11g Release 2 Overview of SCAN on http://www.oracle.com/goto/rac
31
RAC Database
60% connections
Instance3
32
16
1/22/2012
RAC Database
Instance1
MySCAN
-r ORCL1,ORCL2,ORCL3
60% connections
Instance3
33
CTLB Goal
SHORT - used for application connections that are short in duration. LONG - used for application connections that are connected for a long period; e.g. third party connection pools and SQL*Forms applications.
RTLB Goal
THROUGHPUT Work requests are directed based on throughput. SERVICE_TIME Work requests are directed based on response time.
17
1/22/2012
-r ORCL1,ORCL2,ORCL3 -q TRUE
IF CLB_GOAL=LONG then the listener will load balance based on number of sessions
The RTLB-GOAL setting will not be used in this case.
35
-r ORCL1,ORCL2,ORCL3 -q TRUE
BATCH
Production Email
!
200 100 160
MySCAN
Connection Pool
?
36
18
1/22/2012
Agenda
Introduction to Oracle RAC Connecting to Oracle RAC using SCAN Load balancing, TAF, FAN and Oracle RAC More Information and Q&A
37
More Information
www.oracle.com/goto/rac
Oracle Real Application Clusters 11g Release 2 Overview of SCAN - Aug 2010 Automatic Workload Management with Oracle RAC 11g Release 2 - Jan 2010 XA and Oracle controlled Distributed Transactions - Aug 2010
www.oracle.com/goto/clusterware
Oracle Clusterware 11g Release 2 Technical Overview - Updated for Oracle Clusterware 11.2.0.2
Oracle Documentation
Oracle Real Application Clusters Administration and Deployment Guide 11g Release 2 (11.2): 5 Introduction to Automatic Workload Management
38
19
1/22/2012
39
40
20