Documenting from sql compare snapshot

Documents SQL Server 2000, 2005 and 2008 databases.

Documenting from sql compare snapshot

Postby lculley » Mon Jan 07, 2008 5:04 pm

Is there any way to use sql doc to document a sql compare snapshot in an automated fashion? What we're trying to do is to automate the documentation of differences so that when someone comes up to our desk and says "did anything change in the last three days to the db" we can just send them the file in the great HTML format that sql doc has.

We are thinking of doing the following:

1. Have sql compare create a snapshot of the db off hours automatically
2. Have sql doc create a diff doc based off the snapshot automatically (could be during the day).

Some related questions:

1. Can sql doc generate documentation based on a sql compare snapshot and not just a live db?
2. Can we use the sql toolkit to automate the sql doc without having to create a project first?
3. If we can't use sql doc, how could we create an automated diff report in sql compare?

Thanks in advance!
Posts: 21
Joined: Thu Nov 29, 2007 4:51 pm

Postby David Atkinson » Mon Jan 07, 2008 7:47 pm

Sadly, SQL Doc will only run on a live Database, so unless you redeploy your database from the snapshot using the SQL Compare command line, you won't be able to do this.

Have you considered simply using the SQL Compare commandline to compare the two snapshots? The /snapshot: switch can load the snapshot and the /report: switch generates a report. /reporttype:Simple will produce a simple HTML report. /reporttype:Interactive outputs the interactive HTML report.

sqlcompare.exe /? /v /html > help.htm to generate a commandline html file in which all the various options are described.

You should be able to write a short batch file to generate this report only when the comparison reveals a difference (the %ERRORLEVEL% exit code will be 63 when the databases are identical).

Red Gate Scream ( is a handy, free UI-based tool that allows you to compare two snapshots.

Hope this helps,

David Atkinson
Red Gate Software
David Atkinson
Posts: 1143
Joined: Mon Dec 05, 2005 3:54 pm
Location: Twitter: @dtabase

Return to SQL Doc Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests