In Oracle Database 19c a new feature is introduced called “Easy Connect Plus” that will enhance connection string syntax.
Easy Connect Plus will make it easier to use features such as TLS connections, wallets, load balancing, connection timeouts, and to tune network buffer sizes without external configuration.
The following is an example of the traditional easy connect syntax against a pluggable database:
SQL> connect firstname.lastname@example.org:1521/pdb1
Where port number is “optional” in the command syntax, in my example its 1521
The following is Easy Connect syntax structure that is available in Oracle Database drivers (JDBC,
ODP.Net, cx_Oracle, node-oracledb etc) that use Oracle Client 19c and connect to Oracle Database 11.2 or later.
Protocol: transport protocol to be used while connecting to the database
host. In 19c, the supported values of protocol are TCP and TCPS. The default is TCP.
Hosts: The host list is a comma-separated list of host names or IP addresses which are used to connect to a database.
Ports: Port numbers indicate the ports that the database services are listening on.
When using multiple hosts, if the same port is used on each host, then you can use:
host1,host2:port Otherwise you can indicate different ports should be used:
Service Name:The service name is the service the database is known by. It is a name comprised of the database name and domain name, entered during installation or database creation.Service names can be found by running “lsnrctl services” on the database host.Note that database “system identifiers“ (SIDs) cannot be used in Easy Connect or Easy Connect Plus syntax.
Server Type: The server type specifies what kind of server is used on the database host to handle the connection. It can be one of DEDICATED, SHARED, or POOLED.
Instance Name: to connect to a specific instance that the service represents, you can use an instance name.
Parameters: Parameters are name-value pairs that control the behavior of connections. The syntax uses ‘?’ to indicate start of parameters and a ‘&’ delimiter between each parameter. Leading and trailing white spaces are ignored within parameter values. If whitespace is required as part of the value, it should be placed within double quotes. Parameters are described in the next section.
Examples of 19c Easy Connect Plus Syntax: