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:
Parses the T-SQL code and results a XML based representation of the SQL code (SQML).
Load databases and server schema, and generates XML DOM representation of it (Analysis Context).
Validates, Compiles XSLT analysis rules and applies them on the SQML and XML Analysis Context.
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:
Parse T-SQL code, validate syntax and generate SQML.
Load database context and generate Analysis Context XML.
Generate XSLT template from available analysis rules expressions.
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.
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.
Reports rule violations.