Database Versioning and Documentation Tool for Microsoft SQL Server

is my project on Codeplex. I have just released version 4.1 which generates reports combining the schema information and user documentation into HTML files.

Overview

MSSqlSchemaDoc extracts schema information from a SQL Server database and saves it as xml files - one per object. It also creates separate xml files loosely resembling the structure of each object but with placeholders where you can add comments to document your database schema. Finally, it can combine the schema information and documentation texts into HTML documentation.

The main benefit of using MSSqlSchemaDoc is that the generated xml files can easily be placed under version control, allowing you to track changes to both your database schema and database documentation separately. It also allows easy browsing of the database documentation through the HTML files. In the latest version, 4.1, HHP (project) and HHK (index) files are also generated to assist with the creation of CHM files - effectively making it a one-step process.

Technical

The application works by defining classes which represent database objects, like tables, views, etc. These classes are decorated with attributes which control how the objects get serialized to XML. XSD schemas specify the expected structure of the XML and are used to validate each serialized object.

Due to performance problems with SMO, custom queries are used to extract the desired data from the database.

Note: Only SQL2005 and SQL2008 is currently supported - SQL2000 support is in the pipeline.

Visit the project page at:

This article is part of the GWB Archives. Original Author: Henk Oberholzer

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.