Sample XML Files etc.

Forum for users of SQL Packager database archive utility

Moderator: David Atkinson

Sample XML Files etc.

Postby SB » Thu Feb 07, 2008 12:47 am

Hello,

I am looking for sample XML files to be used with SQL Packager CLI. Essentially, here is what I am planning to do.

- Compare schema between two databases and generate script
- Compare data between two databases and generate script
- Exclude certain tables when comparing Data (e.g. System Tables etc)
- Create an EXE to apply the changes as needed.
- Create a Script File that will list all of the changes that EXE will apply.

I am plannning to automate this so that our nightly builds can pickup the .EXE and merge them in our process as needed. Script file will be used for documentation only.

Thank you.
SB
 
Posts: 2
Joined: Thu Feb 07, 2008 12:38 am

Postby Brian Donahue » Mon Feb 11, 2008 6:53 pm

Hello,

This shouldn't be a problem. The following example shows some options you can use with the XML command file to sqlpackager.exe. To create the package, you run sqlpackager.exe /argfile:<name of XML command file>
Code: Select all
<?xml version="1.0"?>
<commandline>
   <!-- connection properties-->
   <server1>MyComputer\\MyServer</server1>
   <database1>WidgetDev</database1>
   <username1>sa</username1>
   <password1>p@ssw0rd</password1>
   <server2>MyComputer\\MyServer2</server2>
   <database2>WidgetLive</database2>
   <username2>sa</username2>
   <password2>P@ssw0rd</password2>
   <!--System tables are ignored anyway...-->
   <excludeschema>\\[dbo\\].\\[WidgetPrices\\]</excludeschema>
   <excludedata>table:\\[dbo\\].\\[WidgetDescriptions\\]</excludedata>
   <excludedata>table:\\[dbo\\].\\[WidgetPrices\\]</excludedata>
   <!-- Output the schema and data scripts-->
   <schemascript>c:\\temp\\schema.sql</schemascript>
   <datascript>c:\\temp\\datascript.sql</datascript>
   <!-- build options -->
   <makeexe />
                <force />
   <location>c:\\temp</location>
   <name>MyPackage</name>
</commandline>
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Postby SB » Mon Feb 11, 2008 11:36 pm

Thank you Brian. I will try it out and post back if I have any questions.

BTW: Where can I get a list of options? I didn't see them in the help file for CLI.

Thanks.
SB
 
Posts: 2
Joined: Thu Feb 07, 2008 12:38 am

Postby Brian Donahue » Tue Feb 12, 2008 10:10 am

Hi,

The help is pretty minimal for the command-line. You'll get the full list of options from SQL Packager itself:
Code: Select all
sqlpackager /? /verbose
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Packager Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests