Search code examples
pythonfreetdspymssql

Where is FreeTDS installed when I download pymssql on windows?


I am having trouble connecting pymssql to my local instance of MSSQL, and would like to use the tsql debugging command that is included with FreeTDS. However, I am unable to find where it FreeTDS is installed. As far as I know, it comes pre-compiled with pymssql on windows, I just don't know where it is.

More info:


Solution

  • AKAIK, pymssql for Windows doesn't come bundled with FreeTDS. If anything, IIRC, it uses the Windows SQL Server driver. To use FreeTDS instead, you'd have to download and install it:

    http://sourceforge.net/projects/freetdswindows/

    By default, the latest version will install to c:\freetds-0.95rc2

    Please see my above comment as well. I'll amend this answer if necessary with more information. Good luck!

    UPDATE:

    You can connect to SQL Server if you're on Windows using the native drive through pyodbc like this:

    DRIVER={SQL Server};SERVER=yourserver;PORT=1433;DATABASE=yourdb;UID=dbuser;PWD=dbpassword
    

    You may have better luck with that if the FreeTDS installation doesn't work for you.