microsoft / microsoft/vscode-mssql

[Feature Request]: Add "Default" Connection functionality

Open
#18,912 5 comments 4 reactions 0 assignees View on GitHub
Area - Connection Enhancement Triage: Done Under evaluation
Dominant language
TypeScript
Stars
1.9k
Forks
610
Avg merge
2d 3h
Merged PRs (30d)
97

Description

Having to select the connection against which to run a query after opening a `.sql` file is quite repetitive, It would be great if I could set a default connection for my project. For example, I could have a file "mssql.json" in the ".vscode" folder where I can set my default connection that will be used automatically and without ask when I click or the "Run" button. Then there could be another "Run" button, called "Run with ad-hoc connection" that would work is it is today, asking me which connection to use before running the query.

Here's an idea:

![Image](https://github.com/user-attachments/assets/73c6892c-8078-4d71-8917-c52a196917ba)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the requested .vscode/mssql.json configuration and the existing Run button behavior described in the issue. Define how a project default connection is selected and how the separate ad-hoc connection action should preserve the current prompt-based behavior; done means both actions follow those distinct connection flows.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript
Domain
database, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.