Unable to connect to SQL Server 2016

Issue Summary

Can not connect to SQL Server 2016 from a self-host redash

Technical details:

  • Redash Version: 8.0
  • OS: Windows Server 2019 on Azure, with feature of Nested-Virtualization enabled
  • Docker: v19.03.5
  • Chrome v79.0.3945.79
  • SQL Server: 2016 (SP2-GDR) on another remote server
  • How did you install Redash: install redash in WSL ubuntu with the docker-based installing script

Problem details

  1. Got error message on browser when try “Test Connection”, it said “DB-Lib error message 20002, severity 9: Adaptive Server connection failed”. There is no login access in SQL Server’s log.
  2. Check network access, ping ip and telnet 1433, everything is ok
  3. In container redash_server_1, installed tsql util, and tsql could connect SQL Server successfully
  4. In container redash_server_1, try connect through python, either pymssql.connect() or _mssql.connect() failed.
  5. In container redash_server_1, opened the FreeTDS dump configuration, and repeat the previous two steps. Noticed tsql and python way used different version of FreeTDS.

Questions

  1. I guess pymssql has embedded freetds in its build. Am I right? Or there is other way to tell pymssql to use a new version of FreeTDS?

  2. Since pymssql has discontinued last month, the latest version I could upgrade is 2.1.4, it won’t work. Is there a way to install pymssql 3.0?

  3. This problem does not occur on my local installation, with same redash on Windows 10 + WSL Ubuntue +SQL Server 2016. Is there other facts I didn’t notice? Or there is a workaround on this problem?

Thanks,