SQL Automation Pack v1.1.x.x releases contain a rewritten version of SQL CI which is not compatible with 1.0.x.x versions. If you're upgrading from a 1.0.x.x version, you must reconfigure your existing SQL CI build steps after installation. For details of how to upgrade for different CI systems, see Upgrading. |
This page applies to SQL Automation Pack v1.1 and later. If you're using an earlier version, see Using the SqlCI.exe command line in SQL Automation Pack v1.0.4.2 and earlier. |
You should only use this option if:
If you don't use this option, SQL CI will create a temporary database by default. This option is only available if you're using SQL Automation Pack v1.1.1.1950 (includes SQL CI v2.0.1.315). |
The name of an existing database on the temporary database server you previously specified.
/temporaryDatabaseName=WidgetShopTemp |
During the build step, SQL CI needs to recreate your database on a temporary server. You should use an empty database for this, because data will be overwritten during the build and test steps.
/temporaryDatabaseUserName (optional)
The username for SQL authentication.
/temporaryDatabaseUserName=sa |
If you don't specify this option, Windows authentication is used by default.
The password for SQL authentication.
/temporaryDatabasePassword="password" |
This option is required if you're using the /temporaryDatabaseUserName
option.
The output folder path.
/outputFolder="c:\temp" |
If you don't specify this option, the current working directory is used by default. Make sure you have permission to create new files and folders in this directory.
To include SQL Compare command line options use ="/options:<option_name>" or ="/options:+<option_name>"
.
/additionalCompareArgs="/options:DoNotOutputCommentHeader,ForceColumnOrder" |
The options are not case-sensitive.
You can also use aliases if you prefer shorthand versions of the commands. For details of the alias for each command, see Options used in the command line.
/additionalCompareArgs="/options:nc,f" |
To exclude default SQL Compare options, use ="/options:-<option_name>"
.
/additionalCompareArgs="/options:-IncludeDependencies,-IgnoreWhiteSpace" |
The default options (with aliases in brackets) included in the build step are:
You can include some options and exclude others in the same command.
/additionalCompareArgs="/options:IgnoreConstraintNames,NoTransactions,-IgnoreFillFactor" |
To include SQL Compare command line switches:
/additionalCompareArgs="/AbortOnWarnings:[None]/[High]/[Medium]" |
If the SQL Compare command line option or switch contains a space, you need to enclose the command in double quotes and insert escape characters before each quote.
/additionalCompareArgs="/TIL:\"READ COMMITTED\"" |
If you don't escape the double quotes, the option will be invalid.
For more information about SQL Compare command line options and switches, see Using the command line.
To activate the SQL Automation Pack license on the machine on which the build agent is running, enter the serial number.
/licenseSerialKey=123-456-789012-ABCD |
For information on finding your Automation Pack serial number, see Licensing. If you don't enter a serial number, a 28 day free trial of the SQL Automation Pack will start automatically (14 day trial if you're using SQL Automation Pack v1.1.0.1840 and earlier).
If you have multiple serial numbers, separate them using commas without spaces.
/licenseSerialKey=123-456-789012-ABCD,321-456-987654-DCBA |
If you want to run tSQLt tests against the package, you'll need to enable the common language runtime (CLR) integration feature on the /temporaryDatabaseServer. For more information, see Enabling CLR Integration (TechNet article). |
To run the test step, use this syntax:
Test /package=<value1> /temporaryDatabaseServer=<value2> |
Test /package=WidgetShop\Database\Output\WidgetShop.1.0.nupkg /temporaryDatabaseServer=(localdb)\v11.0 |
The rest of this section provides examples of each test option.
The path to the package that was created in the build step.
/package=WidgetShop\Database\Output\WidgetShop.1.0.nupkg |
You don't need to configure this option if you're using SQL Automation Pack 1.1.0.1840 and later, and you have LocalDB installed. SQL CI will use LocalDB by default. You do need to configure it if you want to run full-text queries against your tables. LocalDB doesn't support Full-Text Search, so you should use a temporary database on your instance of SQL Server instead. For more information on LocalDB, see SQL Server 2014 Express Local DB (MSDN article). |
The temporary database server name.
/temporaryDatabaseServer=SQLServer2012 |
During the build step, SQLCI recreates your database on a temporary server. During the test step, tSQLt tests are run against it. We recommend using localDB for this.
You should only use this option if:
If you don't use this option, SQL CI will create a temporary database by default. This option is only available if you're using SQL Automation Pack v1.1.1.1950 (includes SQL CI v2.0.1.315). |
The name of an existing database on the temporary database server you previously specified.
/temporaryDatabaseName=WidgetShopTemp |
During the build step, SQL CI recreates your database on a temporary server. During the test step, tSQLt are run against it.
The username for SQL authentication.
/temporaryDatabaseUserName=sa |
If you don't specify this option, Windows authentication is used by default.
The password for SQL authentication.
/temporaryDatabasePassword="password" |
The output folder for test results.
/outputFolder="c:\testresults" |
If you don't specify this option, the current working directory is used by default.
Use test data created by SQL Data Generator. If you've already created a SQL Data Generator project file, include the file name.
/sqlDataGenerator="TestData.sqlgen" |
If you don't have an existing project file, include this option without specifying a value. This will populate the temporary database with test data that's been generated automatically. For more information about SQL Data Generator, see SQL Data Generator 3 documentation.
To include SQL Compare command line options use ="/options:<option_name>" or ="/options:+<option_name>"
.
/additionalCompareArgs="/options:DoNotOutputCommentHeader,ForceColumnOrder" |
The options are not case-sensitive.
You can also use aliases if you prefer shorthand versions of the commands. For details of the alias for each command, see Options used in the command line.
/additionalCompareArgs="/options:nc,f" |
To exclude default SQL Compare options, use ="/options:-<option_name>"
.
/additionalCompareArgs="/options:-IncludeDependencies,-IgnoreWhiteSpace" |
The default options (with aliases in brackets) included in the build step are:
You can include some options and exclude others in the same command.
/additionalCompareArgs="/options:IgnoreConstraintNames,NoTransactions,-IgnoreFillFactor" |
To include SQL Compare command line switches:
/additionalCompareArgs="/AbortOnWarnings:[None]/[High]/[Medium]" |
If the SQL Compare command line option or switch contains a space, you need to enclose the command in double quotes and insert escape characters before each quote.
/additionalCompareArgs="/TIL:\"READ COMMITTED\"" |
If you don't escape the double quotes, the option will be invalid.
For more information about SQL Compare command line options and switches, see Using the command line.
To activate the SQL Automation Pack license on the machine on which the build agent is running, enter the serial number.
/licenseSerialKey=123-456-789012-ABCD |
For information on finding your SQL Automation Pack serial number, see Licensing. If you don't enter a serial number, a 28 day free trial of the SQL Automation Pack will start automatically (14 day trial if you're using SQL Automation Pack v1.1.0.1840 and earlier).
If you have multiple serial numbers, separate them using commas without spaces.
/licenseSerialKey=123-456-789012-ABCD,321-456-987654-DCBA |
To run a specific test class or test instead of every test, enter the test class and test name.
/runOnly=[testclass].[testname] |
If you want to run every test, don't specify this option.
This command is only available in SQL Automation Pack 1.1.0.1840 and later. |
To run the sync step, use this syntax:
sqlCI.exe Sync /databaseName=<value1> /package=<value2> /databaseServer=<value3> |
Sync /databaseName=WidgetShop /package=WidgetShop\Database\Output\WidgetShop.1.0.nupkg /databaseServer=SQLServer2012 |
The rest of this section provides examples of each sync option.
The target database to update with the changes in source control. This must be an existing database on the server; the runner does not create the database for you.
/databaseName=WidgetDB |
The path to the package that was created in the build step.
/package=WidgetShop\Database\Output\WidgetShop.1.0.nupkg |
The target database server name.
/databaseServer=SQLServer2012 |
The username for SQL authentication.
/databaseUserName=sa |
The password for SQL authentication.
/databasePassword="password" |
To include SQL Compare command line options use ="/options:<option_name>" or ="/options:+<option_name>"
.
/additionalCompareArgs="/options:DoNotOutputCommentHeader,ForceColumnOrder" |
The options are not case-sensitive.
You can also use aliases if you prefer shorthand versions of the commands. For details of the alias for each command, see Options used in the command line.
/additionalCompareArgs="/options:nc,f" |
To exclude default SQL Compare options, use ="/options:-<option_name>"
.
/additionalCompareArgs="/options:-IncludeDependencies,-IgnoreWhiteSpace" |
The default options (with aliases in brackets) included in the build step are:
If the target database you're syncing to contains tSQLt tests, you must exclude the IgnoretSQLt option. |
You can include some options and exclude others in the same command.
/additionalCompareArgs="/options:IgnoreConstraintNames,NoTransactions,-IgnoreFillFactor" |
To include SQL Compare command line switches:
/additionalCompareArgs="/AbortOnWarnings:[None]/[High]/[Medium]" |
If the SQL Compare command line option or switch contains a space, you need to enclose the command in double quotes and insert escape characters before each quote.
/additionalCompareArgs="/TIL:\"READ COMMITTED\"" |
If you don't escape the double quotes, the option will be invalid.
For more information about SQL Compare command line options and switches, see Using the command line.
To activate the SQL Automation Pack license on the machine on which the build agent is running, enter the serial number.
/licenseSerialKey=123-456-789012-ABCD |
For information on finding your SQL Automation Pack serial number, see Licensing. If you don't enter a serial number, a 28 day free trial of the SQL Automation Pack will start automatically (14 day trial if you're using SQL Automation Pack v1.1.0.1840 and earlier).
If you have multiple serial numbers, separate them using commas without spaces.
/licenseSerialKey=123-456-789012-ABCD,321-456-987654-DCBA |
To run the publish step, use this syntax:
Publish /package=<value1> /nugetFeedUrl=<value2> |
Publish /package=WidgetShop\Database\Output\WidgetShop.1.0.nupkg /nugetFeedUrl=http://nugetfeedmachinename:8081/nuget/ |
The rest of this section provides examples of each publish option.
The path to the package that was created in the build step.
/package=WidgetShop\Database\Output\WidgetShop.1.0.nupkg |
The fully-qualified URL for your NuGet feed. If your are using Deployment Manager, this is the URL for Deployment Manager with /nuget/
added to the end.
/nugetFeedUrl=http://nugetfeedmachinename:8081/nuget/ |
/nugetFeedApiKey (optional)
The API key for your NuGet feed.
/nugetFeedApiKey=DO8XW4CI7UIROVCFG4TYTC2DXM8 |
If you are using a public NuGet feed, the API key is not required.
To activate the SQL Automation Pack license without having to configure a build, test or sync step, use this syntax:
Activate /licenseSerialKey=<value> |
Activate /licenseSerialKey=123-456-789012-ABCD |
This also activates SQL CI.
For information on finding your SQL Automation Pack serial number, see Licensing.
If you have multiple serial numbers, separate them using commas without spaces.
Activate /licenseSerialKey=123-456-789012-ABCD,321-456-987654-DCBA |
|