Skip to content

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 your predefined design and style guidelines as well as best coding practices.

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 detailed 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 by 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 the 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 the T-SQL code and highlight the syntax errors in the code editor.

  • Automated code reviews.

  • Instant access to recently executed T-SQL scripts.

  • Automatic fixes for code and database issues.

SQL Enlight supports integration with SQL Server Management Studioand Visual Studioas an Extension.

  • Development Environment IntegrationSQL Enlight integrates with Microsoft SQL Server Management Studio 17/18and Microsoft Visual Studio 2017/2019as an Extension.

  • Team Foundation Server IntegrationSQL Enlight provides a Check-in Policy Assemblies for integration with Microsoft Team Foundation Server 2017 and Azure DevOps.

  • Command Line InterfaceSQL Enlight has a command line interface which support script layout, static analysis of script files and server objects, code refactoring and report generation.

  • MSBuild SupportSQL Enlight includes MSBuildtasks tasks which are meant for supporting the continuous integration software development practice. The tasks a part of the Build Machines edition.

  • Automation APIThe SQL Enlight Automation API provides a set of interfaces for developing custom tools for static analysis, refactoring and code formatting. The API assembly is a part of the Build Machines edition.

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

SQL Enlight comes in two editions - SQL Enlight for Developers and SQL Enlight for Build Machines.

This edition is meant for developers and database professionals who work with SQL Server and T-SQL.

The includes and IDE extensions, which integrates with Visual Studio and SQL Server Management Studio, and provides a set of features that enhance the work with SQL Server and T-SQL code.

The extension supports the following features:

  • Code Formatting

  • Refactoring

  • Code and Database Analysis

  • Automatic Code and Database Fixes

  • TFS Check-in Policies

  • Script Summary

  • Script Outline

  • Statement History

Besides the VS and SSMS extension, the Developers edition includes a command line interface that supports Code and Database Analysis, Refactoring and Code Formatting features.

The Build Machines edition is meant to work with CI/CD pipelines and to be used on servers, build machines and by build agents.

The edition includes command line interface, MSBuild tasks and Automation API, which support the following features:

  • Code Formatting

  • Refactoring

  • Code and Database Analysis