Information about the Listener
****Summary of How this page can help you******************

This page contains information about what a listener is and its purpose and other details useful for a
new dba..


What is a listener?

Imagine that you are staying in a big house and you have a security person to see that nobody can
enter your house without your permission. This security guard informs you if you have new visitors.
Then you can make a decision whether to allow the visitor or not.

In the same way the listener is like a security person to a database. A Listener is a component that
keeps on listening whether any users want to connect to the database or not.
If a user has to connect to the database  the connection has to go through the listener. If there is no
listener then the user cannot make a connection to the database.
So the database administrators have to start the listener and the database  if users need to connect
to the database. Starting just the database will not help. In case you login into the server where the
database exists then you dont need a listener. If you are connecting from your machine and the
database is present in a different server then you need a listener on the server.

As soon as a database is started it registers itself with the listener. If the listener is not active then the
next time the listener is started it will find out what all databases are on the server on which it is
present , and stores that information. The listener looks in the listener.ora to find out which all
databases are present in the server. Both the listener and the database are always present on the
same server.

How can i start a listener?

execute the below command after logging into the unix server

lsnrctl start

Normally on lot of servers the listeners name is LISTENER. This is the default name.So the above
command can be used to start the listener.

Sometimes the listener has a different name.You can verify if the listener has a different name by
looking in the listener.ora file. This file is present in the $ORACLE_HOME/network/admin folder on
the unix or windows server. In case the listener has a different name then start the listener by using
below commands.


the yourlistenername is the name of your listener that you find in the listener.ora.

Remember that if you are creating a brand new database on a new server , you have to manually
create the listener.ora , tnsnames.ora and sqlnet.ora.

How can i Stop a Listener?

lsnrctl stop
If the listener has a different name other than the default name then execute below commands


How can i find out if the listener is already active or not?

execute the below command after logging into the unix or windows server

lsnrctl status

this gives information whether the listener has already started or not.

More information about listeners and their administration can be found in the
oracle documentation

To go back to the 50 dba terms for the new dba please clink the link.