SQL Packager 8

Creating a package

SQL Packager 8 doesn't have a graphical user interface for creating packages, so you'll need to use the command line.

To create a package:

  1. Create schema and data scripts for packaging using the SQL Compare and SQL Data Compare command lines. For more information, see:
  2. Open a Command Prompt window in the folder where you installed SQL Packager 8. 

    To do this, navigate to the folder, then hold Shift, right-click and select Open command window here

    Alternatively, open a Command Prompt window anywhere and change directory to the folder where you installed SQL Packager 8. For example:

    cd "C:\Program Files (x86)\Red Gate\SQL Packager 8"
  3. At the command prompt, type sqlpackager.
  4. Specify the paths of the scripts you want to package, and a name and location for the package, and press Enter.
    The package is created in the specified location.

Example

To package the schema and data of database WidgetSales as WidgetSalesUpgrade.exe in C:\Packages

sqlpackager /schemascript:"C:\Scripts\WidgetSalesSchema.sql" /datascript:"C:\Scripts\WidgetSalesData.sql" /outputfolder:"C:\Packages" /name:WidgetSalesUpgrade.exe

Switches

/schemascript:<file path(s)>

The path of the schema script you want to package. You must specify either /schemascript or /datascript. You can specify multiple paths as a comma-separated list. 

/datascript:<file path(s)>

The path of the data script you want to package. You must specify either /schemascript or /datascript. You can specify multiple paths as a comma-separated list.

/name:<name of executable> (optional)

The name of the package that will be created. You don't have to append .exe onto the file name. If you don't specify a name, the current date and time will be used, eg package-2014-11-13-1137.exe.

/outputfolder:<folder path> (optional)

The folder where the package will be created. If you don't specify a folder, the package will be created in the current folder.

/force (optional)

Overwrites any existing package in the output folder that has the same name as the new package.

 


Didn't find what you were looking for?