Connect to a Database by Using SQLNet

This article describes how to connect to a database service from a computer that has a SQLNet client installed. Port 1521 must be open to support the SQLNet protocol.

Connect From Within the VCN

For security reasons, Oracle recommends that you connect to your database services from within the VCN. You can use this method whether you are connecting to an administration service or to an application service.

To connect using SQL*Plus, you run the following command using the applicable connection string:

sqlplus system/<password>@<connection_string>

Consider the following:

Connect From the Internet

Although Oracle does not recommend connecting to your database from the Internet, you can connect to a database service by using a public IP address if port 1521 is open to the public for ingress.

To use this method, you run the following command using the public IP address instead of the hostname or SCAN in the connection string:

sqlplus system/<password>@<public_IP>:1521/<service_name>.<DB_domain>

Consider the following:

Note: Do not use this method to connect to the database from within the VCN. Doing so negatively impacts performance because traffic to the database is routed out of the VCN and back in through the public IP address.

Example: Connecting in SQL Developer Using SQL*Net

Prerequisites:

Connect From Within the VCN Using a Private IP Address

After the prerequisites are met, start SQL Developer and create a connection by supplying the following connection details: