Jump to content

Issue connecting to TIBCO Data Virtualization using Python pyodbc


Andrew Malara

Recommended Posts

I'm trying to connect to TIBCO Data Virtualization using Python pyodbc. I've installed the drivers following the documentation instructions, created a DSN and have been able to successfully test the connectivity using my DSN with the driverConfig utility and unixODBC with the isql command. However Python pyodbc is throwing the error below on the connect method:

 

conn = pyodbc.connect("DSN=MyDsn")

Error: ('08S01', '[08S01] [unixODBC]Unknown host "" (1000) (SQLDriverConnect)')

 

My environment is running Red Hat Enterprise 7.3, Python 3.3 (Anaconda 4.3)

Link to comment
Share on other sites

  • 4 weeks later...

this sounds very similar to the issue we are currently experiencing with a GO (lang) application running in Linux.  Even though we have configured the ODBC and successfully tested with the isql utility, GO cannot connect, using unixODBC.  :(

 

Numerous sites and forums have suggested, for other DB drivers, to switch the "UTF setting" to 16 bit, as opposed to 8 bit, but I do not know how to do that with TDV.  :(

 

 

Link to comment
Share on other sites

  • 3 weeks later...

update: We determined that the issue was GO lang SQL libraries requiring a UTF-16 driver to work. This was easily testable/demonstratable by using the iusql unixODBC tool which failed with a similar error.

We reported this to TDV support and received this response:

"Engineering has updated that their investigation showed that the ODBC driver does not have adequate functionality for UTF. This is the reason why the locale=utf-16 setting is not working. They also found that a significant amount of work will be needed to implement the functionality. In view of this, this will be a long-term fix."

Link to comment
Share on other sites

  • 7 months later...

You should be able to connect to TDV using Python. Please find the below sample script for the same. Hope this will help.

 

 

 

import pyodbc
conn = pyodbc.connect("DSN=DSNNAME")
conn.setdecoding(pyodbc.SQL_CHAR, encoding='utf-8')
conn.setencoding(encoding="utf-8")
cur = conn.cursor()
cur.execute("select * from TABLENAME")
row = cur.fetchall()
print(row)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...