Project Description
This project is library that allows users to script SQL Server database objects. Library uses dynamic management views for extracting data about databases objects.

This library could be used in various situations. The most interesting areas are comparing database objects and generation database documentation. For both cases examples have been prepared.
This library can be used only for databases with compatibility levels 90 (MS SQL Server 2005) and 100 (MS SQL Server 2008). Here is a list of supported objects:
  • Tables
  • Indexes
  • Ddl triggers
  • Dml triggers
  • Clr triggers
  • Stored procedures
  • Views
  • Application roles
  • Database roles
  • Users
  • Assemblies
  • Aggregates
  • Defaults
  • Synonyms
  • Xml schema collections
  • Message types
  • Contracts
  • Partition functions
  • Service queues
  • Full text catalogs
  • Full text stop lists
  • Full text indexes
  • Services
  • Broker priorities
  • Partition schemes
  • Remote service bindings
  • Rules
  • Routes
  • Schemas
  • Sql user defined functions
  • Clr user defined functions
  • User defined data types
  • User defined types
  • User defined table types

Database comparison tool

main.jpg

This first example is databases comparison tool which allows database developers to compare database objects. DBCompare project consists of 5 screens: Login, MDIMain, ObjectCompare, ObjectFetch and ScriptView. It also uses external component called DifferenceEngine which can be downloaded from: http://www.codeproject.com/KB/recipes/diffengine.aspx and is used as a base class for script comparison.

Database documentation tool

dbdoc_main.jpg

Here is an another example how to use my scripting library. This little tool allows you to create html base documentation of your database. For the moment this tool generate documentation for following objects but in the future I will add rest of the objects:
  • Defaults
  • Message types
  • Contracts
  • Service queues
  • Services
  • Broker priorities
  • Indexes
  • Aggregates
  • Assemblies
  • Sql user defined functions
  • Clr user defined functions
  • Stored procedures
  • Views
  • User defined types
  • User defined table types
  • User defined data types
  • Triggers
  • Tables
  • Full text indexes
  • Full text catalogs
  • Full text stop lists
documentaion.jpg

Last edited Oct 31, 2011 at 6:10 PM by kanasz, version 3