Beware of Listener Port 1521 and Dynamic Registration

   Send article as PDF   

As you already know, an Oracle database’s PMON process will register your database with a listener without you having to do anything about it. However …

This will only happen if the listener in question is running on port 1521. And it doesn’t have to be named LISTENER either – as I mistakenly thought, it only has to be port 1521.

If you have a listener running on this port, and you have configured other listener(s) to listen on different ports, you will still have them dynamically register with the listener running on port 1521.

Lsnrctl status shows this for a non-1521 listener on the same server as a listener running on port 1521 (names changed to protect the guilty):

...
Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test_server)(PORT=1525)))
Services Summary...
Service "test5" has 1 instance(s).
  Instance "test5", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

For the listener running on port 1521, we can see it’s grabbed everything!

...
Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test_server)(PORT=1521)))
Services Summary...
Service "test1" has 1 instance(s).
  Instance "test1", status READY, has 1 handler(s) for this service...
Service "test1XDB" has 1 instance(s).
  Instance "test1", status READY, has 1 handler(s) for this service...
Service "test2" has 1 instance(s).
  Instance "test2", status UNKNOWN, has 1 handler(s) for this service...
Service "test3.world" has 1 instance(s).
  Instance "test3", status READY, has 1 handler(s) for this service...
Service "test4" has 1 instance(s).
  Instance "test4", status READY, has 1 handler(s) for this service...
Service "test5" has 1 instance(s).
  Instance "test5", status READY, has 1 handler(s) for this service...
The command completed successfully

If you want to prevent this from happening, you can add the following to the listener.ora for the listener you wish to have listening on port 1521:


DYNAMIC_REGISTRATION_lsnr_name = off

That way, the listener is prevented from accepting dynamic registration requests from the other databases’ PMON process.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.