A MSSQL Server extension that analyzes, and optimizes large T‑SQL scripts .
The Automated SQL Script Analyzer is a VSIX extension for Microsoft SQL Server that helps you:
- Detect syntax, logic, performance and security issues in long SQL scripts
- Highlight offending lines and jump straight to them
- Apply AI‑powered quick‑fixes and optimizations
- (WIP) Connect to a live database to validate schema, statistics and context
Built on .NET Framework 4.6+, this extension developed with VS 2017 (best compatible) and leverages OpenAI to deliver contextual insights and code rewrites.
- AI‑Driven Analysis
Uses OpenAI to understand query intent, detect anti‑patterns, and offer contextual suggestions. - Logical & Syntactical Error Identification
Catch both code‑level syntax mistakes (e.g. missingSET) and higher‑level logic flaws (e.g. unreliable@@ROWCOUNTusage). - Security Issue Detection
Flag potential SQL injection risks, improper permission checks, and other security anti‑patterns. - Index & Performance Recommendations
Suggest new indexes, warn about missing filters/joins, and highlight expensive scans. - Error‑Line Highlighter
Click any finding card to jump your editor cursor to the exact offending line. - Script Optimization Using AI
“Fix & Optimize” refactors selected snippets, rewriting queries for clarity, safety, and performance. - DB‑Connected Verification (WIP)
Optional live‑database connection for schema and statistics validation, adding an extra layer of context to your analysis.
- Visual Studio 2017
- .NET Framework 4.6 or higher
- OpenAI API Key
- Clone the repository
git clone https://github.com/ADHIL007/AutomatedSQLScriptAnalyzer.git



