1

I'm in the process of re-hosting two Oracle 12c databases on Unix. In the source environment, the databases were stacked -- they shared the same Oracle home and used the same listener. The listener looked roughly like this:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = foo)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = DATABASE1)
      (ORACLE_HOME = /oracle)
    )
    (SID_DESC =
      (SID_NAME = DATABASE2)
      (ORACLE_HOME = /oracle)
    )

In the new environment, each of the databases has its own Oracle home. I have a listener running out of one of the oracle homes. It looks roughly like this (note the ORACLE_HOMEs):

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = newfoo)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = DATABASE1)
      (ORACLE_HOME = /oracle/DATABASE1)
    )
    (SID_DESC =
      (SID_NAME = DATABASE2)
      (ORACLE_HOME = /oracle/DATABASE2)
    )

I would like for each environment to have its own listener running, but that would mean one of the databases would need to change its port (we're not using virtual IPs so I can't have two databases on the same host using the same port).

(For the sake of argument, imagine that the client is running tons of legacy software and they can't easily change which ports they're pointed at. I realize asking them to simply modify their tnsnames is the easiest option, but let's set that aside for the moment.)

Question: Is it problematic to use a single listener for multiple Oracle homes? I get that it's a single point of failure, but is there also a performance hit? Something else I'm not thinking of?

Question: Is there some other way I can run a listener out of each of the new Oracle homes using the same port? Again, we're not using virtual IPs, so I'm stuck with new host "foonew" + port 1521.

Thank for any answers or guidance you can provide.

2 Answers 2

2

Question: Is it problematic to use a single listener for multiple Oracle homes?

No. There really is no valid reason to run multiple Listeners.

You just need to make sure each database "registers" with that one Listener.

I get that it's a single point of failure, but is there also a performance hit?

I'd be more concern with your single node databases being a "single point of failure" before I worry about the Listener as a "single point of failure".

Something else I'm not thinking of?

  • K.I.S.S.: Just use a single Listener.
  • The Listener does not have to be on the same server as the database
  • I believe you can use Oracle Grid to run a collection of Listeners.

Question: Is there some other way I can run a listener out of each of the new Oracle homes using the same port? Again, we're not using virtual IPs, so I'm stuck with new host "foonew" + port 1521.

No. This is an OS thing, not a Listener thing.

-1

First of all, the concept of 'each database has it's own port' is bogus. It's the listener that uses the port, which by default is 1521. So the idea of haveing separate listeners so that the database can have its own port makes no sense. Second, please burn this into your brain: One single listener, with the default name of LISTENER and default port of 1521, is quite capable of -- indeed, was designed to -- service multiple databases of multiple versions running from multiple homes. I've been doing this since Oracle 7.3 and have _never_seen a valid justification for using multiple listeners. Even if you already have multiple clients referencing a listener on a non-default port, you can configure the listener to use multiple ports. But even then, there is no binding between any port the listener might be using and any database the listener is servicing. Also keep in mind that as part of the listener setting up the connection, it spawns a separate process and informs the client of the port that process will be using. At that point the listener could be shut down, and existing connections will continue unharmed.

1
  • I've seen one valid reason for multiple listeners. But, that reason had nothing to do with Oracle or the Oracle database. Mar 8, 2019 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.