Sometimes it is almost funny how old habits indeed seldom die. At the Customers site where I am working there still seems to be a culture in which it is not that common to use Gui solutions offered by Oracle to do day-to-day jobs. In Dutch there is an expression telling unknown things makes things disliked. Well this week i came across nice behavior of the NETCA tool in an environment where Grid Infrastructure 18.104.22.168 is running and I must say I really liked it.
My environment is a four Node Cluster on Redhat Linux 5.5, my Grid Infra structure is 22.214.171.124.0.
Setting up your listener
So far ( up to 11.1.0) it would be common practice at my customers site to create listener by hand per Rac instance, using the VIP address of the local Box and a a Port per Rac Instance by simply edit it in $ORACLE_HOME/network/admin in the listener.ora manually. After that would have issued a start of listener to see if all is fine and shut it down again. then would have to :
11.1 srvctl add listener -n node_name -o Oracle_home [-l listener_name] and start it with srvctl start listener -n node_name [-l listener_name_list]
(and of course that is still valid way to work). In this way we would set up a local listener per Instance in the Rac.
In 11.2 an interesting change was noticed since we only should define a local listener per database. You might ask so what is the difference to 11.1. Well let me show you.
11.2 srvctl add listener [-l listener_name] [-o Oracle_home] [-p "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"] [-k network_number] [-s] And after that you would start the listener: srvctl start listener [-n node_name] [-l listener_name_list]
The interesting difference is that in 11.2 starting the listener will start the local listener on all the nodes in the cluster (which also means that you should let go of the thought you define a local listener for an instance. As from now it is you should define a local listener per Database). In a N node cluster that means you will see it (ps -ef|grep inherit) on all Nodes. That might be a bit confusing if you would only set-up your Instances on N-1 nodes which would mean that on a box where no instance is running its local listener would still be out there as a process.
Anyhow as you can see it would take multiple steps to set up the listener this way ( edit and copy the listener.ora to all boxes; add the listener to the cluster; start it via cluster).
The nice behavior of the NETCA tool is Cluster aware and that these steps are all being performed for you.
When you Launch the tool ( i always tend to launch it in background so i have my prompt back : netca &
- Choose listener Configuration.
- Choose add.
- Give the listener a proper name: Listener_DBNAME.
- Select next.
- Select a port (Company rules state will have to change it from the default 1521).
- To the question like to define another listener: NO.
- (at that point and time you might see in your command prompt that the listener is being configured in the Grid Infra already).
- In the next screen you will be offered to start the new created listener.
- Start it.
- return to the menu and select finish.
And that is it . With a few clicks and some data you have a created your local listener , it is configured on all nodes in your cluster , it is started on all nodes and a new listener ora and endpoint listener.ora will be generated which includes the information on the new created listener.