Friday, September 17, 2010

SCAN Listener


SCAN Listener

New Feature in Oracle 11g

Single Client Access Name (SCAN) allows clients to use one name in connection string to connect to the cluster as a whole.  


Why SCAN listener?

1. Removes the requirements to change the client connect if cluster changes were made
2. Load Balance across the instance providing a service
3. Failover between moved instance


Note: REMOTE_LISTERNER register the instance with all SCAN listeners.
 

How to Configure SCAN listener in RAC?
# Prerequite
the SCAN name with three ip addresses assigned via DNS in round robin fashion

# Configure
In the step 4 of 16 of Oracle Grid Instrastructure/Install and Configure Grid Infrastructure of a grid

# listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))
   
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) 
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) 
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) 

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON      
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON      
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON          

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON                     

# endpoints_listener.ora
   LISTENER_LNX200=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=lnx200-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.10.10)(PORT=1521)(IP=FIRST))))           # line added by Agent

# tnsnames.ora
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ORACL01.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )
# start/stop sequence
srvctl start listener
srvctl start scan
srvctl start scan_listener

stop in the same order as above

# How to check config
srvctl config  listener
srvctl config  scan
srvctl config  scan_listener

# How to check status
srvctl status listener
srvctl status scan
srvctl status scan_listener