T-SQL Analyzer Gallery feed (extension)

T-SQL Analyzer that analyzes your T-SQL scripts for design, naming and performance issues using more than 140 rules.

▼ Download
Author
ErikEJ
Version
1.0.1155.0
Updated
4 days ago
Tags
SQL;T-SQL;Analyzer;SQL Server
Supports
VS 2022 VS 2026 VS 2022 (ARM64) VS 2026 (ARM64)

Validation

  • The source icon is 90x90px. For best results, use 128x128 pixels or larger. Larger images are supported but are never displayed above 128x128 pixels.
  • Most of the icon has low contrast on dark backgrounds and may be difficult to see in Visual Studio's dark themes.
See validation guidelines

T-SQL Analyzer & SQL Server Rules

MCP Toplist

build status latest version GitHub Sponsors

Catch T-SQL design, naming, and performance issues as you type, when you build, or from the command line. T-SQL Analyzer brings over 140 SQL best-practice rules to SQL Server and Azure SQL developers.

Try before you install! Open the demo web app and paste a T-SQL script to see the analysis findings. No installation required; scripts are analyzed only, never executed or stored.

You don't need a SQL Database project to get started - the live analyzers work with standalone SQL scripts too. All tools use the same core rule set.

Choose how you work

Where you workWhat you getGet started
Visual StudioLive feedback in the Error List while editing SQL scriptsInstall extension · Setup and options
SQL Server Management StudioLive feedback in the Error List while editing SQL scriptsInstall extension · Setup and options
VS CodeLive squiggles and diagnostics in .sql filesInstall extension · Setup and options
SQL Database projects / CICheck rules during buildsBuild-time setup
Command lineAnalyze scripts, folders, .dacpac files, or live databasesCLI quick start
GitHub Copilot ChatAsk Copilot to analyze SQL using the MCP serverCopilot setup

Get live feedback in your editor

  1. Install the .NET 10 SDK or later.
  2. Install the T-SQL Analyzer extension for your editor using the links above.
  3. Open a SQL script and start editing - analysis runs automatically, with no build step required.

The extensions download the analyzer tooling automatically; no separate CLI or rules package installation is needed. Customize enabled rules and the target SQL Server version in Tools > Options (Visual Studio / SSMS) or Settings (VS Code). See each extension's setup guide for details.

For Visual Studio, a CI build is also available.

Check rules during project builds

Add ErikEJ.DacFX.SqlServer.Rules to your SQL Database project to report issues during local and CI builds.

Build-time checks complement live feedback by checking your SQL project as part of your build workflow.

Analyze from the command line

With the .NET 10 SDK or later installed:

dotnet tool install --global ErikEJ.DacFX.TSQLAnalyzer.Cli
tsqlanalyze -i C:\scripts\sproc.sql
tsqlanalyze -i C:\scripts\database.dacpac -o results.json

Use the CLI for one-off checks or automation, with console, XML, or JSON output. See the CLI guide for folder and live database analysis, rule filters, and more examples.

Use with GitHub Copilot

The analyzer also runs as an MCP server, letting GitHub Copilot Chat use the rules to analyze your SQL code in VS Code or Visual Studio. This is separate from automatic live editor feedback.

The VS Code extension includes the MCP server integration - start T-SQL Analyzer from the MCP server list to enable it. For standalone MCP installation in either editor, see the MCP setup guide.

Explore and customize the rules

Browse the rule catalogue for explanations and examples. You can disable individual rules or groups and promote selected warnings to errors; configuration instructions are linked above for each tool.