- Command Line Tool (enlight.exe)
- Analyze command
- Layout command
- Configure command
- License command
- Context command
Command Line Tool (enlight.exe)
Usage:
enlight.exe <command> [<parameters>] [ /quiet | /q ] [ /nologo ] enlight.exe <command> /help | /h | /? enlight.exe /help | /h | /?General:
Parameter | Description |
|---|---|
/quiet or /q | Suppress all output messages. |
/nologo | Suppresses the tool copyright message from displaying. |
/help or /h | Displays command syntax and options for the tool. |
For information commands and parameters usage, use "enlight.exe -help" or "enlight.exe -help <command>".
Commads:
analyze layout analysiscontext configure license
Analyze command
Analyze T-SQL script files and SQL Server stored procedures, functions and triggers.
Usage:
Target SQL Server objects.
enlight.exe analyze
/targettype:serverobjects | /tt:serverobjects
[ /server:<servername> ]
[ /database:<databasename> ]
[ /user:<username> /password:<password> ]
/objecttype:<objecttype>
/objectname:<objectname>
[ /rules:<rules> ]
[ /parametersfile:<parametersfile> ]
[ /report:<reportpath> | /r:<reportpath> ]
[ /template:<analysistemplatefile> |/t:<analysistemplatefile>]
Target T-SQL script files.
enlight.exe analyze
/targettype:files | /tt:files
/inputpath:<path> | /i:<path>
[ /rules:<rules> ]
[ /parametersfile:<parametersfile> ]
[ /report:<reportpath> | /r:<reportpath> ]
[ /contextfile:<contextfilepath> |/cf:<contextfilepath>]
[ /template:<analysistemplatefile> |/t:<analysistemplatefile>]
Parameters:
Parameters | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
/server:<servername> | Target SQL Server name. Optional. | ||||||||||||||||||||
/database:<databasename> | Target database name. Can be omitted if Server or ServerTrigger object types are used. Default database is "master". | ||||||||||||||||||||
/user:<username> | Username for accessing the database. Optional. If omitted integrated security will be used. | ||||||||||||||||||||
/password:<password> | User password for accessing the database. Optional. If omitted integrated security will be used. | ||||||||||||||||||||
/objecttype:<objecttype> | Type of the objects that will be analyzed. The allowed object types are:
| ||||||||||||||||||||
/objectname:<objectname> |
Single-part delimited name for servers,databases and triggers ([object_name]). | ||||||||||||||||||||
/rules:<rules> | ';' or ',' separated list of rule names or analysis group names. If omitted the current SQL Enlight settings will be used. | ||||||||||||||||||||
/parametersfile:<parametersfile> | Path to a XML file containing the values for the analysis rules parameters. Check Schemas\AnalysisParameters.xsd for the parameters file XML schema. | ||||||||||||||||||||
/report:<reportpath> or /r:<reportpath> | Target output file for the analysis XML report. | ||||||||||||||||||||
/inputpath:<path> or /i:<path> | Location of the T-SQL script files that to be analyzed. | ||||||||||||||||||||
/contextfile:<contextfilepath> or /cf:<contextfilepath> | Path to an analysis context file which to be used for analyzing the tagret script files. | ||||||||||||||||||||
/template:<analysistemplatefile> |/t:<analysistemplatefile> | Optional parameter for setting external analysis template. The external template will be used as a source for the analysis rules instead of the default template. |
Examples:
Analyze all stored procedures in MyDatabase using the analysis rules selected in the current analysis template and create xml report.
enlight.exe analyze
/tt:serverobjects
/database:MyDatabase
/objecttype:storedprocedure
/objectname:*
/rules:sa001,sa030,sa033
/r:"C:\MyAnalysisReports\MyDatabaseReport.xml"
Analyze T-SQL script files using specific analysis rules and create xml report.
enlight.exe analyze
/targettype:serverobjects
/server:.
/database:AdventureWorks
/objecttype:database
/objectname:AdventureWorks
/rules:ex0018,Design,Performance
/template: "C:\Program Files\Ubitsoft\SQL Enlight\Templates\Analysis\DefaultTemplate.xml"
/parametersfile: "C:\Program Files\Ubitsoft\SQL Enlight\Xml\AnalysisParameters.xml"
/report: "E:\Projects\MyProject\Build\Reports\AdventureWorks_Database_AnalysisReport.xml"
Analyze target T-SQL script files and using specific analysis rules and create xml report.
enlight.exe analyze
/targettype:files
/inputpath:"E:\Projects\MyProject\SQL Script\AdventureWorks.sql"
/rules:ex0018,Design,Performance
/template: "C:\Program Files\Ubitsoft\SQL Enlight\Templates\Analysis\DefaultTemplate.xml"
/parametersfile: "C:\Program Files\Ubitsoft\SQL Enlight\Xml\AnalysisParameters.xml"
/context: "E:\Projects\MyProject\Build\Context\AdventureWorks.xml"
/report: "E:\Projects\MyProject\Build\Reports\AdventureWorks_Script_AnalysisReport.xml"
Layout command
Layout T-SQL script files.
Usage:
enlight.exe layout
/inputpath:<inputpath> |/i:<inputpath>
/outputpath:<outputpath> | /o:<outputpath>
[ /template:<layouttemplate> | /t:<layouttemplate> ]
Parameters:
Parameter | Description |
|---|---|
/inputpath:<inputpath> or /i:<inputpath> | Location of the T-SQL script files. |
/outputpath:<outputpath> or /o:<outputpath> | Destination folder for the result files. |
/template:<layouttemplate> or /t:<layouttemplate> | Optional. Exact name or path to the file of the layout template which to be used. |
Examples:
Reformat T-SQL files in specified input folder and create output files in specified folder using given layout template.
enlight.exe layout
/i:"c:\sourcepath\*.sql"
/o:"c:\sourcepath\reformated\"
/t:"Ubitsoft Favorite 1"
enlight.exe layout
/template: "C:\Program Files\Ubitsoft\SQL Enlight\Templates\Layout\Ubitsoft Favorite 1.layouttemplate"
/inputpath: "E:\Projects\MyProject\SQL Script\*.sql"
/outputpath: "E:\Projects\MyProject\SQL Script\Reformatted"
Context command
Generate and output the context information of given database to a file..
Usage:
enlight.exe analysiscontext
/server:<servername>
[ /database:<databasename> ]
[ /user:<username> /password:<password> ]
/outputpath:<outputpath> | /o:<outputpath>
Parameters:
Parameter | Description |
|---|---|
/server:<servername> | Target SQL Server name. The default server is 'local'. |
/database:<databasename> | Target database name. The default database is 'master'. |
/user:<username> | Username for accessing the database. Optional. If omitted integrated security will be used. |
/password:<password> | User password for accessing the database. Optional. If omitted integrated security will be used. |
/outputpath:<path> or /o:<path> | Target output file for the database context. |
Examples:
enlight.exe analysiscontext
/server:.
/database:[AdventureWorks]
/o:c:\temp\AdventureWorks.xml
Configure command
Shows SQL Enlight Options Dialog which allows modifying analysis groups and rules, and layout templates.
Usage:
enlight.exe configure
Parameters:
Command has no parameters.
enlight.exe configure
License command
Shows SQL Enlight License Wizard which allows you to activate or deactivate your product license.
Usage:
enlight.exe license
Parameters:
Command has no parameters.
Examples:
enlight.exe license

