Oracle DBA, How To, Error, Cause and Action

Configure Oracle LISTENER

In this post I would like to share how to create Oracle Listener with Oracle utility call Network Manager.

The configured file of the LISTENER is listener.ora and the default location is $ORACLE_HOME/network/admin

Before I start to demonstrate how to create listener fist I will rename my current listener.ora file so that I am able to create from scratch.


To open Network Manager, you need to login as oracle account and call netmgr

netmgr



Oracle Network Manager is Open.




Expand the Local and click on Listeners



Click Green Plus Sign to add new listener, if you notice that the Default Listener name is Listener is LISTENER, you may change it, however if you change it every time you use lsnrctl utility you need to set the the current listener setting by

SET SET_CURRENT listener name.

So to make this easy I just use default name which is LISTENER.



Now we are setting the Listening Locations, click the Add Address to setup your database hosting information.



This network address is the location where your database is, which is localhost, you may set the hostname to the hostname of the database or localhost (127.0.0.1) or the IP address of your database.
By default oracle listener is using TCP port 1521, for security purpose highly secured database will change the port to other than that, because I create this just for fun and education purpose I am using 1521.



Click on the pull down menu, and choose General Parameter.



Click the Logging & tracing, in this section, I want to disabled the logging of the listener.log. Listener.log is very important log file, if this is production system, I suggest you to keep the logging on. This logging information will able to capture all client connection to the database, we will know who connect to your database. Again my virtual server base on small budget environment with limited storage therefore I disabled this setting.



Click the Pull down menu again, looks like only 1 line, Oracle Network Manager not display properly the pull down menu, just click the line.



Now choose the Database Service



We need to Add database instance information into this listener, click Add Database



Set te global name and SID and oracle home correctly.



Save the changes, File-> Save Network Configuration



Now Exit from Network Manager, File-> Exit



If you list the $ORACLE_HOME/network/admin you will see the listener.ora file is created.



The information also can be change with text editor



lsnrctl utility is used to start and stop the listener, most common use is
- start
to start service
- stop
to stop service
- set current_listener
to change the current listener to your listener name by default is LISTENER
- reload
if you reconfigure the listener.ora file you need to issue reload so that the changes take effect.

No comments:

Post a Comment

Thanks for your comment.