This discussion is archived
1 2 Previous Next 20 Replies Latest reply: Feb 12, 2012 12:43 AM by 916945 RSS

Oracle 10g XE: ORA 12154 - TNS could not not resolve connect identifier

872952 Newbie
Currently Being Moderated
Hello all,

I'm a newbie to the database world. I've downloaded Oracle 10g XE and this is working fine. I've also downloaded Microsoft SQL Server 2008 R2 Trial Version and I wish to connect it to this.

I've installed Oracle Instant Client and unzipped it in ORACLE_HOME. When I add the ODBC in Data Sources and test this I get an error: <h5>ORA 15154 - TNS could not resolve connect identifier</h5>

I've amended the listener.ora and tnsnames.ora files and also the environment varialbe TNS_ADMIN to point to /ORACLE_HOME/Network/Admin. I've also added ORACLE_HOME to the PATH variable. I've done a tnsping and lsnrctl status in the Command Line and all looks to be fine.

TNS_ADMIN: <h5>C:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN</h5>
PATH: <h5>C:\oraclexe\instantclient_11_2;C:\oraclexe\app\oracle\product\10.2.0\server\bin</h5>

My listener.ora and tnsnames.ora files are as follows:

-----
tnsnames.ora
-----
<h5>
h1.OracleXE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.66)(PORT = 1521))
(CONNECT_DATA =
(SERVER = 192.168.1.66)
(SERVICE_NAME = XE)
(HS = OK)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

XE1= (DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)
(HOST=192.168.1.66)
(PORT=1521))

(CONNECT_DATA = (SERVICE_NAME = XE)
)

(HS = OK))

</h5>
-----
listener.ora
-----
<h5>
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = HSODBC)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.66)(PORT = 1521))
)
)

DEFAULT_SERVICE_LISTENER = (XE)
</h5>

Any help would be very much appreciated. I've tried everything but no success at all.
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points