Command Line Tool – Refactor

Refactor T-SQL script files using registered code refactorings.

This topic contains the following sections:

1Enlight refactor
2      --inputPath=<path>
3      --outputPath=<path>
4      --refactorings=<refactorings list>
5    [ --connectionString=<connectionString>
6      | --server=<servername> --database=<databasename> [ --user=<username>  --password=<password> ] ]

1Enlight refactor --list





SQL connection string the target context database.


Username for accessing the database.


SQL connection string.


Target database name.


Target SQL Server name and instance name.


Location of the T-SQL script files. A list of files separated with semicolon can also be provided. The `-` prefix can be used to exclude specific files.


Required. Destination folder for the result files.


Required. A list of code names of refactorings.


Outputs a list of all registered refactorings.

Build Machines edition specific parameters:




Required. License key.


Required. License data or activation response file path.


Get a list of all available refactorings:

1Enlight refactor --list

Run refactorings on script files:

1Enlight refactor 
2        --inputPath="d:refactor target***.sql" 
3        --outputPath="d:refactor output" --refactorings=RE0001,RE0002,RE0006