apps-dba journal

A working journal for Oracle DBAs.

October 03, 2026

Oracle DBA Lesson 35A — Build and Verify an Easy Connect Login

Easy Connect places the host, port, and registered service directly in the connect identifier. Construct it from the supplied connection facts, then verify the container and connected service after login. Those checks establish where the session actually arrived.

Oracle DBA Lesson 35A — Build and Verify an Easy Connect Login

Connection facts and construction

Easy Connect places the endpoint, listening port, and registered service directly in the connect identifier. Use the supplied complete service, which may include a domain. For this authored example, the host is dbhost, the port is 1521, the service is labpdb.example.com, and the intended container is LABPDB.

sqlplus -L COURSE_READER@"//dbhost:1521/labpdb.example.com"

Run this in the Linux shell with the designated Oracle 19c OCI-based SQL*Plus client. SQL*Plus prompts for the password. The -L option suppresses further username and password prompts when the first login fails. A double slash precedes the host, a colon separates the port, and a slash introduces the service. The string can be used directly, without a tnsnames.ora alias. A client profile that restricts naming methods must permit EZCONNECT. Omitting the port uses the documented default 1521. Omitting the service can use a listener-configured default, or it can return an error. This exercise uses an explicit service. See Easy Connect naming and starting SQL*Plus.

Verify the session

After a successful login, run these in SQL*Plus:

SHOW CON_NAME
SELECT SYS_CONTEXT('USERENV','SERVICE_NAME') AS connected_service
FROM dual;

SHOW CON_NAME is a SQL*Plus command. The SELECT is database SQL. The expected authored values are container LABPDB and connected service labpdb.example.com. Compare both with the intended connection information. A service name may differ from its container name or from DB_NAME. If either value is unexpected, end this test and resolve the endpoint and service details before doing database work. A successful login alone does not establish the requested destination. The query reads current-session context and needs no privileged dictionary-view grant or management pack. Earlier Lesson 33 explains network error diagnosis and listener reachability. This part applies a verified login to a particular destination. See SHOW, SYS_CONTEXT, and the instance and SID.

Port-change decision

If the supplied endpoint changes to port 1522 while the host and registered service remain stable, substitute only the port:

//dbhost:1522/labpdb.example.com

This is a connection-string substitution after you receive updated endpoint facts. It does not reconfigure a listener. Reconnect and repeat both session checks. Easy Connect Plus, introduced in 19c, offers additional endpoint and parameter forms for supporting clients. Record the installed client's exact version and release update, and consult its documentation before using extensions. This basic TCP example uses none of the newer TLS options.

Practice and operating conditions

Use the instructor-designated disposable lab, with a reachable host and port, a registered service that maps to the open intended PDB, and a COURSE_READER account enabled with CREATE SESSION in that PDB. Verify the actual client and naming configuration. Replace every example name with the approved lab values. The supplied values are example expectations. Record the actual lab results when you perform the practice.

  1. Record the supplied host, port, complete registered service, and intended container separately.
  2. Construct the password-prompted login without a stored password, and log in to the designated lab.
  3. Capture sanitized actual SHOW CON_NAME and SERVICE_NAME results, and compare each with the intended value.
  4. Explain which field changes when the listener endpoint moves but the host and service remain stable. Construct that hypothetical string without initiating an unapproved connection or changing server configuration.
  5. End the read-only test with EXIT ROLLBACK. It logs out and abandons pending changes. Plain EXIT defaults to commit.

Success means identifying the three components, forming a valid explicit-service login, verifying both session values, and explaining a port-only update. Retain no password, private endpoint, or customer data in course artifacts. The exercise makes no DDL, DML, listener, account, or shared client-file changes.

Recap

Build the explicit host:port/service identifier, log in through the intended route, and verify the container and service independently. When the supplied endpoint port changes, substitute the port and recheck the session.

Quiz

1. Which three connection facts appear in the explicit Easy Connect example?

2. Does /LABPDB in an Easy Connect identifier mean ORACLE_SID must be LABPDB?

3. The host and service stay stable, but the supplied port changes to 1522. Which string follows?

4. Which results verify the intended connected destination?

5. A client profile restricts its naming methods. What must it permit for this direct connection?

Names, paths, marker values, and expected results are teaching examples. Perform the practice in the designated Oracle Database 19c lab, confirm the exact release update, and record actual observations against the stated success criteria.

No comments:

Post a Comment

Oracle DBA Lesson 37A — How a Directory Alias Finds the Database

Directory naming lets clients look up a connection name in a shared LDAP directory. The lookup supplies a connect descriptor : the list...