Serverside Configuration   «Prev  Next»

Lesson 15 Starting the Listener on Modern Linux in Oracle 23ai
Objective Start and verify the Oracle Net listener using the Listener Control utility (lsnrctl) and automate startup on modern Linux.

Starting the Oracle Net Listener in Oracle 23ai

The Oracle Net listener is the network service that accepts inbound client requests and hands them to the correct Oracle database service. In Oracle 23ai, the listener is still started and verified with the Listener Control utility, lsnrctl. That part of Oracle administration has not disappeared. What has changed is the surrounding Linux environment. On modern Linux systems, especially Oracle Database 23ai Free and other service-managed installations, startup automation is often handled through systemd rather than by treating the listener as a completely separate boot-time task.

This lesson therefore has two goals. First, you need to know how to start and verify the listener manually with lsnrctl. Second, you need to understand how startup is automated on modern Linux so that the listener comes online reliably after a reboot. Oracle 23ai still supports direct listener control, but the operational model is more modern than the older “run one command by hand every time” mindset.

Prerequisites Before Starting the Listener

Before you start the listener, make sure the Oracle environment is correct. In most Linux environments, that means working as the oracle operating system user and ensuring that the Oracle home and path are set properly. If Oracle Net configuration files are stored outside the default location, you should also confirm the TNS_ADMIN setting.

At a minimum, verify these items:

  • ORACLE_HOME points to the correct Oracle 23ai home
  • PATH includes $ORACLE_HOME/bin
  • TNS_ADMIN is set if Oracle Net files are stored outside $ORACLE_HOME/network/admin
  • listener.ora is present if you are using an explicit listener configuration

In many cases, a default listener named LISTENER is sufficient. If you use a named listener, make sure you know its exact name before issuing commands.

Starting the Listener with LSNRCTL

The standard manual way to start the listener in Oracle 23ai is still:

lsnrctl start

If you omit the listener name, Oracle usually assumes the default listener name LISTENER. If you manage a specifically named listener, you can start it explicitly:

lsnrctl start LISTENER_MYDB

You can also run the command from inside the interactive LSNRCTL prompt:

lsnrctl
LSNRCTL> start

This remains the standard command-line way to bring the listener online manually. For a normal self-managed Oracle Database 23ai environment, it is still the correct administrative tool.

Verifying the Listener

Starting the listener is only the first step. You should always verify that it is running and that it is aware of the database services you expect. The two most useful verification commands are:

lsnrctl status
lsnrctl services

The status command is the quickest overall check. It typically shows:

  • listener version
  • listener uptime
  • listening endpoints such as TCP port 1521
  • parameter file location
  • listener log file location
  • service summary

The services command provides a more detailed view of the services and handlers known to the listener. This is especially useful when troubleshooting registration issues or checking whether the expected service is ready for client connections.

When the Listener Starts but Shows No Services

One common point of confusion is seeing a running listener that reports no registered services. This usually does not mean the listener failed to start. It often means the listener is running correctly but the database instance is not yet open, or the services have not yet registered with it.

That distinction matters. Listener startup success and service registration are related, but they are not the same event. A listener can be alive and listening on its network endpoint while still waiting for the database instance to complete startup or registration.

That is why DBAs often check both lsnrctl status and lsnrctl services after startup. These commands together tell you whether the listener itself is available and whether database services are actually ready to receive client sessions.

Where Listener Configuration and Logs Live

On a typical self-managed Oracle 23ai installation, Oracle Net configuration files are stored under:

$ORACLE_HOME/network/admin

If TNS_ADMIN is set, Oracle uses that directory instead. The main files commonly associated with listener administration are:

  • listener.ora
  • sqlnet.ora
  • tnsnames.ora

Listener logging is usually written under the Oracle diagnostic directory structure. Knowing where the parameter file and log file live is important because the status output often points directly to them, making troubleshooting easier.

Automating Startup on Modern Linux

Although lsnrctl start is still correct for manual control, modern Linux automation usually should not rely on typing that command after every reboot. In Oracle 23ai, especially in Oracle Database 23ai Free and other service-managed installs, boot-time automation is often cleaner and more reliable through systemd.

In Oracle Database 23ai Free environments, Oracle often provides a service such as:

oracle-free-23ai

That service can coordinate startup of both the database and the listener together. Typical administration commands are:

sudo systemctl enable oracle-free-23ai
sudo systemctl start oracle-free-23ai
sudo systemctl status oracle-free-23ai

This approach is usually more reliable than treating the listener as an isolated component during boot. Instead of starting only the listener and waiting for the database separately, the Linux service manager can coordinate the whole startup sequence.

Standard Oracle 23ai Installations Versus Oracle 23ai Free

It is important to distinguish standard self-managed Oracle Database 23ai from Oracle Database 23ai Free. In a standard self-managed installation, you may still rely on tools such as:

  • lsnrctl
  • dbstart
  • /etc/oratab
  • custom startup scripts
  • custom systemd units

In Oracle 23ai Free, the service model is often more integrated with the operating system package and service management layer. The listener is still real, and lsnrctl still works, but startup automation is often better handled through the OS service framework than by manually scripting listener-only startup.

Example systemd Pattern

In a standard self-managed Linux environment, a custom systemd unit can still be used to automate listener startup. The exact unit file depends on your Oracle home and local conventions, but the idea is simple: the operating system starts the listener as the Oracle software owner during the boot sequence.

A simplified pattern looks like this:

[Unit]
Description=Oracle Net Listener
After=network.target

[Service]
Type=simple
User=oracle
Environment=ORACLE_HOME=/u01/app/oracle/product/23ai
ExecStart=/u01/app/oracle/product/23ai/bin/lsnrctl start
ExecStop=/u01/app/oracle/product/23ai/bin/lsnrctl stop

[Install]
WantedBy=multi-user.target

This shows the general idea, even though a real production unit may include additional environment setup, dependency handling, or coordination with database startup.

Basic Troubleshooting Ideas

If listener startup or verification does not behave as expected, check the obvious things first:

  • Is the correct Oracle home active?
  • Are you running the command as the proper OS user?
  • Is the listener name correct?
  • Does listener.ora point to the expected host and port?
  • Has the database actually opened and registered its services?

If the listener starts but remote connections still fail, the issue may not be the listener itself. It may be firewall rules, incorrect host resolution, port conflicts, or a registration timing issue. That is why status and services are essential verification commands rather than optional extras.

Conclusion

Yes, Oracle 23ai still allows you to start and verify the Oracle Net listener with lsnrctl. That manual administration model remains valid and important. At the same time, modern Linux environments often automate startup with systemd, especially in Oracle Database 23ai Free and other service-managed installations.

The key idea is to keep both perspectives in mind. Use lsnrctl for direct listener control and verification, but use modern Linux service management for reliable boot-time automation when appropriate. That combination reflects the real operational model of Oracle 23ai on current Linux systems.

Start Oracle Listener - Exercise

Before moving on to the next lesson, click the Exercise link below to test your knowledge of the internal functions of the Oracle listener.
Start Oracle Listener - Exercise

SEMrush Software