0

I'm trying to connect to an oldschool jTDS ms server for a variety of different analysis tasks. Firstly just using Python with SQL alchemy, as well as using Tableau and Presto.

Focusing on SQL Alchemy first at the moment I'm getting an error of:

Data source name not found and no default driver specified

With this, based on this thread here Connecting to SQL Server 2012 using sqlalchemy and pyodbc

i.e,

import urllib
params = urllib.parse.quote_plus("DRIVER={FreeTDS};"
                                 "SERVER=x-y.x.com;"
                                 "DATABASE=;"
                                 "UID=user;"
                                 "PWD=password")

engine = sa.create_engine("mssql+pyodbc:///?odbc_connect={FreeTDS}".format(params))

Connecting works fine through Dbeaver, using a jTDS SQL Server (MSSQL) driver (which is labelled as legacy).

Curious as to how to resolve this issue, I'll keep researching away, but would appreciate any help.

I imagine there is an old drive on the internet I need to integrate into SQL Alchemy to begin with, and then perhaps migrating this data to something newer.

Appreciate your time

LeCoda
  • 538
  • 7
  • 36
  • 79
  • 1
    That error typically means your ODBC driver isn't installed, or your connection string is messed up. Try the Microsoft-supported ODBC drivers: https://learn.microsoft.com/en-us/sql/connect/odbc/microsoft-odbc-driver-for-sql-server?view=sql-server-ver15 – David Browne - Microsoft Jun 25 '20 at 02:36
  • WIll try that. The drivers are installed as dbeaver is working fine though @DavidBrowne-Microsoft . I think it's to do with it being a jTDS oldschool driver? Thanks – LeCoda Jun 25 '20 at 04:45
  • 1
    I don’t think that jTDS, and the FreeTSD ODBC driver are not the same thing. – David Browne - Microsoft Jun 25 '20 at 11:21
  • @DavidBrowne-Microsoft Sure, I'll see if there's a driver for jTDS online that works with SQLalchemy, do you have any recommendations? – LeCoda Jul 01 '20 at 01:02
  • @MichaelHolborn a couple of quick searches gave this: https://stackoverflow.com/questions/55376100/create-a-jtds-connection-string-in-python it shows the entire setup as well. Did you try that? – Nagaraj Tantri Jul 06 '20 at 00:43

0 Answers0