Dedicated Listener for PDBs plays a vital role in optimizing connection management within an Oracle Multitenant Database environment. By configuring a dedicated listener, each Pluggable Database (PDB) can handle its own incoming connections independently — improving isolation, scalability, and network control.
Unlike the default shared listener managed at the Container Database (CDB) level, a dedicated listener allows DBAs to assign unique ports and host parameters using the LOCAL_LISTENER parameter. This approach ensures fine-grained control over how clients connect to individual PDBs, making it easier to manage complex deployments, enhance security, and monitor performance for mission-critical databases.
What Is a Listener in Oracle?
An Oracle Listener is a network service that facilitates client connections to database instances. It listens for incoming connection requests and directs them to the right database service.
In a multitenant architecture, you may want to isolate PDB connections from the common listener to improve security, manageability, and performance visibility.
Step-by-Step Guide: Setting Up Listener for a PDB
Let’s go through each step in detail.
Step 1: Create and Start the Listener
First, create a dedicated listener configuration in the listener.ora file.
Below is an example configuration for a PDB named PDB1 hosted on test-host with port 1555.
LISTENER_NEW =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test-host)(PORT = 1555))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1573))
)
)
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_PDB_LISTENER=ON
VALID_NODE_CHECKING_REGISTRATION_PDB_LISTENER=SUBNET
The parameters above enable dynamic service registration and node-level security for listener registration.
Now start the listener:
lsnrctl start LISTENER_NEW
This command initializes the listener process on the specified port.
NETCA Configuration
oracle@test-host ~]$ netca
Oracle Net Services Configuration:
Configuring Listener:LISTENER_NEW
Listener configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/19.0.0/bin/lsnrctl start LISTENER_NEW
Listener Control complete.
Listener started successfully.
Oracle Net Services configuration successful. The exit code is 0
Step 2: Connect to the Desired PDB
Next, connect to the PDB you want to associate with this listener.
SQL> ALTER SESSION SET CONTAINER=PDB1;
Confirm your active container:
SQL> SHOW CON_NAME;
CON_NAME
---------
PDB1
This ensures that subsequent commands apply specifically to PDB1.
Step 3: Set the Listener Networks and Register the PDB
Once your listener is running, the next step is to associate it with your PDB.
This ensures that the PDB registers itself with the correct listener and communicates on the intended port.
Use the following SQL command to set the listener_networks parameter for your PDB.
This configuration links your PDB to the dedicated listener you created earlier (LISTENER_DBATEST):
SQL> ALTER SYSTEM SET listener_networks='((NAME=net1)(LOCAL_LISTENER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test-host)(PORT=1555)))))' SCOPE=BOTH;
Now, if you want the PDB to connect only through a specific new port, such as 1555, use the LOCAL_LISTENER parameter directly:
SQL> ALTER SYSTEM SET LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=test-host)(PORT=1555))' SCOPE=BOTH;
This command tells Oracle to register and accept database connections only on the specified host and port.
It’s especially useful when you want to isolate PDB connectivity for network segmentation, custom routing, or firewall configurations.
Finally, register the updated listener configuration:
SQL> ALTER SYSTEM REGISTER;
✅ Tip:ALTER SYSTEM REGISTER immediately updates listener registration without restarting the database.
Always use this after modifying listener parameters to ensure instant effect.
Step 4: Verify the Listener Status
Check if the listener is running and if it recognizes your PDB service:
lsnrctl status LISTENER_NEW
Sample output:
[oracle@test-host ~]$ lsnrctl status LISTENER2
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 14-OCT-2025 12:09:29
Copyright (c) 1991, 2025, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prod.mit.com)(PORT=1555)))
STATUS of the LISTENER
------------------------
Alias LISTENER_NEW
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 14-OCT-2025 11:59:31
Uptime 0 days 0 hr. 9 min. 58 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/19.0.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/prod/listener2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test-host)(PORT=1555)))
Services Summary...
Service "411964a38aab27c1e0636438a8c0662b.mit.com" has 1 instance(s).
Instance "cdb", status READY, has 2 handler(s) for this service...
Service "pdb1" has 1 instance(s).
Instance "cdb", status READY, has 2 handler(s) for this service...
The command completed successfully
✅ You should see your PDB (pdb1) listed under Services Summary, showing that the listener is correctly configured and registered.
Step 5: Check the Listener Services
Run the following command to list all the registered services and their handlers:
lsnrctl service LISTENER_NEW
Sample output:
lsnrctl service LISTENER_NEW
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 14-OCT-2025 14:36:37
Copyright (c) 1991, 2025, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test-host)(PORT=1555)))
Services Summary...
Service "411964a38aab27c1e0636438a8c0662b.mit.com" has 1 instance(s).
Instance "cdb", status READY, has 2 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: prod.mit.com, pid: 10143>
(ADDRESS=(PROTOCOL=tcp)(HOST=test-host(PORT=38075))
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
Service "pdb1" has 1 instance(s).
Instance "cdb", status READY, has 2 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: test-host, pid: 10143>
(ADDRESS=(PROTOCOL=tcp)(HOST=test-host)(PORT=38075))
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
The command completed successfully
This confirms that your listener is now actively managing dedicated connections for your PDB1 instance.
Step 6: Add a TNS Entry for the PDB
To make it easier for clients to connect, add a TNS entry for the PDB in your tnsnames.ora file:
PDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = test-host)(PORT = 1555))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
Step 7: Test the Connectivity
Now, test the connection using SQL*Plus:
sqlplus sys/oracle@PDB1 as sysdba
Expected Output:
[oracle@test_host admin]$ sqlplus sys/oracle@PDB1 as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Oct 14 12:10:24 2025
Version 19.28.0.0.0
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.28.0.0.0
SQL> show con_name
CON_NAME
------------------------------
PDB1
If you see a successful connection message, your listener setup for PDB1 is complete!
Key Takeaways
- You can configure separate listeners for each PDB in a multitenant database for better network isolation.
- Always verify listener registration with
lsnrctl status. - Ensure that your listener.ora and tnsnames.ora files are in sync.
- Use
ALTER SYSTEM REGISTERafter any configuration changes to avoid restarting the instance. - This approach enhances security, scalability, and performance monitoring in multi-PDB environments.
If you’re interested in optimizing database networking performance further, check out our related guide:
👉 Monitor Oracle Tablespace Usage




