Find Database SERVICE_NAME and INSTANCE_NAME
* SERVICE_NAME
SQL> SHOW parameter service_names
* INSTANCE_NAME
SQL> SELECT instance_name FROM v$instance;
Connect with SQL*Plus
* Use service_name
CONNECT username/password@[//]host[:port][/service_name]
* Use instance_name
CONNECT username/password@[//]host[:port][:instance_name] -- Same as CONNECT username/password@[//]host[:port][:sid]
Connect with JDBC Thin Driver
* Use service_name
jdbc:oracle:thin:@[//]host[:port][/service_name]
* Use instance_name
jdbc:oracle:thin:@[//]host[:port][:instance_name] -- Same as jdbc:oracle:thin:@[//]host[:port][:sid]