0
votes

I have 2 machines setup:

  1. RDP terminal with timesten client 11.2.1 and pyodbc==3.0.7 and works great. I use this connection string:

    cnxn = pyodbc.connect('DSN=myhostip;UID=myusername;PWD=mypass')

  2. local machine with timesten client 11.2.2 and pyodbc==4.0.22 (I've also tried older versions, like 3.0.7) and when I use the connection string: cnxn = pyodbc.connect('DSN=myhostip1;UID=myusername1;PWD=mypass1') I get this error: pyodbc.Error: ('HY010', u'[HY010] [Microsoft][ODBC Driver Manager] The driver is incapable of supporting the current environment attributes. (0) (SQLDriverConnect)').

Both databases on both machines are practically the same, so difference is only in timesten driver version. Or what else could be the problem? I have set up DSNs on both machines, and I connect to them in SQLDeveloper.

I've tried different timesten clients and pyodbc versions, but got same error everytime. It's the only way that I know of to connect to timesten DB, can anyone please help me solve this error, or maybe tell about another way,except pyodbc, to connect?

1
Depending what you're doing, the cx_Oracle interface may be usable, though this isn't a tested configuration.Christopher Jones
Yes, I use cx_Oracle for connection to other databases, but not timesten database, could you please tell me how? I've tried this way: conn= cx_Oracle.connect('user','pass','17.1.17.1:53397'), but got error: cx_Oracle.DatabaseError: ORA-12547: TNS:lost contact. I guess I need to indicate path to/ or name of timesten driver in arguments?povar
I've managed to connect to timesten database via jaydebeapi: conn = jaydebeapi.connect("com.timesten.jdbc.TimesTenConnection","jdbc:timesten:client:dsn=myhost",{'user': "SA", 'password':"mypass"},"c:\TimesTen\tt1122_64\lib\ttjdbc5.jar",)povar

1 Answers

0
votes

See this answer on how to connect to TimesTen via Python: python access to TimesTen

Use cx_Oracle via tnsnames.ora as this is the method that Oracle will support in TimesTen 18.1.3

Please avoid using any ODBC based method to connect to Python as none of these techniques are developed or tested by Oracle.