SQLGuardian for SSMS Gallery feed (extension)

Analyze the active T-SQL script with SQLGuardian and show findings in the Error List. Double-click a finding to jump to the line. Uses the same RuleEngine as the CLI.

▼ Download
Author
SQLGuardian
Version
0.1.10
Updated
3 months ago
Tags
SQL, T-SQL, SSMS, Static Analysis, SQLGuardian
Supports
SSMS 21 SSMS 22

SQLGuardian for SSMS

Catch risky or expensive T-SQL before it runs — then review the rest of your script in the familiar Error List.

SQLGuardian works inside SQL Server Management Studio 21+. It uses the same deterministic rules as the sqlguardian CLI: no AI guesses, same findings every time.

Who you areWhat you get
DeveloperStatic analysis in the Error List, double-click to jump to the line, keyboard shortcut
Data analystWarnings about SELECT *, large tables, and costly patterns before a query hammers production
Business analystA safety net before Execute: missing WHERE on updates/deletes, and large-table / large-join prompts

Install (about 2 minutes)

  1. Download the latest .vsix.
  2. Close SSMS completely.
  3. Install with the SSMS VSIX installer (not the Visual Studio one):
"%ProgramFiles%\Microsoft SQL Server Management Studio 21\Release\Common7\IDE\VSIXInstaller.exe" SQLGuardian.Ssms.Extension.vsix
  1. Open SSMS again.

If double-clicking the .vsix opens Visual Studio and fails, use the command above instead.


How to use it

Analyze the script you are editing

  1. Open a query window (.sql).
  2. Press Ctrl+Shift+G, or choose Tools → SQLGuardian — Analyze Active Script (Error List).
  3. Open View → Error List if it is not visible.
  4. Double-click any finding to jump to that line.

Clear previous results anytime with Tools → SQLGuardian — Clear Findings.

Severity in Error ListTypical meaning
ErrorHigh / critical issue — fix or confirm before relying on the script
WarningPerformance, style, or risk pattern worth reviewing

Analyze automatically after Execute

By default, after F5 / Query → Execute, SQLGuardian re-analyzes the script and refreshes the Error List.

Turn this on or off under Tools → Options → SQLGuardian → Analysis.

Stop dangerous or expensive Execute (guards)

Before Execute runs, SQLGuardian can interrupt risky actions. You choose Cancel or continue.

GuardWhen it appearsWhy it matters
Missing WHEREUPDATE or DELETE with no WHERECan change or wipe an entire table
Large SELECTUnbounded SELECT / SELECT * on a large tableCan lock, flood the network, or freeze SSMS
Large JOINJoin involving a large tableCan explode row counts and run for a long time

Selection tip: If you highlight a statement and press F5, SSMS (and SQLGuardian) only look at the selection. With nothing selected, the whole window is checked — so a leftover SELECT * above your UPDATE can still trigger a large-read warning.

Schema-aware guards (row counts) use your active SSMS connection. If that is unavailable, set a fallback under Tools → Options → SQLGuardian → Connection.

Large-join dialogs can optionally offer Apply NOLOCK (off by default). That can allow dirty reads; treat it as an advanced escape hatch, not a best practice.


What kinds of issues it finds

Examples (not a full list):

  • SELECT *
  • UPDATE / DELETE without WHERE
  • Leading wildcards in LIKE ('%text')
  • CROSS JOIN, cursors, TOP without ORDER BY
  • Other performance and safety rules documented in the rules catalog

Findings always point at a file + line so you can fix or discuss the exact statement.


Settings at a glance

PathWhat it controls
Tools → Options → SQLGuardian → AnalysisAnalyze after Execute; execute-guard toggles and thresholds
Tools → Options → SQLGuardian → ConnectionFallback server/database when the active connection is missing
Tools → Options → Environment → KeyboardRemap Ctrl+Shift+G (SQLGuardian.AnalyzeActiveScript)

Extension vs companion app

CapabilityThis SSMS extensionWPF companion
Analyze active scriptYes — Error ListYes — own results grid
Jump to line in SSMSYesOpens the file externally
Folder / catalog scanComing laterYes today
InstallVSIX (this page)Separate exe / External Tools

Build from source (contributors)

scripts\ssms\pack-vsix.cmd

Output: artifacts\SQLGuardian.Ssms.Extension.vsix
Requires Visual Studio 2022 (MSBuild) and the .NET 9 SDK (bundled CLI).


Feedback