This page describes how to create and publish a database package using the version of SQL CI available in SQL Automation Pack v1.0.4.2 and earlier. If you're using a later version of the SQL Automation Pack, see Using the sqlCI.exe command line in SQL Automation Pack v1.1 and later.

The SQL Automation Pack was replaced by the DLM Automation Suite on 31st March 2015. If you're using a version of SQL CI included in the DLM Automation Suite, use the commands described in Using the sqlCI.exe command line.

You can use the SQLCompare.exe and sqlCI.exe command lines to create and publish database packages. You can then use Deployment Manager to deploy database packages to target SQL servers.

Requirements

You will need:

Create a scripts folder with SQLCompare.exe

To create a temporary scripts folder of your target database, use the SQL Compare command line:

  1. Open a command prompt.
  2. Change the working folder to the unzipped sqlCI folder.
  3. Run the following command:

    SC\SQLCompare.exe /server1:[server] /database1:[database] /makescripts:temporary_folder

    Where:

This creates a scripts folder of the database in a folder called temporary_folder.

For more information, see Switches used in the SQL Compare command line.

Publish the package with sqlCI.exe

To package and publish the database to Deployment Manager, run the following sqlCI.exe command:

sqlCI.exe --scriptsFolder=temporary_folder --packageId=[package name] --packageVersion=[version number] --packageRepository=[package repository] --apiKeyForPackagePublish=[DM API key] --generateCreationScript

Where:

This will package and publish the scripts folder that you created with SQLCompare.exe.

For information, see Using the sqlCI.exe command line in SQL Automation Pack.

Cleaning up

Use the command line to delete the temporary scripts folder you created.

This removes the temporary folder and all its subfolders.

This is particularly useful if you want to script the publishing of a package.