Mac版Azure Data Studio仪表盘QDS慢查询组件路径拼接错误问题
Fixing Azure Data Studio's Duplicate Path Issue for Query Store Dashboard Files
Hey, sorry you ran into this annoying path bug in Azure Data Studio! This is definitely an issue with how the insights-default extension is resolving file paths, not anything to do with your Docker-hosted SQL Server 2017 setup. Here are a few ways to fix it:
1. Correct the Extension's Configuration File (Permanent Fix)
The root cause is likely that the extension is using an incorrect absolute path instead of a relative path for its SQL files. Here's how to fix it:
- Open Azure Data Studio, click the Extensions icon on the left sidebar, and find the
Insights Defaultextension (the one referenced in your error message). - Right-click the extension and select View Extension Contents — this will open the extension's installation folder in Finder.
- Locate the
package.jsonfile, open it with a text editor like VS Code or TextEdit. - Search for entries that reference
qds_detail.sql(orqds.sql). Look for lines like"queryFile": "/some/absolute/path/sql/qds_detail.sql"— you'll want to change this to the relative path:"queryFile": "sql/qds_detail.sql". - Save the file, restart Azure Data Studio, and try adding the slow queries to your dashboard again.
2. Temporary Workaround: Copy Files to the Duplicate Path
If editing the config file feels too technical, you can "trick" Azure Data Studio by creating the duplicated path it's looking for and copying the SQL files there:
- Open Terminal on your Mac and run these commands:
# Create the duplicate folder structure mkdir -p "/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/sql" # Copy the required SQL files cp "/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/sql/qds_detail.sql" "/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/sql/" cp "/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/sql/qds.sql" "/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/Applications/Azure Data Studio.app/Contents/Resources/app/extensions/insights-default/sql/" - This will make the files exist at the path ADS is incorrectly looking for, and your dashboard should start working right away.
3. Reinstall the Extension or Azure Data Studio
If the above fixes don't work, try these nuclear options:
- Uninstall the
Insights Defaultextension, restart ADS, then reinstall it from the Extensions marketplace. - Download the latest version of Azure Data Studio, install it over your current version — the latest build might have already patched this path resolution bug.
内容的提问来源于stack exchange,提问作者borgesgj
相关产品推荐
相关产品推荐

