I have just moved all my work from a Windows 10 PC to a Windows 11 PC. The new PC is supposed to be a mirror image of my old PC. This includes a copy of Oracle 21c Express Edition and Oracle SQL developer 24.3. I have a problem with Oracle on my new PC as the listener only shows 1 instance when it should show 5. I deinstalled and then reinstalled 21c on my new PC and everything was back to normal. That is until I restarted my PC the next day. I could not connect to my Oracle database because of the message “ORA-12514: TNS:listener does not currently know of service requested in connect descriptor." I ran lsnrctl status and it showed the following:
LSNRCTL for 64-bit Windows: Version 21.0.0.0.0 - Production on 07-MAY-2026 18:39:25
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lenovo2)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 21.0.0.0.0 - Production
Start Date 07-MAY-2026 18:08:55
Uptime 0 days 0 hr. 30 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File F:\Oracle-21c\homes\OraDB21Home2\network\admin\listener.ora
Listener Log File F:\Oracle-21c\diag\tnslsnr\AJM-LENOVO2\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
It is supposed to read as follows:
LSNRCTL for 64-bit Windows: Version 21.0.0.0.0 - Production on 07-MAY-2026 16:59:45
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lenovo)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 21.0.0.0.0 - Production
Start Date 07-MAY-2026 16:56:36
Uptime 0 days 0 hr. 3 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File F:\Oracle-21c\homes\OraDB21Home2\network\admin\listener.ora
Listener Log File F:\Oracle-21c\diag\tnslsnr\AJM-LENOVO\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=AJM-LENOVO)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=127.0.0.1)(PORT=5500))(Security=(my_wallet_directory=F:\ORACLE-21C\admin\XE\xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "972805166862470e8292abeb88b33fbe" has 1 instance(s).
Instance "xe", status READY, has 2 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "xe", status READY, has 2 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xepdb1" has 1 instance(s).
Instance "xe", status READY, has 2 handler(s) for this service...
The command completed successfully
Here is a copy of my tnsnames.ora file as it was created during the installation process:
# tnsnames.ora Network Configuration File: F:\Oracle-21c\homes\OraDB21Home2\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lenovo2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = lenovo2)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
Here is a copy of my listener.ora file as it was created during the installtion process:
# listener.ora Network Configuration File: F:\Oracle-21c\homes\OraDB21Home2\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\Oracle-21c\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\Oracle-21c\dbhomeXE\bin\oraclr.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lenovo2)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Why is it that after reinstalling 21c there are services I can connect to, but after restarting the OS they disappear?