Oracle 11g Release 2 – SCAN explained
Starting with Oracle 11g Release 2 Oracle introduced a new cluster database connection concept: SCAN – “Single Client Access Name”.
SCAN on the server side
When installing a 11g Release 2 grid infrastructure you are asked for the cluster name which will be part of the SCAN. The notation for the SCAN is:
For instance if your cluster is named “rac” and the domain “regner.de” the SCAN name will be “rac-scan.regner.de”.
In order to successful install grid infrastructure you need to configure your DNS (hosts file entries will not work!) prior installing grid infrastructure to resolve the name accordingly. Oracle requires at least one, better three IPs configured for the scan name. Your DNS zone file might look like this:
In the example zone file above we configured three IPs for the scan: 172.23.15.3, 172.23.15.4 and 172.23.15.5.
After installation you will find three listener processes running (separated on all cluster nodes) as shown in the following figure:
Listener for SCAN2 and SCAN3 are running on node “rac1″ and listener for SCAN1 is running on node “rac2″. For each SCAN listener there will be a dedicated network interface running with the same IP as configured in DNS:
Connection to database “RAC11P” using SCAN would use this tnsnames entry:
RAC11P = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=rac-scan.regner.de)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=RAC11P)) )
The “old fashioned” way still works:
RAC11P_old = (DESCRIPTION= (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcp)(HOST=rac1-vip.regner.de)(PORT=1521)) (ADDRESS=(PROTOCOL=tcp)(HOST=rac2-vip.regner.de)(PORT=1521)) ) (CONNECT_DATA=(SERVICE_NAME=RAC11P)) )
Connecting to a named instance:
RAC11P = (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=rac-scan.regner.de)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=RAC11P) (INSTANCE_NAME=RAC11P1)) )