question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot connect my superset to sql server.

See original GitHub issue

Tried the following URIs-

  1. mssql+pymssql://###:$$$@RS004\S16:1433/TLH_Dev
  2. mssql+pymssql://###:$$$@RS004\S16:1433/TLH_Dev/?charset=utf8
  3. mssql+pyodbc://###:$$$@RS004\S16:1433/TLH_Dev
  4. mssql://###:$$$@RS004\S16:1433/TLH_Dev

Expected results

Connection to the SQL Server

Actual results

It shows: For the first two URIs-

  1. ERROR: {“error”: “Connection failed!\n\nThe error message returned was:\n(pymssql.InterfaceError) Connection to the database failed for an unknown reason. (Background on this error at: http://sqlalche.me/e/rvf5)”, “stacktrace”: "Traceback (most recent call last):\n File "src\pymssql.pyx", line 636, in pymssql.connect\n File "src\_mssql.pyx", line 1957, in _mssql.connect\n File "src\_mssql.pyx", line 677, …

And for the other two URIs- 2. ERROR: {“error”: “Connection failed!\n\nThe error message returned was:\n(pyodbc.InterfaceError) (‘IM002’, ‘[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)’) (Background on this error at: http://sqlalche.me/e/rvf5)”, “stacktrace”: "Traceback (most recent call last):\n File "D:\superset\venv\lib\site-packages\sqlalchemy\engine\base.py", line 2228, in _wrap_pool_connect\n return fn()\n File "D:\superset\venv\lib\site-packages\sqlalchemy\pool.py", line 374, in unique_connection\n return

Screenshots

error

Environment

  • superset version: 0.35.2
  • python version: 3.6
  • node.js version: node -v
  • npm version: npm -v

Checklist

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

I have installed pymssql, pyodbc, mssql, in my environment and the even tried downgrading the sql alachemy. But nothing seems to work… Please help!!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
eugeniamzcommented, Apr 8, 2020

This are the steps that I used to connect to MS SQL in Azure :

1 - URI for MSSQL Azure needs the database name after the user name for example : User Name : UserName Password : TestPassword Database : presetSQL.database.windows.net Schema : TestSchema Port : 1433

The URI should be mssql+pymssql://UserName@presetSQL:TestPassword@presetSQL.database.windows.net:1433/TestSchema

2- Pass TDS version as parameter. In “Extra” Section modify engine_parameters as follow : { “metadata_params”: {}, “engine_params”: {“connect_args”: {“tds_version”: “7.0”}}, “metadata_cache_timeout”: {}, “schemas_allowed_for_csv_upload”: [] }

@villebro gave me the tips 😃 maybe it helps you too.

0reactions
rumbincommented, Apr 20, 2022

I am facing the same challenges and unfortunately, the above information does not help me get the MS SQL Server connection to a named instance running.
Any help would be appreciated.

Slack question: https://apache-superset.slack.com/archives/C024WU9LT54/p1650446971125369

Read more comments on GitHub >

github_iconTop Results From Across the Web

Superset cannot connect to my MSSQL database
on my virtual machine (RHEL, Linux 7.2-11), I cannot add my MSSQL database in the configuration page. Obviously, with my user, password, host, ......
Read more >
Cannot connect my superset to sql server. #9475 - GitHub
I have installed pymssql, pyodbc, mssql, in my environment and the even tried downgrading the sql alachemy. But nothing seems to work.. Please ......
Read more >
Microsoft SQL Server - Apache Superset
The recommended connector library for SQL Server is pymssql. The connection string for SQL Server looks like this: mssql+pymssql://<Username>:<Password>@< ...
Read more >
Apache Superset MSSQL Connect (SQL Server 2014+)
... you can connect MSSQL Server 2014 to Apache Superset. Though not fully tested on other versions of MSSQL Server, I am pretty...
Read more >
How to install Apache Superset locally on Windows with ...
This article will cover steps to locally install superset on Windows with DB drivers for MS SQL Server, Dremio, MySQL and Pyodbc. While ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found