How to use Easy Connect for connection in Oracle Database
You can connect to the Oracle database by entering all details in the connection string, such as the hostname, port, and service or instance name. This method allows direct connection without using a tnsnames.ora entry, where we usually 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 the EASY CONNECT method with SQLPLUS utility:
sqlplus /nolog
SQL>CONNECT username@"hostname:1521/ORCL"
SQL> Enter password: password
OR
SQLPLUS username/password@”hostname:portname/instancename”
HOST: Hostname of the server
1521: This Means the 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.