Oracle Connection Strings

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]
This entry was posted in net8. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.