SCAN in 11gR2 Grid InfraStructure

11gR2 grid infrastructure uses SCAN, which is a new concept we use for all client connections. SCAN is single client access name and it is a new feature in 11g Release 2 that provides a single name for clients to access an Oracle Database running in a cluster. The benefit is clients using SCAN do not need to change if you add or remove nodes in the cluster.
Prior to 11gR2 , the tnsnames.ora entries are
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac01-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac02-vip)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb.example.com)
)
)
In 11gR2 , the tnsnames.ora entries look like ….
TESTDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac-scan.example.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = testdb.example.com)
)
)
The only difference is that , we specify the scan name instead of all VIPs in the tnsnames.ora file.
So what is the benifit with it?

The DNS/Bind configuration will look like below :
Create/edit the file associated with your zone (“/var/named/localdomain.zone”) to look like the one below.

$TTL    86400
@ IN SOA localhost root.localhost (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
rac1 IN A 192.168.0.101
rac2 IN A 192.168.0.102
rac1-priv IN A 192.168.1.101
rac2-priv IN A 192.168.1.102
rac1-vip IN A 192.168.0.111
rac2-vip IN A 192.168.0.112
rac-scan IN A 192.168.0.125
rac-scan IN A 192.168.0.126
rac-scan IN A 192.168.0.127

Suppose if you are adding any node to the cluster, you need to specify corresponding VIP entry for that node in the tnsnames.ora prior to 11gR2. But with SCAN name, we dont need to do any modifications to the tnsnames.ora file. SCAN name will resolve and load balance the client connections to all the nodes in the RAC.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s