SCAN Listener in Oracle RAC

I will explain SCAN Listener in Oracle RAC in this post.

 

 

SCAN Listener in Oracle RAC

SCAN (Single Client Access Name ) is very critical feature ( High Availability ) in Oracle Real Application Clusters (Oracle RAC) architecture that provides a single name for clients to access Oracle Databases running in a cluster.

 

 

 

 

 

 

 

 

 

The SCAN name is a domain name registered to at least one and up to three IP addresses, either in Domain Naming Service (DNS) or Grid Naming Service (GNS).

 

If you used the SCAN Listener, Clients don’t need to change any TNS configuration after any nodes are down or adding,removing new nodes in the Cluster. This provides a High Availability for applications.

 

tnsnames.ora file for 3 nodes RAC is as follows prior to Oracle 11.2 version. You should add all nodes vip adress to TNS as follows.

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(LOAD_BALANCE = ON)
(FAILOVER = ON)
(ADDRESS = (PROTOCOL = tcp)(HOST = rac-node-01-vip.localdomain)(PORT =1521))
(ADDRESS = (PROTOCOL = tcp)(HOST = rac-node-02-vip.localdomain)(PORT =1521))
(ADDRESS = (PROTOCOL = tcp)(HOST = rac-node-03-vip.localdomain)(PORT =1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCLDB)
)
)
When you used the SCAN Adress, you will be solved this problem. You can just use only SCAN name instead of every single node. Because Scan name is already resolved the virtual IP adresses refer to the cluster.
The new TNS adress will be as follows.
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(HOST = rac-cluster-scan.localdomain)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCLDB)
)
)
You can get configuration and status of SCAN adress and listeners as follows.
[oracle@rac-node01 ~]$ srvctl config scan
SCAN name: rac-scan, Network: 1
Subnet IPv4: 192.168.63.0/255.255.255.0/bondeth0, static
Subnet IPv6: 
SCAN 0 IPv4 VIP: 192.168.63.12
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 1 IPv4 VIP: 192.168.63.13
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 2 IPv4 VIP: 192.168.63.14
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
[oracle@rac-node01 ~]$ 
[oracle@rac-node01 ~]$ 


[oracle@rac-node01 ~]$ srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
Registration invited nodes: 
Registration invited subnets: 
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes: 
SCAN Listener is individually disabled on nodes: 
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
Registration invited nodes: 
Registration invited subnets: 
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes: 
SCAN Listener is individually disabled on nodes: 
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
Registration invited nodes: 
Registration invited subnets: 
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes: 
SCAN Listener is individually disabled on nodes: 
[oracle@rac-node01 ~]$ 
[oracle@rac-node01 ~]$ 


[oracle@rac-node01 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is running on node rac-node01
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is running on node rac-node02
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is running on node rac-node02
[oracle@rac-node01 ~]$ 
[oracle@rac-node01 ~]$ 


[oracle@rac-node01 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node rac-node01
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node rac-node02
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node rac-node02
[oracle@rac-node01 ~]$
If you want to learn more details about Oracle RAC, read the following post.

What is the Oracle RAC and Architecture of Real Application Cluster

 

Oracle RAC Step by Step Installation on Linux -1

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

About Mehmet Salih Deveci

I am Founder of SysDBASoft IT and IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience.I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource.I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks.I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients.If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress [email protected].-                                                                                                                                                                                                                                                 -Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  [email protected] a mail atabilirsiniz.

Leave a Reply

Your email address will not be published. Required fields are marked *