Using the Easy Connect Naming Method (aka EZ Connect) using Oracles OracleConnection

Connection string

This Oracle Data Provider for .NET / ODP.NET connection string can be used for connections to Oracle.

The easy connect naming method enables clients to connect to a database without any configuration.

Data Source=username/password@//myserver:1521/my.service.com;

Port 1521 is used if no port number is specified in the connection string.

Make sure that EZCONNECT is enabled in the sqlnet.ora file. NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

'//' in data source is optional and is there to enable URL style hostname values