Listener is a separate process which runs on the database server and helps in receives incoming client connection requests and manages the traffic of these requests to the database server.  A listener  can be configured with one or more listening protocol addresses, host name services, and parameters that control its runtime behavior. The listener configuration is stored in a configuration file named listener.ora.

 

Because all of the configuration parameters have default values, it is possible to start and use a listener with no configuration. This default listener has a name of LISTENER, supports no services upon startup, and listens on the following TCP/IP protocol address:

 

(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))

 

Supported services, that is, the services to which the listener forwards client requests, can be configured in the listener.ora file or this information can be dynamically registered with the listener. This dynamic registration feature is called service registration and is used by Oracle9i or Oracle8i instances. The registration is performed by the PMON process--an instance background process--of each database instance that has the necessary configuration in the database initialization parameter file. Dynamic service registration does not require any configuration in the listener.ora file.

 

Steps to configure the listener to accept client connections.

 

1. First of all login to GRID user and Type netca

netca.JPG

2. ORACLE NET CONFIGURATION ASSISTAN : WELCOME screen will appear. Select LOCAL NET SERVICE NAME CONFIGURATION and Click OK

ONCAW.JPG

3. Since you are creating new LISTENER for first time. Click ADD

add.JPG

4. Type SERVICE NAME as orcl and Click NEXT

servicename.JPG

5. In order to communicate with the Database across the NETWOK. Select PROTOCOL as TCP in order to access the database and Click NEXT

tcp.JPG

6. Type HOST NAME and Select USE THE STANDARD PORT NUMBER OF 1521 and Click NEXT

hostname.JPG

7. Select NO DO NOT TEST option and Click NEXT

NO.JPG

8. NET SERVICE NAME should be the same as the service name you entered earlier. Click NEXT

NETSERVICE.JPG

9. Would you like to configure another net service name ? Select NO and Click NEXT

configure_another.JPG

10. You will see NET SERVICE CONFIGURATION COMPLETE.. Click NEXT

COMPLETE.JPG

12. Finally Click on FINISH.

finished.JPG

13. Now Check the listener status as followin

[grid@storage ~]$ lsnrctl status

 

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 07-JAN-2016 12:32:16

 

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

 

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

Start Date                07-JAN-2016 11:46:33

Uptime                    0 days 0 hr. 45 min. 42 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File         /u01/app/11.2.0/grid/log/diag/tnslsnr/storage/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.227)(PORT=1521)))

Services Summary...

Service "+ASM" has 1 instance(s).

  Instance "+ASM", status READY, has 1 handler(s) for this service...

The command completed successfully

[grid@storage ~]$

asmlast.JPG

 

BELOW IS AN OUTPUT OF  TNSNAMES.ORA AND LISTENER.ORA :-

 

[oracle@storage Desktop]$ cd $ORACLE_HOME/network/admin

[oracle@storage admin]$ pwd

/u01/app/oracle/product/11.2.0/db_1/network/admin

[oracle@storage admin]$ ls

samples  shrept.lst  tnsnames.ora

[oracle@storage admin]$ vi tnsnames.ora

 

[oracle@storage admin]$ cat tnsnames.ora

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

ORCL =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )

 

[oracle@storage admin]$

 

[grid@storage ~]$ cd $ORACLE_HOME/network/admin

[grid@storage admin]$ pwd

/u01/app/11.2.0/grid/network/admin

[grid@storage admin]$ ls

listener.ora  samples  shrept.lst

[grid@storage admin]$ vi listener.ora

LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))    # line added by Agent

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON        # line added by Agent

[grid@storage admin]$