I am trying to connect from Windows Server 2008 R2 to remote Oracle 12. I created tnsnames.ora
MY_DSN=
(DESCRIPTION=
(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=X.XXX.XX.XX)(PORT=1521)))
(CONNECT_DATA=(SID=ORASERVER))
)
I created System DSN using 32 bits ODBC Administrator. There is "Test Connection" button in ODBC arministrator; I used to confirm what connection works.
But I failed to use this DSN from python 3.4.3 Anaconda 2.2 (32 bits)
import pypyodbc
cStr = 'DSN=MY_DSN;UID=stranger;PWD=secret'
conn = pypyodbc.connect(cStr)
I got
pypyodbc.DatabaseError: ('08004', '[08004] [Oracle][ODBC][Ora]ORA-12154:
TNS:could not resolve the connect identifier specified\n')