"host[:port][/service_name][:server][/instance_name]"
The place holders used in the connect identifier format represent:
-
host
— the name or IP address of the Oracle database host computer.
Both IPv4 and IPv6 addresses are supported. IPv6 addresses must be enclosed in square brackets. See Oracle Database Net Services Administrator's Guide for information about IPv6 addressing.
-
port
(optional) — the TCP port number on which the Oracle Net listener listens for connections.
If port
is excluded, then the standard port number 1521 is assumed.
-
service_name
— a database service name.
If no database service names are defined, then you can use the name of the default service that is created for the database. This service name consists of the global database name, which is made up of the DB_NAME
and DB_DOMAIN
initialization parameters as follows:
DB_NAME.DB_DOMAIN
If DB_DOMAIN
is null, then the standard service name is just DB_NAME
.
-
server
— the type of service handler. Acceptable values are dedicated
, shared
, and pooled
. If omitted, then the default type of server is chosen by the listener: shared server if configured, otherwise dedicated server.
-
instance_name
— the instance to which to connect. When you specify only instance name, you connect to the default database service. If there is no default service configured in the listener.ora
file, then an error is generated.You can obtain the instance name from the INSTANCE_NAME
initialization parameter.
For example, to connect as user NICK
to the database service orcl.example.com
on the host dbhost.example.com
, enter the following at the user name prompt:
nick@"dbhost.example.com/orcl.example.com"
The following examples substitute IPv4 and IPv6 addresses for the host name:
nick@"192.0.2.1/orcl.example.com"
nick@"[2001:0DB8:0:0::200C:417A]/orcl.example.com"