As a part of standards every (RAC) database has its own listener in my projects. This week i was asked to alter the local listener to a different port to keep it similar to a specific port that I used on other database(s) in that project.
Technically this was Of course a little effort 2 be made to keep everybody happy.
I altered my listener.ora (yup still an old-fashioned kind of guy) manually and I stopped and started the listener:
srvctl start listener -l listener_mydb1 srvctl status listener -l listener_mydb1
And in the database i had altered the local_listener too to show new ports well. And of course I altered the tnsnames entry too. So I had it all covered i thought. That was only until the moment that I checked the listener for that database for its status. And much to my surprise I saw this.
lsnrctl status listener_mydb1
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 15-JUL-2013 14:40:33
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mysrvr-vip)(PORT=33015)(IP=FIRST)))
STATUS of the LISTENER
————————
Alias LISTENER_mydb1
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 15-JUL-2013 14:40:13
Uptime 0 days 0 hr. 0 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/11203_ee_64/db/network/admin/listener.ora
Listener Log File /opt/oracle/mydb1/admin/network/log/listener_mydb1.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.233.120.91)(PORT=33015)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.233.120.83)(PORT=33006))) <—- hey this is still the old port showing
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.233.120.91)(PORT=33006))) <—- hey this is still the old port showing
Services Summary…
Service “mydb1.prod.xx” has 1 instance(s).
Instance “mydb11”, status READY, has 1 handler(s) for this service…
Service “mydb11” has 1 instance(s).
Instance “mydb11”, status UNKNOWN, has 1 handler(s) for this service…
Service “mydb1XDB.prod.xx” has 1 instance(s).
Instance “mydb11”, status READY, has 1 handler(s) for this service…
Service “mydb1_TAF.prod.xx” has 1 instance(s).
Instance “mydb11”, status READY, has 1 handler(s) for this service…
The command completed successfully
On other occasions i had learned that it is little – no use to alter the endpoints_listener.ora because that is a generated file.
Even when things worked as planned these old ports looked funny in the display.
I decided to use the gui NETCA and made the port change to my local listener for this database again, but GUI- wise! After that I checked my endpoints_listener.ora again
and it showed the correct port, so it was time to checked again with the services.
lsnrctl status listener_mydb1
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 15-JUL-2013 14:40:33
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mysrvr-vip)(PORT=33015)(IP=FIRST)))
STATUS of the LISTENER
————————
Alias LISTENER_mydb1
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 15-JUL-2013 14:40:13
Uptime 0 days 0 hr. 0 min. 20 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/11203_ee_64/db/network/admin/listener.ora
Listener Log File /opt/oracle/mydb1/admin/network/log/listener_mydb1.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.233.120.91)(PORT=33015)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.233.120.83)(PORT=33015))) <—- with the newly generated endpoints_listener
Services Summary…
Service “mydb1.prod.xx” has 1 instance(s).
Instance “mydb11”, status READY, has 1 handler(s) for this service…
Service “mydb11” has 1 instance(s).
Instance “mydb11”, status UNKNOWN, has 1 handler(s) for this service…
Service “mydb1XDB.prod.xx” has 1 instance(s).
Instance “mydb11”, status READY, has 1 handler(s) for this service…
Service “mydb1_TAF.prod.xx” has 1 instance(s).
Instance “mydb11”, status READY, has 1 handler(s) for this service…
The command completed successfully
Glad to see what i wanted in the first place. Lesson learned use the netca to do a port change is better than altering the listener.ora by hand in this case.
Happy reading,
Mathijs