Click or drag to resize


This topics contains an architecture overview of SQL Enlight analysis feature.

This topic contains the following sections:


SQL Enlight Analysis feature depends on several components:

SQL Parser

Parses the T-SQL code and results a XML based representation of the SQL code (SQML).

Schema Reader

Load databases and server schema, and generates XML DOM representation of it (Analysis Context).

Analysis Engine

Validates, Compiles XSLT analysis rules and applies them on the SQML and XML Analysis Context.

XSLT Extensions

Can be used by the analysis rules and provide some additional to the standard XSLT and XPATH functions as well as access to some of the internal SQL Enlight features.


The analysis goes through several steps:

  1. Parse T-SQL code, validate syntax and generate SQML.


  2. Load database context and generate Analysis Context XML.


  3. Generate XSLT template from available analysis rules expressions.

  4. Apply XSLT transformation on the SQML of each T-SQL batch using all active batch scoped analysis rules. The analysis context and rule parameters are provided to the analysis rule as XSLT variables.

  5. Apply XSLT transformation on the Analysis Context XML using all active Context Only analysis rules. The rule parameters and the analysis context are provided to the analysis rule as XSLT variables.

  6. Reports rule violations.


See Also