8.4.3 Examples of Easy Connect Naming Method

Review some example Easy Connect strings and how each string converts into a connect descriptor.

Naming Option Connect String Connect Descriptor

With host.

The host name is sales-server.

sales-server
(DESCRIPTION=
   (CONNECT_DATA=
       (SERVICE_NAME=))
   (ADDRESS=
       (PROTOCOL=TCP)
       (HOST=sales-server)
       (PORT=1521)))

With host and port.

The host name is sales-server, and the port is 3456.

sales-server:3456
(DESCRIPTION=
   (CONNECT_DATA=
       (SERVICE_NAME=))
   (ADDRESS=
       (PROTOCOL=TCP)
       (HOST=sales-server)
       (PORT=3456)))

With host and service name.

The host name is sales-server and the service name is sales.

sales-server/sales
(DESCRIPTION=
  (CONNECT_DATA=
     (SERVICE_NAME=sales))
  (ADDRESS=
     (PROTOCOL=TCP)
     (HOST=sales-server)
     (PORT=1521)))

With IPv6 address.

The IPv6 address of the host is 2001:0db8:0:0::200C:417A, the port is 80, and the service name is sales.

[2001:0db8:0:0::200C:417A]:80/sales

Square brackets are required around IPv6 host names.

(DESCRIPTION=
  (CONNECT_DATA=
      (SERVICE_NAME=sales)
  (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=2001:0db8:0:0::200C:417A)
      (PORT=80)))

With IPv6 host address.

The host is sales-server, the port is 80, and the service name is sales.

sales-server:80/sales
(DESCRIPTION=
  (CONNECT_DATA=
      (SERVICE_NAME=sales)
  (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=sales-server)
      (PORT=80)))

With host, service name, and server.

The host name is sales-server, the service name is sales, the server is dedicated, and the instance name is inst1

sales-server/sales:dedicated/inst1
(DESCRIPTION=
  (CONNECT_DATA=
      (SERVICE_NAME=sales)
      (INSTANCE_NAME=inst1)
      (SERVER=dedicated))
  (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=sales-server)
      (PORT=1521)))

With host and instance name.

The host name is sales-server and the instance name is inst1.

sales-server//inst1
(DESCRIPTION=
   (CONNECT_DATA=
      (SERVICE_NAME=)
      (INSTANCE_NAME=inst1))
   (ADDRESS=
      (PROTOCOL=TCP)
      (HOST=sales-server)
      (PORT=1521)))

Here are some sample Easy Connect strings using the Easy Connect Plus feature:

Naming Option Connect String Connect Descriptor

With a list of name value pairs (SDU, RETRY_COUNT, and CONNECT_TIMEOUT).

The host is salesserver, the port is 1521, and the service name is sales.

salesserver1:1521/sales?SDU=8128&retry_count=3&connect_timeout=10
(DESCRIPTION=
  (SDU=8128)(retry_count=3)(connect_timeout=10)
  (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=saleserver1)(PORT=1521)) 
    (CONNECT_DATA=(SERVICE_NAME=sales)))

With multiple hosts or ports.

The host is salesserver, the port is 1521, and the service name is sales.

salesserver1:1521,salesserver2,salesserver3:1522/sales
((DESCRIPTION=
  (LOAD_BALANCE=ON) 
  (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=sales-server1)
    (PORT=1521))
  (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=sales-server2)
    (PORT=1522))
  (ADDRESS=
    (PROTOCOL=tcp)
    (HOST=sales-server3)
    (PORT=1522)))
  (CONNECT_DATA=(SERVICE_NAME=sales)))

With specification of protocol.

The host is salesserver, the port is 1521, and the service name is sales.

tcps://salesserver1:1521/sales
(DESCRIPTION=
  (ADDRESS=
    (PROTOCOL=tcps)
    (HOST=salesserver1)
    (PORT=1521))
  (SECURITY=(SSL_SERVER_DN_MATCH=TRUE))
  (CONNECT_DATA=(SERVICE_NAME=sales)))

With SECURITY attributes supported for TLS.

The host is sales-server, the port is 1521, and the service name is sales.

tcps://sales-server:1521/sales?ssl_server_cert_dn="cn=sales,cn=OracleContext,dc=us,dc=example,dc=com"&wallet_location="/tmp/oracle"

Note: The parameter WALLET_LOCATION is deprecated for use with Oracle AI Database 26ai for the Oracle Database server. It is not deprecated for use with the Oracle Database client or listener.

For Oracle Database server, Oracle recommends that you use the WALLET_ROOT system parameter instead of using WALLET_LOCATION.

(DESCRIPTION= 
  (ADDRESS=
    (PROTOCOL=tcps)
    (HOST=salesserver)
    (PORT=1521)) 
  (CONNECT_DATA=(SERVICE_NAME=sales))
  (SECURITY=
    (SSL_SERVER_DN_MATCH=TRUE)
    (SSL_SERVER_CERT_DN=cn=sales,cn=OracleContext,dc=us,dc=example,dc=com)
    (WALLET_LOCATION=/tmp/oracle)))

With ADDRESS_LIST to specify multiple protocol addresses.

salesserver1:1521;saleserver2:1522/sales.us.example.com?sdu=16384

(DESCRIPTION=
  (SDU=16384) 
  (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=saleserver1)(PORT=1521)))
  (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=tcp)(HOST=saleserver2)(PORT=1522)))
  (CONNECT_DATA=(SERVICE_NAME=sales.us.example.com)))