Getting started

SQL Enlight is a refactoring and static code analysis tool for SQL Server.
It offers a fast, automated way to ensure that your T-SQL source code fits to your predefined design and style guidelines as well as best coding practices.

This topic contains the following sections:

Code and Database Analysis

SQL Enlight database analysis features are very similar to performing
static analysis to detect and correct defects in managed code. The advantage
is that SQL Enlight can make use of the dynamic management information provided
by SQL Server in order to provide more detail and accurate analysis results, and
to be used to monitor the health of a server instance, diagnose problems, and
tune performance.

Database developers and administrators can easily implement define and develop
custom rules with just using XPath and XSLT. The analysis rules can utilize the
following information to identify query performance pitfalls, index
fragmentation issues, missing or not used index cases, and missing column and
index statistics: dynamic management views and functions, existing indexes,
statistics and query plans.


Code refactoring is the process of
changing a computer program’s source code without modifying its external
functional behavior in order to improve readability, maintainability,
extensibility or reduce complexity of the source code.

SQL Enlight has several features which can automate T-SQL code refactoring:
layout code to improve readability, extract parts of the large script in new
stored procedures or functions, and generate script summary or outline in order
to identify components and statements in large T-SQL scripts.


Besides the analysis and
refactoring features, the tool provides several features which can improve
developers experience, facilitate and accelerate their work with SQL Server and
T-SQL code.

Validate T-SQL script and highlight the syntax errors in the code editor.

Automated code reviews.

Instant access to recently executed T-SQL scripts.

IDE and Continuous Integration

SQL Enlight supports integration
with SQL Server Management Studio and Visual Studio as an add-in, includes
command line version and MSBuild tasks.

  • Development Environment Integration

    SQL Enlight integrates with
    Microsoft SQL Server Management Studio 2005/2008/2012/2014/16/17/18 and
    Microsoft Visual Studio 2005/2008/2012/2013/2015/2017/2019
    as Add-in.

  • Team Foundation Server Integration

    SQL Enlight provides a Check-in Policy Assemblies for integration with Microsoft Team Foundation Server 2008/2010/2012/2013/2015/2017 and Azure DevOps.

  • Command Line Interface

    SQL Enlight comes with command line
    tool which support script layout, static analysis of server objects and report

  • Continuous Integration/Automated Build Support

    SQL Enlight includes MSBuild and
    NAnt tasks which are meant for supporting the continuous integration software
    development practice.

For information how to use the product, please read the topic Working with SQL Enlight.