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