Cannot connect my superset to sql server.
Tried the following URIs-
- mssql+pymssql://###:$$$@RS004\S16:1433/TLH_Dev
- mssql+pymssql://###:$$$@RS004\S16:1433/TLH_Dev/?charset=utf8
- mssql+pyodbc://###:$$$@RS004\S16:1433/TLH_Dev
- mssql://###:$$$@RS004\S16:1433/TLH_Dev
Expected results
Connection to the SQL Server
Actual results
It shows: For the first two URIs-
- 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
Environment
- superset version:
0.35.2 - python version:
3.6 - node.js version:
node -v - npm version:
npm -v
Checklist
- [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version of superset.
- [x] 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!!
Anyone has any idea about what can solve this? I have literally tried almost everything.
@mistercrunch
@Neel-rishabhsoft I can probably help, feel free to reach out on Slack.
@villebro I'd love to join your slack channel to stay in touch. How do I go about it?
There's the badge on the README.md on the github repo, here's the direct link: https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU
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:[email protected]: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.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
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