Oracle Database - Easy Connect Method with host, port and service name (EZCONNECT)


The easy connect method is one of the naming method to get all the data needed to identified the location of the database.

The easy connect naming method eliminates the need for service name lookup in the tnsnames.ora files for TCP/IP environments; in fact, no naming or directory system is required if you use this method.

This naming method provides out-of-the-box TCP/IP connectivity to databases.

This method allow you to give :

  • the host name
  • the port (optional default 1521)

instead of the net service name to be able to connect to a database.


Check your parameters : Oracle Database - How to retrieve the connect descriptor parameters? (host, port, service name and SID)

CONNECT username/[email protected][//]host[:port][/service_name]

where :

  • is optional. Specify for a URL.
  • host is required. Specify the host name or IP address of the database server computer.
  • port is optional. Specify the listening port. The default is 1521.
  • service name is optional. Specify the service name of the database. The default is the host of the database server computer. Note that this might not be the same value that you entered in the connect string for the host. For example, for the host emp, the service name might be If the host does not match the database service name, then enter a valid service name value rather than accepting the default.


Then you can perform a easy connection with sqlplus or with the connect command.

C:\Documents and Settings\Nicolas>sqlplus gerardnico/[email protected]:1521/orcl

SQL*Plus: Release - Production on Wed Jun 10 14:16:13 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[email protected]:1521/orcl>connect gerardnico/[email protected]:1521/orcl


Powered by ComboStrap