2 Replies Latest reply: Mar 6, 2013 6:54 AM by Jos van den Oord RSS

    Add listener to Grid Infrastructure using srvctl.

    ma365
      Hi,

      We have a two node 11.2.0.3 Grid Infra cluster running on SLES11 Linux.

      Everything is ok with the SCAN and standard listeners.

      However we have a listener running on each node which is used by Oracle Gateway. These listeners were created manually using info provided by Oracle (i.e. definition copied to $ORACLE_HOME/network/admin/listener.ora and started using lsnrctl). This all works.

      These listeners are currently not managed by Grid Infra. We would like them to be.

      I thought this was easy enough using srvctl to register them with Grid Infra using...

      srvctl add listener -n mynode1 -l LISTENER_MYNODE1_GW -o $ORACLE_HOME -p 1529
      srvctl add listener -n mynode2 -l LISTENER_MYNODE2_GW -o $ORACLE_HOME -p 1529

      These commands worked but did give a warning stating that the -n flag is deprecated and will be ignored.

      This has left us with the following listener config....

      grid@MYNODE1:~> srvctl status listener -n mynode1 | grep mynode
      Listener LISTENER_MYNODE1_GW is enabled on node(s): mynode1
      Listener LISTENER_MYNODE1_GW is not running on node(s): mynode1
      Listener LISTENER_MYNODE2_GW is enabled on node(s): mynode1
      Listener LISTENER_MYNODE2_GW is not running on node(s): mynode1

      grid@MYNODE1:~> srvctl status listener -n mynode 2 | grep mynode
      Listener LISTENER_MYNODE1_GW is enabled on node(s): mynode2
      Listener LISTENER_MYNODE1_GW is not running on node(s): mynode2
      Listener LISTENER_MYNODE2_GW is enabled on node(s): mynode2
      Listener LISTENER_MYNODE2_GW is not running on node(s): mynode2

      You can see that Grid Infra knows about the listeners but they are available on both nodes. What we would like is a result like the following example....

      grid@MYNODE1:~> srvctl status listener -n mynode1 | grep mynode
      Listener LISTENER_MYNODE1_GW is enabled on node(s): mynode1
      Listener LISTENER_MYNODE1_GW is not running on node(s): mynode1

      grid@MYNODE1:~> srvctl status listener -n mynode 2 | grep mynode
      Listener LISTENER_MYNODE2_GW is enabled on node(s): mynode2
      Listener LISTENER_MYNODE2_GW is not running on node(s): mynode2

      i.e one listener registered with just the node it is running on. This used to be possible with using the -n flag but no longer works. Does anyone have any advice on how to achive this in 11gR2.

      Any input appreciated,

      Regards
      ma365
        • 1. Re: Add listener to Grid Infrastructure using srvctl.
          Sebastian Solbach -Dba Community-Oracle
          Hi ma365,

          a listener is a lcoal resource in 11.2, and will run on all nodes of the cluster.
          However I wonder why this poses a problem for you?
          Instead of defining 2 listeners (LISTENER_MYNODE1_GW and LISTENER_MYNODE2_GW) why not simply create on listener (LISTENER_MYNODE_GW) and be done with it.
          If special registration for services is needed (listener.ora entry) simply make them different on the nodes and you are done with it.

          Regards
          Sebastian
          • 2. Re: Add listener to Grid Infrastructure using srvctl.
            Jos van den Oord
            Hi get the info of the listener and the scan -[listeners]

            Execute the statements from the GRID infrastructure.

            srvctl config listener [-l listener_name] [-a] this gives the info how the listener is register in to the OCR.

            alternative:
            Execute the steps to add a listener.

            srvctl add listener -l crmlistener -p TCP:1533 -o {CRS_HOME}
            srvctl enable listener -l crmlistener
            srvctl start listener -l crmlistener
            srvctl config listener -l crmlistener -a

            lsnrctl status crmlistener

            See what the result of this exercise is, working then convert to this method

            Cheers,

            Jos van den Oord
            Blog : [Joords Oracle DBA blog|http://joordsblog.vandenoord.eu/]
            Company : [Transfer-solutions.com|http://www.transfer-solutions.com/]