What is SCAN in Oracle RAC?

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

And we can say that SCAN is a cluster alias for database.

The benefit is that SCAN-NAME you provide for client connection is enough to connect to your database in RAC cluster. You don’t need to worry even if nodes or databases are added or removed from cluster.

Having a single name to access the cluster to connect to a database allows clients to use EZConnect and the simple JDBC thin URL to access any database running in the cluster, independently of the number of databases or servers running in the cluster and regardless on which server(s) in the cluster the requested database is actually active.

Example :

Ezconnect : sqlplus system/manager@rac-scan:1521/orcl1

JDBC connect jdbc:oracle:thin:@rac-scan:1521/orcl1

Now , RAC components that comes into picture when you talk about SCAN Listeners are


1.SCAN VIP : SCAN VIPs are physical IP addresses that you allocate to SCAN listener. When you check clusterware resource with Number of SCAN VIP’s you notice it will be same as the Number of SCAN LISTENERS in the setup.

SCAN VIP is one of the resources you find in the output of crsctl status resource –t command.

We can see above output scan1 , scan2 and scan3 VIPs are in online state.It means  IP addresses are online on the physical network ports. Only when SCAN VIPs are online we can start the SCAN listeners.

Now let us understand SCAN-listener.

2.SCAN-LISTENER : Scan Listener is oracle rac’s component which starts running a service on the  port [default 1521] using IP address assigned to SCAN VIPs. Yes, so I am repeating , SCAN listener wont be able to start unless SCAN VIP is online.

Name that is given to SCAN LISTENER is referred as SCAN NAME and it should be registered in DNS server.

3.Node VIP: Each node in the RAC cluster has its own node VIP. It is high availability resource of RAC that can able to initially connect to database service on its node or to fail over to another cluster node and advise that its node is down. When database application wants to connect to a database services , it specifies list of node VIPs so that one is fail another can be tried.

It has capability of relocating to local listener of other node when the current node goes down.

Image Source : OrSkl Scan Post

Let us understand the diagram in depth.

scan-listener is registered with remote_listener  parameter of all instance .

  1. As shown here first request is generated , at zero second. User 1 has made request for connection to orcl database in cluster with following tnsnames.ora entry.

2. Once user has made request , a request will go to DNS server to resolve host name defined in tns entry. DNS server will use Round_Robin method and resolves IP address.

3. As per example we have 3 IPs assigned for SCAN-name :


4. Then C1 request reaches the first scan listener , mostly the default name will be LISTENER_SCAN1 which is running on SCAN VIP . SCAN1 will use Load balancing adviser , and identifies load in each node in the cluster and routes the C1 request to least loaded node. In our case request sent to node 2 which has no load for now.

Then C1 request will be addressed by local listener on this node which helps C1 to establish a session on node 2 instance.

Stay tuned for More articles on Oracle RAC

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.