12 Replies Latest reply: Jun 9, 2009 4:14 PM by 706015 RSS

    9i and 10g on same host + listeners

    433130
      Dear All,

      I have 2 simple questions:
      1- Is it possible to have 2 database servers on one machine given that
      one is 10g (10.1.0.3) and the other is 9i (9.2.0.x) ?
      2- Second, which of course is valied if answer to question 1 is YES,
      What about lsnrclt version incompatibility?

      More details
      I installed 10g version mentioned above on the server that hosts the
      working 9i database. However, when I initiated the lsnrclt start of the
      new 10g database,
      and then tried to start the 9i server, I got this error. Please help or
      explain.

      $>lsnrctl start
      --------------------------------------------------------------------------------------
      LSNRCTL for Linux: Version 9.2.0.1.0 - Production on 25-MAY-2005 10:20:50

      Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

      Starting /home/oracle/bin/tnslsnr: please wait...

      TNSLSNR for Linux: Version 9.2.0.1.0 - Production
      System parameter file is /home/oracle/network/admin/listener.ora
      Log messages written to /home/oracle/network/log/listener.log
      Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
      TNS-12542: TNS:address already in use
      TNS-12560: TNS:protocol adapter error
      TNS-00512: Address already in use
      Linux Error: 98: Address already in use

      Listener failed to start. See the error message(s) above..
      --------------------------------------------------------------------------------------

      When I stopped the newer 10g listener and then started the 9i version
      before it and to restart the 10g litener again, I get the following error:
      "TNS-12618 TNS:versions are incompatible" and refered to metalink note
      Note:297781.1 but could not understand how to fix the issue
      --------------------------------------------------------------------------------

      Regards,
      Michael Messiha
      Oracle Technology Consultant
        • 1. Re: 9i and 10g on same host + listeners
          Ivan Kartik
          As Oracle Technology Consultant you should know that...
          1- Is it possible to have 2 database servers on one machine given that
          one is 10g (10.1.0.3) and the other is 9i (9.2.0.x) ?
          Yes it's possible.

          Anyway, you can't run two listeners on the same IP and port number.
          There are two scenarios:
          1. You specify another port number for second instance
          2. You will be using just one listener for both of instances.

          If you want use scenario nr. 2 then:
          Modify listener.ora for 10g database and use 10g listener only.
          Here is the example of listener.ora
          LISTENER =
            (DESCRIPTION_LIST =
              (DESCRIPTION =
                (ADDRESS_LIST =
                  (ADDRESS = (PROTOCOL = TCP)(HOST = <IPADDRESS>)(PORT = 1521))
                )
              )
            )
          
          SID_LIST_LISTENER =
            (SID_LIST =
              (SID_DESC =
                (SID_NAME = TEST9I)
                (ORACLE_HOME = /opt/oracle/920)
                (SERVICE_NAME = TEST9I.world)
              )
              (SID_DESC =
                (SID_NAME = TEST10G)
                (ORACLE_HOME = /opt/oracle/10g)
                (SERVICE_NAME = TEST10G.world)
              )
            )
          • 2. Re: 9i and 10g on same host + listeners
            433130
            Thank you for your descent way in answering my question.
            • 3. Re: 9i and 10g on same host + listeners
              458653
              Hello,

              Is it also possible to modify the listener.ora for the 9i database and use the 9i listener only? I'm currently doing this but receive an error while trying to connect to the 10g database from an Oracle client...

              ORA-12500: TNS:Listener failed to start a dedicated service.

              Thank you.
              Michael.
              • 4. Re: 9i and 10g on same host + listeners
                380453
                I think that i've read anywhere this site, that if you have different Oracle versions/products in the same box, you have to use the highest version's listener (if you wanto to use only one listener) or, as was wrote above, start one listener for each version in different ports.

                HTH

                Jaime
                • 5. Re: 9i and 10g on same host + listeners
                  277993
                  You can have two listeners on different ports in the same listener.ora file. Note there difference between two listener.ora files and two listeners. You only have one listener.ora file housing two listeners.

                  here is the example of my the two listeners (a little change and expansion of IVAN's example)

                  LISTENER =
                  (DESCRIPTION_LIST =
                  (DESCRIPTION =
                  (ADDRESS_LIST =
                  (ADDRESS = (PROTOCOL = TCP)(HOST = <IPADDRESS>)(PORT = 1521))
                  )
                  )
                  )

                  SID_LIST_LISTENER =
                  (SID_LIST =
                  (SID_DESC =
                  (SID_NAME = TEST10G)
                  (ORACLE_HOME = /opt/oracle/10g)
                  (SERVICE_NAME = TEST10G.world)
                  )
                  )

                  LISTENER2 =
                  (DESCRIPTION_LIST =
                  (DESCRIPTION =
                  (ADDRESS_LIST =
                  (ADDRESS = (PROTOCOL = TCP)(HOST = <IPADDRESS>)(PORT = 1522))
                  )
                  )
                  )

                  SID_LIST_LISTENER2 =
                  (SID_LIST =
                  (SID_DESC =
                  (SID_NAME = TEST9I)
                  (ORACLE_HOME = /opt/oracle/920)
                  (SERVICE_NAME = TEST9I.world)
                  )
                  )


                  Note the ports and names The your can start the listeners with;

                  lcnrstl start (for the 1st - optionally add LISTENER)
                  lcnrstl start LISTENER2 (for the 2nd).

                  You can expand and use the scenario to configure Listener Failover.
                  • 6. Re: 9i and 10g on same host + listeners
                    277993
                    Sorry, my last lines should read

                    Note the ports and names. Then you can start the listeners with;

                    lsnrctl start (for the 1st - optionally add LISTENER)
                    lsnrctl start LISTENER2 (for the 2nd).

                    You can expand and use the scenario to configure Listener Failover.
                    • 7. Re: 9i and 10g on same host + listeners
                      80854
                      Ivan,
                      As per the 2nd scenario, we have 9i and 10g installation on the same AIX box. I am running 10g listener. It works fine but sometimes (at random) it would start another listener automatically. We verified from our side, no one is doing it manually. There is no fixed pattern, it happens at random. Any help will be much appreciated.

                      Thanks
                      • 8. Re: 9i and 10g on same host + listeners
                        277993
                        It works fine but sometimes (at random) it would start another listener automatically.
                        If you look at my response to the posting, I mentioned having more than one listener in the listener.ora file.

                        Listeners that have been stopped cannot restart themselves automatically unless manually by someone or a script which is doing it when called by some setup or process (autostart etc).

                        Does this happen at system restart or while the system is running ?
                        Check the oracle autostart scripts of your system. Open the listener.ora file to see what listeners are in it.
                        • 9. Re: 9i and 10g on same host + listeners
                          Ivan Kartik
                          Just want add one option (possible scenario).
                          Start script for listener is using 9i enviroment (probably default enviroment).
                          • 10. Re: 9i and 10g on same host + listeners
                            cosc5050
                            I am also having the same issue. Two listeners are running with the same address and same port number. Killing both processes and restarting the listener solves the problem. But while both are running, no connections can be made.

                            Has anyone heard of a resolution or identification of a bug for this issue?
                            • 11. Re: 9i and 10g on same host + listeners
                              451321
                              you cant make two listeners run on same port
                              • 12. Re: 9i and 10g on same host + listeners
                                706015
                                Ivan, I tried this and it worked. Thanks!