Understanding how to configure the Oracle database listener is crucial for effective database management. Dynamic listener configuration, in particular, is frequently utilized in daily operations. This article thoroughly explains the mechanisms, setup steps, and verification methods for dynamic listener configuration.
For more information about Oracle Net, click here.
What is Dynamic Listener Configuration?
Dynamic listener configuration is a feature whereby Oracle databases automatically register their service information with the listener upon startup. This eliminates the need for administrators to manually edit the listener.ora file.
Text Diagram:
Oracle Database Startup
│
│ Automatically registers service information
▼
Listener
│
▼
Client
Benefits of Dynamic Configuration
- No manual editing of listener.ora required
- Easy addition or modification of services
- Streamlined daily operational management
How Dynamic Configuration Works
By default, the listener waits on TCP port 1521. When an Oracle instance starts, it automatically connects to the listener and registers service and instance information.
Default Listener Dynamic Configuration
When using the default listener (port 1521), you do not need to create the listener.ora file. The Oracle database automatically registers itself with the listener without additional configuration.
If you choose to use listener.ora, the minimal configuration example is as follows:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
Steps for Dynamic Configuration
① Create or edit listener.ora (optional).
$ vi $ORACLE_HOME/network/admin/listener.ora
② Start or restart the listener.
$ lsnrctl stop
$ lsnrctl start
Alternatively, reload to apply changes:
$ lsnrctl reload
③ Start the database.
SQL> startup
Verifying Dynamic Configuration
Use the following command to check services registered with the listener:
$ lsnrctl status
Successful dynamic registration will display the following:
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
The READY status indicates that the dynamically registered instance is operational.
Command execution example
[oracle@orcl19c ~]$ lsnrctl start
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 05-AUG-2025 00:00:00
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Starting /u01/app/oracle/product/19.0.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Log messages written to /u01/app/oracle/diag/tnslsnr/orcl19c/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl19c)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 05-AUG-2025 00:00:00
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/orcl19c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl19c)(PORT=1521)))
The listener supports no services ★Service not registered
The command completed successfully
[oracle@orcl19c ~]$ sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Aug 5 00:05:02 2025
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup ★Launch a DB instance
ORACLE instance started.
Total System Global Area 1543500144 bytes
Fixed Size 8896880 bytes
Variable Size 889192448 bytes
Database Buffers 637534208 bytes
Redo Buffers 7876608 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
[oracle@orcl19c ~]$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 05-AUG-2025 00:12:38
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 19.0.0.0.0 - Production
Start Date 05-AUG-2025 00:00:00
Uptime 0 days 0 hr. 12 min. 38 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/orcl19c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl19c)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service... ★registered
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@orcl19c ~]$
Points to Note for Dynamic Configuration
- Ensure the listener is started before the Oracle instance.
- If dynamic registration does not work, recheck the instance configuration.
Causes and Solutions for Dynamic Registration Failure
- Oracle instance is not running.
- Solution: Verify that the instance is running (e.g., using
ps -ef | grep pmon).
- Solution: Verify that the instance is running (e.g., using
- Initialization parameter
LOCAL_LISTENERis incorrectly set.- Solution: Check and correct the
LOCAL_LISTENERparameter to point to the correct listener information.
- Solution: Check and correct the
- Listener is not properly running.
- Solution: Check the listener’s status with
lsnrctl statusand restart if stopped.
- Solution: Check the listener’s status with
- Network issues preventing Oracle instance from connecting to the listener.
- Solution: Check firewall and network configurations to ensure connectivity.
Differences Between Static and Dynamic Configuration
| Configuration | Accept Connections When Database is Stopped | Service Registration Method | Use Case |
|---|---|---|---|
| Static | Yes | Manually edit listener.ora | Remote startup, etc. |
| Dynamic | No | Automatic at database startup | Regular operations |
Summary
Utilizing dynamic listener configuration simplifies daily operations and allows for efficient management of service additions or changes. Understanding the features of dynamic configuration will greatly assist in routine database management.
[reference]
4.1.1 Oracle Net Listener Configuration


コメント