Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Oracle SCAN for RAC tips

Oracle Tips by Burleson Consulting

December 13, 2010

Question:  I hear that Oracle 11g release 2 has a new RAC feature called SCAN (Single Client Access Name).  How does SCAN replace TAF in a RAC cluster?  Should I use SCAN instead of manual load balancing?

Answer:  According to reliable sources on the web, SCAN provides a single domain name via DNS), allowing and-users to address a RAC cluster as-if it were a single IP address. SCAN works by replacing a hostname or IP list with virtual IP addresses (VIP). 

Because SCAN determines the actual node and listener which accepts the connection, SCAN provides location independence for the databases.  A SCAN database connection does not require any details about a particular node on instance.  SCAN is part of the 11g release 2 movement toward "RAC Virtualization".  Virtualization is great for some RAC shops, not so good for others.

Expert Note:  SCAN is an automatic load balancing tool that uses a relatively primitive least-recently-loaded algorithm.  Most Fortune 50 mission critical RAC systems will not use an automated load balancer in favor of intelligent RAC load balancing., where you direct like-minded transactions to like-minded nodes.  This approach greatly reduces the load on the cache fusion payer because less blocks must be sent across the RAC interconnect.

According to Oracle, there are two benefits for SCAN:

  • Fast RAC failover:  If a node fails, Oracle detects the loss of connection to the VIP and redirects new connects to the surviving VIP's.  This is an alternative to the transparent application failover. (TAF) for automatic load balancing. 

  • Easier maintenance for Grid RAC systems:  For Grid systems that gen-in and gen-out blade servers frequently, SCAN offers easier change control for the RAC DBA.  As RAC nodes are added or deleted, the DBA does not have to change the configuration files to reflect the current list of RAC node IP addresses (or hostnames).  In a nutshell, SCAN allows a single cluster alias for all instances in the cluster.

Configuring RAC to use SCAN

The set-up for SCAN is implemented as follows:

STEP 1 - Add a new DNS entry for SCAN (e.g. /etc/hosts).  This will create a single DNS domain name that resolves to all of the IP addresses in your RAC cluster (one for each node).  This will use a round-robin algorithm

root> cat /etc/hosts

myscan.mydomain.com IN A 122.22.22.22 IN A 122.22.22.23 IN A 122.22.22.24

STEP 2 - Create a SCAN VIP for each IP address in  step 1.

STEP 3 - Create a SCAN listener for each VIP that was created in step 2.

STEP 4 - Change the tnsnames.ora file.  This entry will point SCAN to the single DNS hostname created in step 1.  Prior to the introduction of SCAN (11g r1 and earlier using TAF or intelligent load balancing ), the tnsnames.ora file contained a list of hostnames, one for each node in the cluster:

SCANDB =
(DESCRIPTION =
  (ADDRESS = (PROTOCOL = TCP)(HOST = myscan1.mydomain.com)(PORT = 1522))
   
  (ADDRESS = (PROTOCOL = TCP)(HOST = myscan2.mydomain.com)(PORT = 1522))

  (ADDRESS = (PROTOCOL = TCP)(HOST = myscan3.mydomain.com)(PORT = 1522))
   (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SCANDB)
   )
)

STEP 5 - Set the remote_listener and local_listener parameters:  You want to set your remote_listener parameter to point to a tnsnames.ora entry for SCAN as defined in step 4.

remote_listener=myscan.mydomain.com:1522

The SCAN listener for RAC

This single domain addressing is implemented via a “scan listener” and the status can be checked with the standard lsnrctl command, passing the SCAN listener name as an argument:

oracle> lsnrctl service

oracle> lsnrctl stat myscan_listener

LSNRCTL for UNIX: Version 11.2.0.1.0  . .

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_MYSCAN1)))

STATUS of the LISTENER . . .


Server control commands for SCAN

According to Karen Reidford, there are several new server control (srvctl) commands for SCAN:

New SRVCTL Command

What it does

srvctl config scan

Shows the current SCAN configuration

srvctl config scan_listener

Shows the existence and port numbers for the SCAN listeners

srvctl add scan -n cluster01-scan

Adds new SCAN information for a cluster

srvctl remove scan -f

Removes SCAN information

srvctl add scan_listener

Adds a new SCAN listener for a cluster on the default port of 1521

srvctl add scan_listener -p 65001 ## non default port number ##

Adds a new SCAN listener on a different port

srvctl remove scan_listener

Removes the SCAN listener

srvctl modify scan -n cluster_scan

Modifies SCAN information (used when changing SCAN to DNS after initially using /etc/hosts)

srvctl modify scan_listener -u

Modifies the SCAN listener information to match the new SCAN VIP information from the modify scan command


 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright ? 1996 -  2014

All rights reserved by Burleson

Oracle ? is the registered trademark of Oracle Corporation.


 

��
 
 
 
 

 
 
 

 
Oracle performance tuning software 
 
oracle dba poster
Oracle Linux poster