11gR2 Oracle Real Application Clusters / Grid Infrastructure N.F. René Kundersma (
[email protected]) (
[email protected]) Database Technical Architect Architect – Oracle Technology Services Services
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.
About me… René Kundersma, Software Ingenieur • 1998: 1998: Sun Microsy Microsystems stems • 2001: Qualogy Consultancy • 2006: 2006: Oracle Oracle Technolo Technology gy Services Services (Orac (Oracle le Consulti Consulting), ng), The The Netherlands Oracle Certified Master 9i/10g, Certified Expert RAC/Linux Currently working on first Dutch Database Machine implementation (v1 & v2) Working with 11gR2 RAC since September 2007
New Features / Agenda Answer most common questions about Oracle Oracl e Clust Clusterwar erware e and Oracle Oracle RAC •
Upgrading to Oracle RAC 11g Release 2
•
New De-Install Utility
•
•
•
•
Managing Your Oracle RAC 11g Release 2 database SCAN Multiple Public Networks Managing OCR and Voting Disks with ASM (ASMCF)
•
Grid Plug and Play
•
RAC One Node
Upgrading to Oracle RAC 11g Release 2
Upgrading to Oracle Database 11g Release 2
•
•
Oracle Oracle Clusterw Clusterware are and Oracle Oracle Automatic Automatic Storage Storage Management are a single binary distribution called “grid infrastructure” –
Out of Place Upgrade (home is owned by ROOT)
–
Recommended to be on local file s ystem
Upgrade Upgrade Oracle Oracle Clusterw Clusterware are and Automatic Automatic Storage Storage Management to 11.2.0.1 at the same time –
ASM 11.1 only is rolling upgradeable
Introducing Grid Infrastructure Infrastructure •
Software provided by Oracle that is outside the database –
•
•
Software generally managed by the System Administrator (even (even if it comes from Oracle!) Only one copy runs on a server –
•
I.E. infrastructure infrastructure software: volume management, file system management, cluster software
May have extra copy during out-of-place upgrade
Grid Infrastructure for a Cluster •
•
Grid Infrastructure for a Standalone Server •
•
Includes Includes Oracle Clusterwar Clusterware, e, ASM Includes Oracle Restart, ASM
Need SCAN for upgrade
Mixed Database Versions in an 11.2 Cluster
•
•
Oracle Database 10g and Oracle Database 11g are supporte supported d with Oracle Oracle Clusterw Clusterware are 11g Release Release 2 You must upgrade upgrade Oracle Oracle Clusterw Clusterware are and Automatic Automatic Storage Management to 11.2.0.1 at the same time
•
Apply DBCA patch Bug 8288940
•
“Pin” “Pin” the nodes nodes crsctl pin css -n nodename
Where did OPROCD go?
•
•
•
OPROCD, OCLSOMON, OCLSVMON no longer exist with Oracle Oracle Clusterw Clusterware are 11g Release Release 2 Hangcheck timer is not not required required on Linux Code has been rewritten and functionality is handled by Oracle Oracle Clusterw Clusterware are Agents. Agents.
Oracle Oracle Clusterw Clusterware are Startup Startup Sequen Sequence ce
Managing Your Oracle RAC 11g Release 2 Database
Two Management Styles for Oracle RAC •
Administrator Managed –
–
•
Specifically define where the database should run with a list of servers Define where services should run within the database
Policy Managed –
–
–
Define resource requirements of workload Enough instances are started to support workload workload requirements Goal: To remove hard coding of a service to a specific instance or node
Server Pool •
Logical division of the cluster into pools of servers
•
Manag Managed ed by crsctl crsctl (appli (applica catio tions) ns),, srvc srvctl tl (Oracl (Oracle) e)
•
Defined by 3 attributes (min, max, importance) or a defined list of nodes –
–
–
Min- minimum number of of servers (default (default 0) Max – maximum number of servers servers (default 0 or -1) Importance – 0 (least important) important) to 1000
srvctl modify serverpool –g < name> –u < max>
Server Pool Example – Instance View public network VIP1
Scan_LSNR Listener instance 1 ASM Oracle Clusterware
VIP2
cluster interconnect
Operating System
backoffice
VIP3
VIP4
Scan_LSNR
GNS
Scan_LSNR
Listener
Listener
Listener
instance 2 ASM
instance 1 ASM
instance 2 ASM
Oracle Clusterware Clusterware
Oracle Clusterware Clusterware
Oracle Clusterware Clusterware
Operating System
Operating System
Operating System
shared storage
frontoffice Min 1 Max 2 Imp 4
Min 1 Max 2Imp 3
Redo / Archive logs all instances
Managed by ASM
Database / Control files OCR and Voting Disks
Cluster Managed Services with Server Pools
•
One to one mapping –
•
IE a service can only run in one server pool
Services are uniform (run on all instances in the pool) or singleton or singleton (runs on only one instance in the pool)
Server Assignment for policy based management
•
Servers are assigned in the following order: 1. Generic server pool 2. User assigned server pool 3. Free
•
Oracle Oracle Clusterw Clusterware are uses importa importance nce of server server pool to determine order 1. Fill all server pools in order of importance until they meet their minimum 2. Fill all server pools in order of importance until they meet their maximum 3. By Default any left over go into FREE
Server Assignment Cluster Clust er Management Management via Server Server Pools
Back Office Min 1 Max 3 Imp 3
Front Office
LOB
Min 2 Max 3 Imp 4
Min 0 Max 2 Imp 2
Free
Server Assignment Cluster Clust er Management Management via Server Server Pools
Front Office
LOB
Min 2 Max 3 Imp 4
Min 0 Max 2 Imp 2
Back Office Min 1 Max 3 Imp 3
Free
Server Assignment Cluster Clust er Management Management via Server Server Pools
Back Office
Front Office
LOB
Min 1 Max 3 Imp 3
Min 2 Max 3 Imp 4
Min 0 Max 2 Imp 2
Free
Cluster Reconfiguration
If a server leaves leaves the cluster cluster Oracle Clusterware Clusterware may move servers from one server pool to another only if a server pool falls below its min.
•
It chooses the server to move from
•
–
–
A server pool that is less important A server from a server pool of the same importance which has more servers than its min
Oracle Oracle Clusterw Clusterware are will only only move serve servers rs if you have non-default values for min, importance
•
GENERIC Server Pool
•
Used to model databases that are “Administrator “Administrato r Managed”. i.e. “The “The OLD WAY!” –
Parent of all server pools for “Administrator Managed” databases
•
Always exists but may be of size 0
•
Used for upgrade from 10g or 11g Release 1
•
Managed Managed by srvctl srvctl managing managing the the database database
•
Servers in ‘Generic’ ‘Generic’ are named (hosting (hosting member member in cluster resource)
Administrator Managed and Policy Managed Cluster Clust er Management Management via Server Server Pools
GENERIC Back Office 11g R1
Front Office
LOB
10g R2
11g R2 Min 0 Max 2 Imp 2
Notes for Policy-Managed Policy-Managed Databases •
SIDs SIDs are DYNAM DYNAMIC IC –
–
–
•
DBA scripts may have to be adjusted Environment variables settings settings in profiles will have to check check the current current sid Directories for LOG files will change over restarts
“Pin” “Pin” Nodes Nodes –
–
–
–
Forces Forces Oracle Clusterwa Clusterware re to maintain maintain the same Node Node number when restarted (which maintains SID) Automatically done on upgrades Required when running pre-11g Release 2 versions in the cluster On upgrade, the nodes will be “pinned”
crsctl pin css -n nodename
SCAN
Single Client Access Name (SCAN)
SCAN Back Office
•
•
•
•
Front Office
LOB
Free
Used by clients to connect to any database in the cluster Removes the requirement to change the client connection if cluster changes Load balances across the instances providing a service Provides failover between “moved instances”
© 2009 Oracle Corporation – Proprietary and Confidential
Network Requirements for SCAN
•
Two options: 1. Define the SCAN in your corporate DNS (Domain Name Service)
sales1-scan.example.com IN A 133.22.67.194 IN A 133.22.67.193 IN A 133.22.67.192
2. Use the Grid Naming Service (GNS) and the SCAN will be created during cluster configuration
Single Client Access Name (SCAN)
•
•
•
•
•
Allows Allows clients clients to use use EZConnec EZConnectt or simple simple JDBC JDBC connections Each cluster will have 3 scan listeners, each having a scanvip defined as cluster cluster resources resources on network network 1 A SCAN VIP/LISTENER will failover to another node in cluster Instance registers with local listener on its node Database “remote_listener “remote_listener”” registers registers instances with all SCAN listeners sqlplus system/ system/manager@ manager@sales1sales1-scan:152 scan:1521/oltp 1/oltp jdbc:oracle:thin:@sales1-scan:1521/oltp
Oracle Oracle Clusterwa Clusterware re SCAN Resources Resources
•
Created by root script during Grid Infrastructure Installation
$srvctl $srvctl conf config ig scan_lis scan_listen tener er SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521 SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521 SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
$srvc $srvctl tl con config fig scan scan SCAN SCAN SCAN SCAN
name: sales1-scan, Network: 1/192.87.58.0/255.255.255.0/ VIP name: scan1, IP: /sales1-scan.mycompany.com/192.87.58.143 VIP name: scan2, IP: /sales1-scan.mycompany.com/192.87.58.99 VIP name: scan3, IP: /sales1-scan.mycompany.com/192.87.58.100
SCAN Overview
Application Server
Oracle RAC Database SCAN Listeners Clients
Listeners
SQL*NET and SCAN •
•
SQL*NET will retrieve the IP addresses from DNS or GNS, it will then load balance and failover across the IP addresses. For MAA implementations, if client uses both primary and standby in address list, SQL*NET will retrieve all 6 IPs, it will then load load balance and and failover across across the 6 IP addresses sales.mycompany.com =(DESCRIPTION= (CONNECT_TIMEOUT=10)(RETRY_COUNT=3) (ADDRESS_LIST= (LOAD_BALANCE=on)(FAILOVER=ON) (ADDRESS=(PROTOCOL=tcp)(HOST=scan1)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=scan2)(PORT=1521))) (CONNECT_DATA= (SERVICE_NAME= sales.mycompany.com)))
Grid Plug and Play (GPnP)
Grid Plug and Play
•
•
Makes it easy to add, replace, or remove nodes in a cluster Allow the cluster cluster to manage manage it’s own virtual virtual ip addresses –
No need to go back to the network administrator
New Cluster Cluster Components Components for GPnP
•
GPnP Profile for Global Global Configuration Configuration –
•
IP Multicast Service Discovery/mDNS –
•
Provides cluster configuration information to allow a node to join the cluster Resolves names to addresses without /etc/hosts or DNS configuration
Grid Naming Service –
Lets the cluster manage it’s own network
–
Support Support DHCP for IPs and VIPs
–
No need to go back to the Network Admin
Network Administrator Requirements GNS Zone Delegation •
Create entries in the corporate DNS servers that will delegate the authority for a portion of the network to the cluster –
IE Let the cluster manage its own network requirements
# Dele Deleg gate to to gns gns on myclu yclust ste er mycluster.example.com. mycluster.example.com. NS gns-vip.mycluster.example.com gns-vip.mycluster.example.com #Let #Let the the worl world d know know how how to to go to to the the GNS GNS vip gns-vip.mycluster.example.com gns-vip.mycluster.example.com. . 10.9.8.7
GPnP Architec Architecture ture – Client Client Connect Connections ions 4
client
1
DNS 2
Corporate domain
5
3
Cluster Subdomain
GNS
SCAN listener
Back Office
6
Front Office
Local listener LOB
p p s c v i m i c a n d y
DHCP server
DATA
RECOV
Free
Next Steps Oracle RAC : http://otn.oracle.com/rac http://otn.oracle.com/rac Oracle XPS-ON-HA Blog: http://blogs.oracle.com/ http://blogs.oracle.com/xpsonha/ xpsonha/ Oracle RAC SIG: http://www.oracleracsig.org Oracle Consulting Technology Services: http://www.oracle.com/global/uk/expert_services/index.html
[email protected]
Q& A
QUESTIONS ANSWERS
http://otn.oracle.com/rac
For More Information
search.oracle.com Real Application Clusters
or otn.oracle.com/rac