Easy Connect to Connect to a Database

Use of Easy Connect to Connect to a Oracle Database

You can directly connect to the Oracle database by providing complete information in the connection string including host name, Port , service or instance name of Oracle database server. In this we directly connect without using tnsnames.ora entry. In tnsnames.ora file we define the alias for connectivity.

Following is the syntax of Easy Connect.

Syntax:

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

Example of using EASY CONNECT method with SQLPLUS utility:

sqlplus /nolog
SQL>CONNECT username@"host:1521/ORCL"
SQL> Enter password: password

HOST: Hostname of the server
1521: Means port number on which Oracle Server is listening.
ORCL: Instance name or service name used for listener connectivity
USERNAME: Provide username and password for the Oracle user.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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