Lesson 7 | Configuring Network Naming in Oracle 23ai |
Objective | Understand and configure service name resolution methods using Oracle 23ai and Oracle Cloud Infrastructure. |
tnsnames.ora
and sqlnet.ora
files provided in the Wallet ZIP download. OCI automates most network naming and encryption settings.Oracle 23ai emphasizes zero-touch configuration, security by default, and cloud-native best practices. While legacy methods like `TNSNAMES.ORA` are still supported for backward compatibility, cloud-based solutions are preferred for scalability and automation.
Now that you understand the modern service name resolution methods in Oracle 23ai, it's time to take a deeper look at Easy Connect Plus — the preferred method for secure, simplified, and scalable connectivity in both on-prem and cloud-native Oracle environments.
Easy Connect Plus supports a rich set of parameters beyond the basic `host:port/service_name` format. You can specify connection timeout, failover options, SSL settings, and service-level directives. Here are some common patterns:
// Basic
dbhost.example.com:1521/orclpdb1
// With service name and parameters
dbhost.example.com:1521/orclpdb1?connect_timeout=5&retry_count=3
// With full descriptor-style DN
dbhost.example.com:1521/?service_name=orclpdb1
Use Easy Connect Plus when you want to bypass traditional Oracle Net configuration files and connect using command-line tools, JDBC apps, or cloud automation scripts.
Oracle 23ai supports encrypted database communication out of the box using Native Network Encryption or SSL/TLS with wallets. Easy Connect Plus can reference wallets directly using parameters:
dbhost.example.com:1522/orclpdb1?wallet_location=/etc/wallet&ssl_server_cert_dn="CN=dbhost.example.com"
This ensures end-to-end encrypted communication without requiring sqlnet.ora
or tnsnames.ora
setup. It’s ideal for securing traffic in hybrid or multi-tenant cloud environments.
Easy Connect Plus supports high availability through multi-host syntax. You can define alternate nodes to connect to automatically if the primary fails:
(dbhost1.example.com:1521,dbhost2.example.com:1521)/orclpdb1
Use this syntax with Data Guard, RAC, or multi-node OCI databases. Failover occurs transparently to the client, improving resilience without relying on Oracle Clusterware client-side tools.
To distribute connections evenly across multiple database listeners, Easy Connect Plus provides built-in load balancing:
(dbhost1.example.com:1521,dbhost2.example.com:1521)/orclpdb1?load_balancing=on
This is useful in OCI multi-AD regions and across replicated databases where read-only or read-mostly workloads can benefit from connection spreading.
tnsnames.ora
While Easy Connect Plus is powerful and flexible, it’s not a silver bullet. Some limitations include:
tnsnames.ora
However, for DevOps pipelines, containerized environments, and cloud-native apps, Easy Connect Plus is the preferred approach — particularly in Oracle 23ai deployments.
In the next lesson, you will configure diagnostic parameters such as trace levels and logging within an OCI environment using `sqlnet.ora` and dynamic views in Oracle 23ai.