MSSQL MCP DescribeTable tool only works with SQL Server 2017 (14.x) and later
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
Research direction
Start at the MSSQL MCP DescribeTable implementation and inspect the query using STRING_AGG. Reproduce the failure against a database with compatibility level below 140, then determine whether the tool should support that level and verify the chosen behavior against an older SQL Server compatibility setting.
Written by the indexing model from the issue text.
Description
MSSQL MCP DescribeTable tool fails with error
{"success":false,"error":"Incorrect syntax near \u0027(\u0027."}
when used with an old SQL server version (or, in my case, a database with a compatibility level lower than 140).
This happens because the STRING_AGG SQL function, which is used in the implementation of DescribeTable, was only introduced in SQL Server 2017 (14.x).
There are other approaches that accomplish the same thing and also work with older version of SQL server, but probably it's not worth it to introduce such a workaround for such old versions.
I was able to work around this issue by increasing the compatibility level of my local database:
alter database current set compatibility_level = 160;
- Dominant language
- HTML
- Stars
- 331
- Forks
- 208
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure-Samples/SQL-AI-samples
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
Azure-Samples/SQL-AI-samples#90 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Azure-Samples/SQL-AI-samples#79 · 6 reactions ·
All issues in Azure-Samples/SQL-AI-samples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenLiberty/open-liberty#35839 ·
-
affects-9.0 found-by-ai may-affects-25.10 may-affects-26.3 may-affects-26.9 may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major sig/execution type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
antlr/grammars-v4#5014 · 1 comment ·
-
comp-query-execution fuzz
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121303 · 3 comments ·