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:
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
2. ORACLE NET CONFIGURATION ASSISTAN : WELCOME screen will appear. Select LOCAL NET SERVICE NAME CONFIGURATION and Click OK
3. Since you are creating new LISTENER for first time. Click ADD
4. Type SERVICE NAME as orcl and Click NEXT
5. In order to communicate with the Database across the NETWOK. Select PROTOCOL as TCP in order to access the database and Click NEXT
6. Type HOST NAME and Select USE THE STANDARD PORT NUMBER OF 1521 and Click NEXT
7. Select NO DO NOT TEST option and Click NEXT
8. NET SERVICE NAME should be the same as the service name you entered earlier. Click NEXT
9. Would you like to configure another net service name ? Select NO and Click NEXT
10. You will see NET SERVICE CONFIGURATION COMPLETE.. Click NEXT
12. Finally Click on FINISH.
13. Now Check the listener status as followin
[grid@storage ~]$ lsnrctl status
LSNRCTL for Linux: Version 22.214.171.124.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
Version TNSLSNR for Linux: Version 126.96.36.199.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
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...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
The command completed successfully
BELOW IS AN OUTPUT OF TNSNAMES.ORA AND LISTENER.ORA :-
[oracle@storage Desktop]$ cd $ORACLE_HOME/network/admin
[oracle@storage admin]$ pwd
[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.
(ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
[grid@storage ~]$ cd $ORACLE_HOME/network/admin
[grid@storage admin]$ pwd
[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