Modification of SCAN Configuration in Oracle 19c RAC | How To Modify Scan Name In Oracle RAC

This article will discuss how to modify the SCAN name in Oracle RAC. There are situations when changing the SCAN name is necessary due to application requirements or migration/upgradation. Recently we came across such a situation where it’s necessary to change the SCAN name and below are the steps followed for modification of SCAN configuration.

Brief History of Single Client Access Name (SCAN)

Single Client Access Name (SCAN) is a feature used in Oracle Real Application Clusters environments that provides a single name for clients to access any Oracle Database running in a cluster. You can think of SCAN as a cluster alias for databases in the cluster. The benefit is that the client’s connect information does not need to change if you add or remove nodes or databases in the cluster. 

SCAN was first introduced with Oracle Real Application Clusters (RAC) 11g Release 2 and provides additional functionality in Oracle RAC 12c. Having a single name to access the cluster to connect to a database in this cluster 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.

Steps for Modification of SCAN Configuration in Oracle 19c RAC

Present/ Existing Name -> LNDBSMT-SCAN
New / Future Name      -> RPPROD-SCAN 

Step 1 : Display the current configuration using below command as the oracle/grid user

$ export GRID_HOME=/d01/app/19c/grid
$ $GRID_HOME/bin/srvctl config scan
SCAN name: lndbsmt-scan, Network: 1
Subnet Ipv4 : 172.168.0.0/255.255.0.0/enp0s3, static
Subnet Ipv6 :
SCAN 1 Ipv4 VIP : 172.168.180.10
SCAN VIP is enabled
SCAN 2 Ipv4 VIP : 172.168.180.20
SCAN VIP is enabled
SCAN 3 Ipv4 VIP : 172.168.180.30
SCAN VIP is enabled

Step 2 : Turn off the SCAN and SCAN listeners as GRID USER

$ export GRID_HOME=/d01/app/19c/grid
$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl stop scan

Step 3 : Check if the new name is configured in the DNS. You need to reach out to your DNS Team to change the DNS entries and repoint the IPs of LNDBSMT-SCAN to RPPROD-SCAN.

$ nslookup rpprod-scan
Server:   172.168.180.1
Address:  172.168.180.1#53
Name:     rpprod-scan.dba.com
Address: 172.168.180.10
Name:     rpprod-scan.dba.com
Address: 172.168.180.20 Name:     rpprod-scan.dba.com
Address: 172.168.180.30

Step 4 : Modify the scan-name using below command as root user

$ export GRID_HOME=/d01/app/19c/grid
$ $GRID_HOME/bin/srvctl modify scan -n rpprod-scan  

Step 5 : Turn on the SCAN and SCAN listeners again using the following commands as the oracle/grid user.

$ $GRID_HOME/bin/srvctl modify scan_listener -u
$ $GRID_HOME/bin/srvctl start scan_listener

Step 6 : Check whether the new scan name is getting reflected or not as GRID / Oracle User

$ export GRID_HOME=/d01/app/19c/grid
$ $GRID_HOME/bin/srvctl config scan
SCAN name: rpprod-scan, Network: 1
Subnet Ipv4 : 172.168.0.0/255.255.0.0/enp0s3, static
Subnet Ipv6 :
SCAN 1 Ipv4 VIP : 172.168.180.10

SCAN VIP is enabled

SCAN 2 Ipv4 VIP : 172.168.180.20

SCAN VIP is enabled

SCAN 3 Ipv4 VIP : 172.168.180.30

SCAN VIP is enabled

Hope this article will help you to overcome such a situation whenever it arises.

Leave a Comment

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