While at a client the installation of Oracle XE set the host to my computer name which included a sub-domain that would not resolving because I was on the client network. This was causing an ORA-12545 error (Connect failed because target host or object does not exist) which was resolved by change the host name to 127.0.0.1 in C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora and C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora
Next I encountered an ORA-12514 error (listener does not currently know of service requested in connect descriptor) that took me awhile to figure out. I finally found the answer in this thread. Turns out the XE service needs to be registered by adding the following SID_DESC to the SID_LIST in C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora
1 2 3 4
(SID_DESC = (SID_NAME = XE) (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) )
Here is the complete C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = CLRExtProc) (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = XE) (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) ) DEFAULT_SERVICE_LISTENER = (XE)