Bill Wunder's DDL Archive Utility

Implementation Details


SQLDMO

DDL scripts are generated using the .NET InterOp interface to the SQLDMO (COM) libraries.

DTS

DTS packages are not scriptable via DMO. When a DTS Package Scripting Option is selected the DTS object model is traversed and details of the most recent version of the package are saved to a VBScript file. The VBScript files are then checked in to SourceSafe. Structured Storage Files are not scripted by the utility. Note that you cannot simply execute one of these script files to recreate a package. It is necessary to load them via a DTS ActiveX task and in some cases additional modifications are necessary. The important thing about the generated scripts is that they do document the changes made to a package in such a way that they are easily and efficiently stored in SourceSafe.

VB.NET

All file processing is done through the System.IO namespace. In order to assure that names used inside SQL Server do not cause problems in the file system, the following characters are always converted to the tilde "~" character in the file names: "\", "/", ":", "*", "?", """", "<", "@gt;", "|" In the file contents the character is not changed, only in the file or file system folder names. Note that these substitutions occur in addition to the special character substitutions that occur for SourceSafe reserved characters.

SQLXML

SQLXML managed classes are used extensively by the Archive Utility. The configuration options are stored in SourceSafe with each execution of the Utility as a file name Archive.xls located at under each SQL Server named project.

SourceSafe

The Archive Utility if compatible with V6.0d of Visual SourceSafe. The COM automation interface for this version of SourceSafe is somewhat more restrictive than previous versions with regard to the permitted special characters for file and project names. To satisfy these rules, all characters in the following list are replaced by the tilde "~" in the names of all projects and files: "$", "(", ")", "[", "]", "{", "}", ";", "=", "'", "!", "%", "," In the file contents the character is not changed, only in the file or project names. Note that these substitutions occur in addition to the special character substitutions that occur for file system reserved characters.