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...

This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply