Configure the client to connect with SCAN listener in Oracle RAC

Configure tnsnames. ora for the client side to connect with the SCAN listener

For configuration, we need to modify the tnsnames.ora file at client-server or application server. So that client or application uses the tns-entry to connect to the scan service which entry made in tnsnames.ora file

Suppose we have racdb service which uses all RAC instances then we will configure tnsnames.ora file on service name as follows:

RACDB =
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = xxxxx)(PORT = 1521))
  (CONNECT_DATA =
     (SERVER = DEDICATED)
     (SERVICE_NAME = racdb) 
  )
 )

Note: To check if the service is configured on the instance. Use lsnrctl command

lsnrctl services

Service "racdb" has 2 instance(s).
Instance "rac1", status READY, has 2 handler(s) for this service...
Instance "rac2", status READY, has 2 handler(s) for this service...

Advertisement

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 )

Facebook photo

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

Connecting to %s

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