Oftentimes I use the Easy Connect (EZCONNECT) to connect to a new database just to quickly verify database connectivity. The syntax I usually use is as follows:
In RAC, this will connect to whatever instance based on the service’s load balancing goal.
I just learned that with the 11g net services client software, you can also specify the instance name to connect to. This may be useful especially for RAC setup if you have the need to connect to a specific instance.
CONNECT username@[//]host[:port][/[service_name][:server]][/instance_name]] -- Connect to the instance name RACDB1 CONNECT scott/tiger@host1-vip:1522/RACDB/RACDB1 -- Connect to the instance name RACDB2 CONNECT scott/tiger@host1-vip:1522/RACDB/RACDB2
Also, the optional [:server] is either dedicated or shared.