Listener listening without listener.ora
You don't need a listener.ora
. The listener will happily start without one, but will just start without supporting any services. pmon
will periodically register databases with the listener, but you can force registration manually.
Move the file away:
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN>move listener.ora listener.foo
1 file(s) moved.
Start the listener:
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN>lsnrctl start
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 04-NOV-2016 13:50
:03
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
Log messages written to C:\oraclexe\app\oracle\diag\tnslsnr\host\listener\alert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host)(PORT=1521)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Produ
ction
Start Date 04-NOV-2016 13:50:08
Uptime 0 days 0 hr. 0 min. 5 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\host\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host)(PORT=1521)))
The listener supports no services
The command completed successfully
Register the database with the listener:
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Fri Nov 4 13:50:38 2016
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
SQL> alter system register;
System altered.
SQL>
The listener now supports the database:
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN>lsnrctl status
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 04-NOV-2016 13:51
:20
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Produ
ction
Start Date 04-NOV-2016 13:50:08
Uptime 0 days 0 hr. 1 min. 15 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\host\list ener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN>
"As far as I know, for the listener to work, I have to have listener.ora file."
Starting with 8.1.5, listener.ora is optional for a default listener.
Starting the Listener without a LISTENER.ORA (Doc ID 208968.1)
Purpose
To publicise the fact that from Oracle8i (8.1.5) onward, a LISTENER.ORA is no longer required in order to start the Default Oracle Net Listener.