One of the most common tasks performed on a database is configuring the Oracle Network to allow users to connect to your database. The best tool for the job is none other than the Oracle Net Manager. With the Oracle Net Manager tool you can configure both the service that allows clients to connect to the database, known as the Listener, and the corresponding local client connections.


The following steps cover the most common settings. Change them as required for your environment.

Run the Network Manager

 Start → All Programs
    → Oracle OraDb1n_home 
    → Configuration and Migration Tools 
    → Net Manager
 For Windows it is actually easier to quickly create a vanilla Listener using the Net Configuration Assistant.

 su - oracle
 cd $ORACLE_HOME/bin
 ./netmgr &

Configure Listener

 1. Expand Local → Select Listeners → Select +
    Listener Name: LISTENER

 2. Select Listening Locations then Add Address
    Protocol: TCP/IP
    Host:     MyHostName
    Port:     1521

 3. Select Database ServicesAdd Database
    Global Database Name:   MyDatabaseName
    Oracle Home Directory:  <Use $ORACLE_HOME>
                            Ex: /u01/app/oracle/product/
    SID:                    MyInstanceName

 4. Select File menu then Save Network Configuration
    Start the listener with the new config.

 5. Start Listener
    OS> cd $ORACLE_HOME/network/admin
    OS> lsnrctl start LISTENER

On Windows this will create the corresponding Listener service.

The listener configuration file is created in $ORACLE_HOME/network/admin/listener.ora

Example listener.ora

    (SID_DESC =
      (ORACLE_HOME = C:/app/oracle/product/
      (SID_NAME = DB1)

      (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
  • Be careful if manually editing the listener.ora as erroneous characters (tabs, carriage returns etc.) can cause the listener to fail.


OS> lsnrctl stop
OS> lsnrctl start
OS> lsnrctl status

Advanced Listener Tasks

Creating an ACL (Access Control List)

1. Edit the file %ORACLE_HOME%\network\admin\sqlnet.ora.
   * Enable tcp.validnode_checking.
   * Set the tcp.invited_nodes.
     o If an IP address is not listed here it will be blocked.
     o All entries must be on one line.
     o Make sure to include entries for both localhost AND .
2. Bounce the listener.

   Example sqlnet.ora:

The SQLNET.AUTHENTICATION_SERVICES entry as NTS is used on Windows database servers. It is listed here for completeness.

Delete Listener Log

OS> cd ORACLE_HOME\log\diag\tnslsnr\{DBNAME}\listener\alert
OS> lsnrctl set log_status off
OS> del log*.xml
OS> lsnrctl set log_status on



 Turn on (default): lsnrctl set log_status on
 Turn off:          lsnrctl set log_status off


 OS> lsnrctl
 LSNRCTL> set log_status off
 LSNRCTL> save_config

Sets the LOGGING command in the listener.ora file:



Password Protecting

  1. Run lsnrctl with no options to invoke the listener console.
  2. Enter the change_password command and enter a new password when prompted. If it's the first time, just hit the enter key when prompted for the old password, since there isn't one yet.
  3. Enter the command save_config
 OS> lsnrctl

 LSNRCTL> change_password
 Old password:
 New password:
 Reenter new password:
 Connecting to ...
 Password changed for LISTENER

 The command completed successfully

A PASSWORDS_LISTENER entry will be made in your listener.ora file.

<- System