Red Gate forums :: View topic - Sample XML Files etc.
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Packager Previous Versions
SQL Packager Previous Versions forum

Sample XML Files etc.

Search in SQL Packager Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
SB



Joined: 07 Feb 2008
Posts: 2

PostPosted: Thu Feb 07, 2008 12:47 am    Post subject: Sample XML Files etc. Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Mon Feb 11, 2008 6:53 pm    Post subject: Reply with quote

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:
<?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>
Back to top
View user's profile Send private message
SB



Joined: 07 Feb 2008
Posts: 2

PostPosted: Mon Feb 11, 2008 11:36 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Tue Feb 12, 2008 10:10 am    Post subject: Reply with quote

Hi,

The help is pretty minimal for the command-line. You'll get the full list of options from SQL Packager itself:
Code:
sqlpackager /? /verbose
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group