I am connecting Oracle 10 XE with an SQL server 2008 using ODBC in windows 7.
I have successfully done following steps:
- Configured ODBC and test it, runs ok!
- Configured listener in tnsnames.ora and listener.ora
- Started listener from command prompt
- Created database link from interface SQL command line
After creating database link, when i issue a query to SQL server an error is returned: ORA-12154: TNS:could not resolve the connect identifier specified.
Below are the contents of *.ora files:
***************************** listener.ora *****************
LISTENERSQLSERVERDSN =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
SID_LIST_LISTENERSQLSERVERDSN=
(SID_LIST=
(SID_DESC=
(SID_NAME=SQLSERVERDSN)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM=hsodbc)
)
)
************************tnsnames.ora************
SQLSERVERDSN =
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))
(CONNECT_DATA=
(SERVER=DEDICATED)
(SID_NAME= SQLSERVERDSN))
(HS=OK)
)
*********************sqlnet.ora***********
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
Please help since i have tried almost every solution found.
thanks,