Richard Mitchell

Software Engineer - Red Gate Software
Engine programmer and factotum.

Red Gate Scream AKA SQL Compare snapshot comparison tool for source control integration

Published Wednesday, February 08, 2006 1:56 PM

One of the things that seems to be missing from large scale database development is the ability to really see the differences from one version of the database to the next. Now of course SQL Compare can take snapshots and these snapshots can be stored in a source control system but in order to compare two different versions you have to retrieve both versions to disk and then open SQL Compare load the two snapshots and then have a look. This is both time consuming and a little roundabout.

So what we now have is a little utility based on the technology of SQL Compare that can be downloaded for free here which you can integrate into your source control system as the default difference tool. What this will do is check to see if the two files passed as arguments are snapshots and if they are it will show you how they differ but without any of the synchronisation SQL that SQL Compare gives you ( after all it's free you know ;) ). If the files aren't SQL Compare snapshot files then the program can pass the files onto your favourite diff tool ( I recommend WinMerge for text based files ) or a different diff tool controlled by the extension of the file.

Feel free to download Red Gate Scream and distribute it around your organisation for anybody who might need to see the differences between snapshot files.

If you have any other ideas to make this tool more useful or indeed other tools that you would like to see Red Gate produce feel free to comment here or go to our forums. Please note that Red Gate Scream is not an officially supported product.

As an example we use Source Gear Vault here. The settings that I have configured are...

Program: C:\Program Files\Red Gate\Red Gate Scream\RedGate.Scream.exe
Arguments: "%LEFT_PATH%" "%RIGHT_PATH%" "%LEFT_LABEL%" "%RIGHT_LABEL%"

Then in Red Gate Scream I have the following setup as my default diff tool...

Extension: default
Command Line: "C:\Program Files\WinMerge\WinMerge.exe"
Arguments: /ub /wl "%1" "%2" /dl "%3" /dr "%4"

Notice how the command arguments from Source Gear "%LEFT_PATH%" maps to %1 for Red Gate Scream. The first two arguments to Red Gate Scream are always the paths of the left and right files. The arguments after that are available to be passed on to the next diff tool as %3,%4,...,%n.

It seems that SourceSafe version 6 doesn't allow external diff tools to be integrated so if you're using that I'd advise you upgrade to 2005 which does. The settings that I've got to work are...

Operation: File Difference
File Extension: .snp
CommandLine: "C:\Program Files\Red Gate\Red Gate Scream\RedGate.Scream.exe" %1 %2

Please notice the lack of quotes around the %1 and %2 arguments as if these are present SourceSafe for some reason decides not to escape the file paths when comparing against a local file - how bizarre.

Have fun....

Download Red Gate Scream here

PS If you have a better name for the product or find it useful please let me know :).

Comments

 

Pete Morgan said:

Great little utility - thanks!
I've just added it into Subversion, and it just worked. Very neat.
The only thing I'd say is that the file paths at the top of each comparison pane indicate that it's comparing 2 temporary files (such as c:\docume~1\peterm~2\locals~1\temp\svn009.tmp.svn)
Ideally it would indicate the revision number of each snapshot you are comparing. Any chance of this happening?
Cheers,
Pete.
February 16, 2006 10:07 AM
 

Richard Mitchell said:

Yeah I had thought of doing that and making the 3rd and 4th argument the two titles of the revisions, they would of course have been optional. However in the time I had available to me as I was doing this as a little side-project it didn't make the final cut.

Glad you find it useful :).

Richard
February 21, 2006 7:41 AM
 

Tri said:

"... What this will do is check to see if the two files passed as arguments are snapshots and if they are it will show you how they differ ..."

Can you please elaborate on the definition of a "Snapshot" file? Does it contain only DB definition (no data)? How do I generate such a file (without of course using SQL Compare)?

April 17, 2006 11:05 PM
 

Richard Mitchell said:

The only way to generate a snapshot file is by using SQL Compare. The snapshot file contains only schema information of the database and no data at all.

Try SQL Compare - you'll love it :)

(Wish I knew about it years ago...ho hum)
April 25, 2006 8:45 AM
 

Daniel F said:

It doesn't work with Compare 5, drat! Complains that the packages were created using a newer version. Any chance of a quick recompile and re-release Richard?
April 27, 2006 9:33 AM
 

James said:

I second the request for an update for Compare 5
May 4, 2006 7:07 PM
 

Richard Mitchell said:


It's taken me a while but I've finally rebuilt Scream to work with the newer version of the SQL Compare...
June 14, 2006 2:50 PM
 

Richard Mitchell said:


It's taken me a while but I've finally rebuilt Scream to work with the newer version of the SQL Compare...
July 6, 2006 7:46 AM
 

RGribble said:

This is a great tool but it would be nice to have the filter toolbar so you can turn off "equal" items from being shown etc!!!
August 27, 2006 5:58 PM
You need to sign in to comment on this blog

















<February 2006>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
2627281234
567891011
Virtual Exchange Servers
 Microsoft now supports running Exchange Server 2007 in server virtualization environments, not just on... Read more...

Virtualizing Exchange: points for discussion
 With the increasing acceptance of the use of Virtualization as a means of providing server... Read more...

Encouraging .NET Reflector Add-ins
 Jason Haley is well-known for the resources he's provided to developers who wish to extend Reflector's... Read more...

Using .NET Reflector Add-ins
 .NET Reflector by itself is great, but it really comes into its own with the help of some add-ins. Here... Read more...

Unique Experiences!
 You'd have thought that a unique constraint was an easy concept - Not a bit of it; it can cause a lot... Read more...