About Remote Connections

Previous
Previous
Next
Next

Connecting remotely means running SQL Command Line (or any other Oracle command-line utility) on a computer other than the Oracle Database XE host computer, and then initiating a database connection from SQL Command Line (or other utility) over the network.

Oracle Client Software

The remote computer must have Oracle client software installed. It is through Oracle client software that Oracle command-line utilities (and your applications) connect to the database. Oracle Database XE accepts connections from all of the following types of Oracle client software:

http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html

All Oracle client software includes Oracle Net, which is the Oracle network software that enables client applications on one computer to connect to databases on another computer over a network.

Connect Strings

To connect remotely, you must supply not just a user name and password, but a complete Oracle Net connect string. In addition to the database user name and password, a connect string includes a host name or host IP address, an optional TCP port number, and an optional database service name. These additional parameters are required to help Oracle Net find the right host computer and connect to Oracle Database XE. An Oracle Net connect string has the following format:

CONNECT username/password@[//]host[:port][/service_name]

where:


Note:

Only Oracle Database XE Client supports the notion of a default database service. If you connect remotely from any Oracle client software other than Oracle Database XE Client, you must include the XE service name.

For example, Figure: Remote Connection shows a user connecting remotely with SQL Command Line and entering a connect command that includes a connect string that supplies: the user name hr, the password hr, and the host name dbhost.xyz.com. This connect string connects to the default database service (XE) on the default port (1521).

Remote Connection

Description of this figure follows
Description of "Remote Connection"

Remote Connection Examples

In the following examples of SQL Command Line connect commands, Oracle Database XE is running on the host computer mydbserver.mydomain.com.

Example 1 This example initiates a remote connection from Oracle Database XE Client, using the default port number.

CONNECT system/mypassword@mydbserver.mydomain.com

Example 2 This example initiates a remote connection from Oracle Database XE Client, using a nondefault port number (1522):

CONNECT system/mypassword@mydbserver.mydomain.com:1522

Example 3 This example initiates a remote connection using the default port number, and includes the optional service name.

CONNECT system/mypassword@mydbserver.mydomain.com/XE

Environment Variables

Before making a remote connection from Linux, you must set environment variables. See "Setting Environment Variables" for more information.