SQL Packager 7

Frequently asked questions for the command line

Licensing

How do I activate the command line tools?

To use the SQL Packager command line interface, you must have one of the following licenses:

  • SQL Packager 6.0 (or later)
  • SQL Packager Professional Edition 5.5 (or earlier)
  • SQL Toolbelt

You can also redistribute your application if you have a valid license. For more information, see Integrating the command line with applications.

Comparing databases

How can I include or exclude the object definition for specific tables?

You can use the /includeschema or /excludeschema switch with regular expressions to do this.

How can I include or exclude the data for specific tables?

You can use the /includedata or /excludedata switch with regular expressions to do this.

What is included or excluded when I use a project?

When you use a project, all objects and data that were selected for inclusion when the project was saved are automatically included; you do not need to explicitly include them using the /includeschema or /includedata switches. You can override the inclusion by specifying the /excludeschema or /excludedata switches as required.

Integration

How do I integrate the command line tools with applications?

For information about how to integrate the command line tools with applications that you distribute to your customers, see Integrating the command line with applications.

How do I integrate database package creation with a build process?

You may want to install a package as part of your application installation process. You can create the package during the build, bundle it as part of your installer, and set up the installer to execute it at the appropriate point during the installation.

The build script example below shows how you would execute the SQL Packager command line tool from an NAnt build script. You can modify this task for use with other build systems such as Visual Build.

... <!-- Use your SQL command line installation directory --> <property name="sqlCmdLineInstallDir" value="..."/> ... <target name="PackageDatabase" description="Create executable database package."> <exec basedir="${sqlCmdLineInstallDir}" program="sqlpackager.exe" commandline="/database1:FirstDatabaseName /makeexe /name:PackageName /location:TargetDirectoryName"/> </target> ...

By default, NAnt captures the output of the program and incorporates it as part of the build log. Alternatively, you can use the output attribute of the exec task to specify a file to which the output is to be redirected.


Didn't find what you were looking for?