The following configuration is needed to make SCAN connect work.
-
Create the service as a Oracle user. In the example it is "magic".
$ srvctl add service -d magic -s mymagic -r magic1
-
Start the service.
$ srvctl start service -d magic -s mymagic
-
Check to see if the service is registered with the listener.
$lsnrctl status LISTENER_SCAN1 $lsnrctl status LISTENER
-
Add the entry in the tnsnames.ora file on the server and client sides.
mymagic = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserverac)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mymagic) ) )
-
Make a connection.
sqlplus scott/tiger@mymagic