Manage Learn to apply best practices and optimize your operations.

How to connect two databases to one listener

I want to install multiple databases within a single home, having two databases listening to only one listener at a time. That means if I have 10 databases installed in a single home and 5 listeners, I want two databases to access one listener at the same time. Please advise how I can go about doing this. Any reference, technical steps, or documentation guides would also be appreciated.

For 8i and higher databases, you can rely on dynamic registration to set certain instances to use certain listeners. For that configuration, you will need to set the local_listener parameter for each instance since you won't be using the default listener port (for at least 4 of the listeners). Set the local_listener parameter to a value like this:

local_listener = "(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))"

The PORT number will be different depending on which listener you want the database to register with. The local_listener parameter can be modified dynamically and you can use the "alter system register;" statement to force PMON to register with the listener immediately (otherwise it does a service_update about every 60 seconds).

Dig Deeper on Oracle database installation, upgrades and patches