Sqlnet Ezconnect Feature

Do you have been bothered by writing or copying entries of tnsnames.ora again and again?
EZCONNECT is the feature for you.

With this feature, we can access Oracle database without tnsname or directory, just with the following style:

Hostname/ORACLE_SID

i.e.

sqlplus system/1.0.861.291|drowssap#1.0.861.291|drowssap/orcl

To enable the feature, you just add EZCONNECT to sqlnet.ora like following:

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

Of course EZCONNCET feature has more complicated forms. For the detail, see the offical manual:


http://docs.oracle.com/cd/B19306_01/win.102/b14307/featConnecting.htm#sthref115

Using Easy Connect Naming Method
The easy connect naming method enables clients to connect to a database without any configuration.
Prior to using the easy connect naming method, make sure that EZCONNECT is specified by the > NAMES.DIRECTORY_PATH parameter in the sqlnet.ora file as follows:

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

With this enabled, ODP.NET allows applications to specify the "Data Source" attribute in the form of:

//host:[port]/[service_name]

Using the same example, some valid connection strings follow:

"user id=scott;password=tiger;data source=//sales-server:1521/sales.us.acme.com"
"user id=scott;password=tiger;data source=//sales-server/sales.us.acme.com" 
"user id=scott;password=tiger;data source=sales-server/sales.us.acme.com"

If the port number is not specified, 1521 is used by default.

See Also:
Oracle Net Services Administrator's Guide for details and requirements in the section Using Easy Connect Naming Method
----

Reference:

http://docs.oracle.com/cd/B19306_01/win.102/b14307/featConnecting.htm#sthref115

See Also:
Sqlnet Ezconnect Feature
Sqlnet Ezconnect Feature