Create Oracle Net Listener that is a network service on Oracle.

Create Oracle Net Listener that is a network service on Oracle.Login with the “oracle” user and input a command “netca”  or

[oracle@ermantestdb ~] $cd $ORACLE_HOME/network/bin/
[oracle@ermantestdb ~] $ ./netca

Check a box “Listener Configuration” and go next.

Screen Shot 2017-07-16 at 16.17.44

Go next.

Screen Shot 2017-07-16 at 16.17.09.png

Set Listner’s name.

Screen Shot 2017-07-16 at 16.17.15.png

This example goes next with keeping default TCP (Transmission Control Protocol )

Screen Shot 2017-07-16 at 16.17.21.png

Set a port. This example goes next with keeping default.

Screen Shot 2017-07-16 at 16.17.27.png

If you’d like to create more Listeners, Answer “Yes”. This example selects “No”.

Screen Shot 2017-07-16 at 16.17.33.png

Configuration completed.

Screen Shot 2017-07-16 at 16.17.38.png

Click “Finish” to quit.

Screen Shot 2017-07-16 at 16.17.44.png

now, we can see listener.ora file.

[oracle@ermantestdb ~]$ cat /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora 

LISTENER_ermantestdb =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.4.102)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ermantestdb)
    )
  )

If the Oracle listener is not running, you’ll get the following message.

[oracle@ermantestdb ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0 - Production on 15-JUNE-2017 16:27:39

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.4.102)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory

If the Oracle listener is running, you’ll get the following message.

[oracle@ermantestdb ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0 - Production on 15-JUNE-2017 16:27:02

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.4.102)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 - Production
Start Date                15-JUNE-2017 16:43:13
Uptime                    1 days 21 hr. 43 min. 49 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/devdb/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=11.2.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Services Summary...
Service "devdb" has 1 instance(s).
  Instance "devdb", status UNKNOWN, has 1 handler(s) for this service...
Service "devdb.thegeekstuff.com" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdbXDB.thegeekstuff.com" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
Service "devdb_XPT.thegeekstuff.com" has 1 instance(s).
  Instance "devdb", status READY, has 1 handler(s) for this service...
The command completed successfully

If the Oracle listener is not running, start the listener as shown below.

[oracle@ermantestdb ~] $ lsnrctl start

If the Oracle listener is running, stop the listener as shown below.

[oracle@ermantestdb ~] $ lsnrctl stop

Hits: 7

Leave a Reply

Your email address will not be published. Required fields are marked *