Tuesday, September 1, 2015

Connecting to an Oracle Database from a Client Computer

Syntax:
"host[:port][/service_name][:server][/instance_name]"

• 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:
I connect Database Server 192.168.2.133 from client machine linux 192.168.2.142 with thonh15 user, password thonh15.
[oracle@PTUD ~]$ sqlplus thonh15/thonh15@"192.168.2.133/orcl"

SQL*Plus: Release 12.1.0.1.0 Production on Tue Sep 1 11:46:50 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Last Successful login time: Wed Aug 26 2015 11:16:58 +07:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL>

Share this

0 Comment to "Connecting to an Oracle Database from a Client Computer"

Post a Comment