I've had it. I just can't get this to work. I installed Oracle XE 21c on my Windows 10 desktop. The installation went ok, once I ran the Setup file as an administrator. I basically chose all the defaults.
So now it is running, and there was a default database XE create for me. But I get this when attempting to connect as SYSTEM using SQLPlus:
SQL*Plus: Release 21.0.0.0.0 - Production on Mon Nov 1 19:08:25 2021
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Enter user-name: SYSTEM
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
I looked and there is no tnsnames.ora or listern.ora file, so I attempted to create them, though I am not sure they are correct.
C:\app\sysde\product\21c\dbhomeXE\network\admin\listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
C:\app\sysde\product\21c\dbhomeXE\network\admin\tnsnames.ora
LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
XE = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
I then stopped the listener as follows lsnrctl stop
which yielded this:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 61: Unknown error
The listener OracleOraDB21Home1TNSListener is no longer running in services.msc. When trying to restart it I get this...
Error 2: The system cannot find the file specified.
My environment variables are:
ORACLE_HOME=C:\app\sysde\product\21c\dbhomeXE\
TNS_ADMIN=C:\app\sysde\product\21c\dbhomeXE\network\admin
I know there are numerous "Can't connect to Oracle" posts. I've tried bits and pieces of them, but none are really suited to my situation and the parts I've tried simply haven't helped. Any suggestions you have to allow me to use the default XE database and connect to it through a GUI such as SQL Developer would be tremendously helpful.