Creating multiple, small scripts instead of one huge one

Compares and synchronizes SQL database content.

Creating multiple, small scripts instead of one huge one

Postby rchutch » Wed Jan 02, 2013 9:31 pm

I know that you can ask the Data Compare Tool to create transactions of a certain size and that's going a little bit in the right direction.

We need to be able to use the output of the Data Compare Tool in a MS Installer package which begins to become unreliable when any script goes over about 1.5MB.

Considering that your tool might create a 200MB script for each of 30 databases we maintain and the contents of these changes regularly, the process is now:

    - For each of the 30 databases
      - Create the 200MB script file (your product makes this easy)
        - Manually split it into 80 or so SQL script files (takes a very long time)
        - Have the installer call each of the 80 pieces (which will probably not be avoidable, but at least we can use naming conventions to reduce this a little)
So, we have:

30 * (a very long time) * (something that happens regularly) = unmanageable

Is there either a way to have the Data Compare Tool create the 80 small files automatically or does anyone know of a tool that can reliably break one of these monsters into a bunch of manageable scripts that can be used in an MSI installer?

Posts: 3
Joined: Wed Jan 02, 2013 9:10 pm

Postby Brian Donahue » Tue Jan 15, 2013 11:26 am

Hi Rob,

I have logged a support ticket based on your request with a reference of F0068439.

We will be in touch shortly.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Postby james.billings » Tue Jan 15, 2013 5:29 pm

Hi Rob.

I don't think there's anything much in SQL Data Compare that'll help here unfortunately- the "split" option only splits transactions, not files.
There's plenty of free tools that will split a file up into chunks , such as HJSplit, but this is intended for re-joining later and probably wouldn't be much help- you'd really need something that would know to split on a SQL Command boundary too.

Out of interest, how are you running the scripts from your installer so the size is an issue? One other way of tackling this may be to use SQL Packager and embed the resulting .exe into the installer and run it as a post-install task or similar? The generated packages can be run via a commandline rather than interactively I believe.
Posts: 1121
Joined: Wed Jun 16, 2010 10:10 am
Location: Red Gate

Return to SQL Data Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 1 guest