Add SSMS-compatible connection settings support#193
Merged
Conversation
Co-authored-by: ErikEJ <[email protected]>
Co-authored-by: ErikEJ <[email protected]>
Copilot
AI
changed the title
[WIP] Add option to specify connection settings in SQL Query Stress
Add SSMS-compatible connection settings support
Oct 24, 2025
Owner
|
@erikdarling Not too shabby! |
ErikEJ
requested changes
Oct 24, 2025
There was a problem hiding this comment.
Pull Request Overview
This PR adds SSMS-compatible connection settings support to SQL Query Stress to ensure consistent query execution behavior between the tool and SQL Server Management Studio. The key missing setting was ARITHABORT ON, which could cause different execution plans and performance characteristics.
Key Changes:
- Created
ConnectionSettingsHelperclass to automatically apply SSMS-compatible connection settings using aStateChangeevent handler pattern - Updated all
SqlConnectioninstantiation points across 5 files to attach the event handler - Configured both GUI and CLI projects to include
querysettings.sqlfile in build output
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/SQLQueryStress/ConnectionSettingsHelper.cs | New helper class implementing thread-safe lazy loading of SQL connection settings from file with SSMS-compatible defaults |
| src/SQLQueryStress/LoadEngine.cs | Added event handler attachment at 3 connection creation points (command execution, pool init, worker threads) |
| src/SQLQueryStress/ParamWindow.cs | Attached event handler for parameter query connections |
| src/SQLQueryStress/DatabaseSelect.cs | Attached event handler for database listing connections |
| src/SQLQueryStress/ConnectionInfo.cs | Attached event handler for connection testing |
| src/SQLQueryStress/SQLQueryStress.csproj | Configured to copy querysettings.sql to output directory |
| src/SqlQueryStressCLI/sqlstresscmd.csproj | Configured to copy querysettings.sql and link ConnectionSettingsHelper.cs |
| README.md | Added documentation for connection settings feature and customization instructions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…eptions, extract constant Co-authored-by: ErikEJ <[email protected]>
Contributor
Author
ErikEJ
approved these changes
Oct 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All requested changes have been implemented. The solution now:
Original prompt
Fixes #191
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.