Friday, December 24, 2010

Configure Listener

I was bit confused when i first read about listeners but now its very simple for me and here i will explain you how to configure listener and start and stop etc.

Concept :
Listener will simple listen on port specified by you and will accept connections on that port , and finally will connect that connection to started instance of database

client --> LISTENER --> DATABASE INSTANCE (Your started database)

Important Things which you will require while configuring listener

  • ORACLE_HOME
  • ORACLE_SID
  • PORT NUMBER ON WHICH LISTENER WILL LISTEN FOR CLIENT CONNECTIONS

To check your SID on Linux Box :   echo $ORACLE_SID
This SID you will configure in your listener which is currently running instance

Navigate to :
  • cd $ORACLE_HOME
  • cd  network/admin
  • vim listener.ora
Configure listener.ora as follows :

HOST : your ip on which your going to listen
PORT : (Your choice)
ORACLE_HOME , ORACLE_SID check with previous command and enter same here in file.

Thats it!
You simply configured listener names LISTENER (by default name)

How to Start Listener :

$ lsnrctl start LISTENER

How to Check :

$ sqlplus girish/girish@//HOSTNAME:PORT/SID


If everything is proper you should get connected to oracle instance!

Thank You!




No comments:

Post a Comment