TSQL Plugin for SonarQube
Analyze, Benchmark, and Enforce SQL Code Quality with Continuous SonarQube Automation
TechCognia’s TSQL Plugin is a purpose-built static analysis extension for Microsoft SQL Server developers. It connects SQL Code Guard static analysis rules into your SonarQube ecosystem—eliminating manual peer review overhead, flagging anti-patterns, and safeguarding database reliability across your delivery lifecycle.
Automate SQL Quality with Confidence
Eliminate manual code review bottlenecks and establish an automated, measurable standard for database health across your engineering teams.
Automated SQL Code Reviews
Enforce strict organizational T-SQL standards and coding conventions automatically on every commit, eliminating tedious and error-prone manual peer reviews.
- Consistent rules across all database team members
- Zero manual review bottlenecks in sprint cycles
- Immediate feedback on anti-patterns and formatting
Seamless SonarQube Integration
Deploy natively into existing SonarQube infrastructure. T-SQL projects sit directly alongside Java, C#, and JavaScript applications under unified governance.
- Standard SonarQube Quality Gates and alerts
- Unified multi-language reporting under one roof
- Direct compatibility with Sonar-Runner CLI
SQL Code Guard Engine
Harness the battle-tested rules of SQL Code Guard to detect non-sargable queries, missing join conditions, deprecated syntax, and index utilization risks.
- Detect performance killers before deployment
- Comprehensive syntax security vulnerability checks
- Deterministic rule definitions and customizable severity
Continuous CI/CD Automation
Embed SQL static validation directly into your build and release workflows with MSBuild integration and automated command-line execution.
- Fail builds when high-severity rules are broken
- Track historical technical debt trends across sprints
- Export analysis reports for audit and compliance
Insightful Quality Metrics & Defect Drilldown
SonarQube translates static analysis findings into actionable engineering metrics, risk scores, and trendlines.
Most Violated Rules
Identify the recurring syntax antipatterns across your stored procedures to focus developer training on high-leverage habits.
High-Risk Resources
Pinpoint bloated tables, complex views, and recursive stored procedures that require immediate refactoring and architectural review.
Performance Hotspots
Isolate unindexed lookups, implicit conversions, and expensive wildcards that degrade production SQL Server query performance.
Trend of Issues Over Time
Quantify sprint-over-sprint progress as database code quality improves and legacy technical debt is systematically retired.
Issue Statistics & Heatmaps
Visual heatmaps uncover risk concentration, showing precisely which database modules require prioritized remediation.
File-Level Drilldown
Navigate directly to exact lines of code where violations occur, complete with remediation suggestions and severity context.
How the Analysis Pipeline Works
From your SQL repository to executive quality gates, static code validation runs automatically.
T-SQL Source Scripts
Database definitions, tables, views, triggers, and stored procedures in your repository.
SQL Code Guard Engine
Parses AST syntax trees and assesses rule compliance against industry standards.
TechCognia TSQL Plugin
Translates rule violations into SonarQube native metrics, issues, and quality measures.
SonarQube Quality Gates
Evaluates results against policy gates, blocking releases if critical thresholds fail.
Executive Dashboards
Live visualization, risk heatmaps, and continuous observability for engineering teams.
Installation & Usage Guide
Everything needed to install, configure, and execute automated T-SQL static code reviews in your environment.
Environment & System Prerequisites
Verify that your host system satisfies these compatibility standards before beginning plugin setup.
Installation & Server Activation
Follow these sequential instructions to install the plugin binary and link it to your SonarQube instance.
Copy techcognia-tsql-plugin-X.X.X.X.jar into $SONARQUBE_HOME/extensions/plugins/
Copy SQLCodeGuard.msbuild into your SQL Code Guard installation directory
Restart the SonarQube service or container to register the new plugin package
Log in as System Administrator and navigate to: Configuration > General Settings > TSQL Plugin
Set the path to SQLCodeGuard.msbuild, the path to MsBuild.exe, and paste your license key
Save settings and restart the SonarQube server once more to activate static analysis
TSQL Project Configuration
Create a sonar-project.properties file in your database repository root directory.
# ==========================================================
# SonarQube Project Analysis Configuration: TSQL Project
# Place this file as 'sonar-project.properties' in root
# ==========================================================
# Project Identification
sonar.projectKey=my-company:tsql-core-database
sonar.projectName=Core Enterprise Database
sonar.projectVersion=1.0
# Source Paths
sonar.sources=./src/sql
sonar.language=tsql
# File Encodings
sonar.sourceEncoding=UTF-8
Run Analysis & Access Results
Execute the Sonar-Runner CLI from your project root. Once analysis finishes, inspect metrics directly in SonarQube.
sonar-runner
Technical Specifications
Key metadata, runtime parameters, and supported database dialects.
| Product Family | TechCognia Enterprise Developer Tools |
|---|---|
| Target Dialect | Microsoft Transact-SQL (T-SQL) |
| Supported SQL Server Editions | SQL Server 2005, 2008, 2012, 2014, 2016, 2019, 2022 |
| Plugin Artifact Type | Java Archive (.jar) + MSBuild Integration Task (.msbuild) |
| Execution Environment | Local Command Line, CI/CD Agents, Windows Server |
| License Tier | Dual (TechCognia Terms + SQL Code Guard Attribution) |
Licensing & Software Terms
Clear, transparent licensing structure for both TechCognia modules and underlying open static analysis utilities.
TechCognia Terms & Conditions
Usage of this plugin package is governed by TechCognia’s standard enterprise software and services agreements.
Review TechCognia Legal TermsSQL Code Guard License
SQL Code Guard (2013–2014) is free to use with redistribution allowed provided license inclusion and commercial attribution remain preserved.
Visit SQL Code Guard ArchiveTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY.
Frequently Asked Questions About TSQL Plugin for SonarQube
Key answers regarding SonarQube 10.4+ compatibility, SQL Code Guard static analysis rules, and enterprise evaluation.
The TechCognia TSQL Plugin v2.1.0 is engineered for SonarQube 10.4 and newer across both Windows and Linux environments, integrating SQL Code Guard command-line static analysis directly into SonarQube quality gates.
It enforces over 120 built-in T-SQL static analysis rules covering performance anti-patterns (such as non-SARGable predicates and cursor misuse), security vulnerabilities, deprecated syntax, and enterprise naming conventions with line-level drilldowns.
You can request a 14-day trial evaluation key via our Contact page by selecting "Product Support", then drop the plugin JAR into your SonarQube extensions/plugins directory and configure the SQL Code Guard executable path.
Modernizing Database Quality or CI/CD Automation?
Whether you are migrating database architectures, integrating modern DevOps and SAFe® release governance, or exploring AI-augmented schema optimization—TechCognia’s principal architects provide hands-on, high-velocity guidance.