| Lesson 6 |
Bouncing the Listener |
| Objective |
Stop and restart the Oracle listener so it reads a new listener.ora file. |
Stop and Restart the Oracle Listener in Oracle AI Database 26ai
Whenever you make a change to your
listener.ora file, you need to stop and restart the listener for that change to take effect. The Oracle Net listener reads
listener.ora at startup — it doesn't continuously watch the file for edits. This process of stopping and immediately restarting the listener is commonly called
bouncing the listener. The basic process is simple:
- Start the Listener Control program.
- Issue a stop command.
- Issue a start command.
Try the simulation below to walk through this yourself.
Making Sure New listener.ora Changes Take Effect
In Oracle AI Database 26ai, the process works like this:
- Make your changes to listener.ora. Use a text editor to modify the necessary parameters. The file is typically located under
$ORACLE_HOME/network/admin.
- Reload the listener configuration:
- Open a command prompt or terminal.
- Make sure
$ORACLE_HOME/bin is on your PATH.
- Run:
lsnrctl reload
- This tells the listener to re-read
listener.ora and pick up the new configuration, without a full stop and restart of the listener process.
A few important notes:
- Dynamic service registration doesn't cover everything. Database services register themselves with the listener automatically, but changes to listener-level parameters — listening addresses, port numbers, and similar settings — still require a reload (or a full restart) to actually take effect.
- A reload only affects the running process. To make a change persistent across future listener restarts, you still need to have modified the actual
listener.ora file itself — reload doesn't write anything back to disk on its own.
- Verify after reloading. Use
lsnrctl status or lsnrctl services afterward to confirm your changes actually took effect.
If you'd rather do a full restart instead of a reload,
lsnrctl stop followed by
lsnrctl start works too. Reloading is generally faster and less disruptive, since it doesn't drop the listener entirely, but a full restart is sometimes the more thorough option when you want to be certain everything picks up cleanly.
What lsnrctl Actually Does
It's worth being precise about what
lsnrctl is and isn't. The Oracle Net Listener is a separate process (or Windows service) that runs continuously in the background, listening for incoming connection requests — it's typically configured to start automatically alongside your database instance.
lsnrctl itself doesn't start that background listener process from nothing; it's a management tool you use to interact with a listener that already exists as a configured entity. With it, you can:
- Start a listener (
lsnrctl start)
- Stop a listener (
lsnrctl stop)
- Check its status (
lsnrctl status)
- Reload its configuration (
lsnrctl reload)
Think of the listener as an engine, and
lsnrctl as the set of controls you use to operate it — starting it, stopping it, and checking its gauges.
Bouncing the Oracle Listener
- Start this simulation from your terminal or command prompt. Type
lsnrctl and press ENTER to start the Listener Control program.
- Issue the
stop command to shut down the listener.
- The listener will stop, and you'll see a message confirming your stop command completed successfully. Now type
start and press ENTER to restart the listener.
- You'll get quite a bit of feedback when the listener starts back up. Under the Services Summary section, you'll see a list of instances the listener is now listening for — the
COIN instance should be one of them. Use the exit command to return to your command prompt.
- That's the end of the simulation.
Starting and Shutting Down the Listener
The Oracle listener is normally configured to start automatically whenever your server machine restarts. When your system encounters unforeseen circumstances, or you've manually stopped the listener, you can restart it from the command line:
lsnrctl start
You can also manage the listener through Oracle Enterprise Manager Cloud Control, which provides a graphical Listener page where you can view status and stop the listener without touching a command line. If you'd rather stay at the command line, the equivalent is:
lsnrctl stop
This lesson's simulation used the Listener Control program from a command prompt. On a Windows machine, you also have the option of stopping and starting the listener from the
Services control panel[1]. This walkthrough used
lsnrctl instead because it's a universal approach that works identically on any Oracle installation, including Linux and UNIX.
In the output from restarting the listener, the key item to look for is the
service handler[2] for the COIN instance — the entity that actually acts as the connection point for that database once the listener hands a request off to it. A service handler can be either a dispatcher or a dedicated server process, depending on how the instance is configured. Seeing COIN's service handler listed tells you the listener is genuinely monitoring the network for incoming connection requests to that instance, not just running with nothing registered. You'll see an example of this in the exercise below, under the Services Summary section.
Bouncing Listener - Exercise
Click the Exercise link below, and do the exercise to stop and restart your listener so your addition of the
COIN instance takes effect.
Bouncing Listener - Exercise
Net Listener Bounce - Quiz
After you've completed the exercise, click the Quiz link below to test your knowledge of the material you've learned so far.
Net Listener Bounce - Quiz
[1]Windows Services control panel: A built-in administrative tool for viewing and managing the services running on a Windows system. Services are background processes that perform tasks like networking, printing, and security updates.
[2]Service handler: The entity that acts as the actual connection point to an Oracle database once the listener has forwarded a connection request to it — either a dispatcher (for shared server connections) or a dedicated server process.
