Documenting databases is fun again!

No, not really. But a least it's not a complete waste of time. Unlike those data documents you've written in the past, this one lives with your database (in SQL Server Extended Properties) so it stays up to date. Follow along and we'll show you how easy it is to create useful documentation for that good old Northwind database...

Make a connection

The first step is to connect to a database. You can enter a connection string or click on the "..." button to view the standard data connection dialog.

Hit the ground running - get advanced!

You can breeze right by the next tab (Advanced Settings) if you'd like, but it's got some neat gizmos that could save you some time. The two big features:
  • Auto-Fill - this looks at you schema and adds descriptions for primary and foreign keys. You can customize the text these use.
  • Additional Properties - By default, you're only filling in a simple "Description" tab. If you'd like add other columns to your documentation, you're going to want to look at Additional Properties.

Document that DB

This is where the rubber meets the road. You're going to need to fill this out, but we've made it a lot easier for you:
  1. The user interface shows you column names and datatypes to help you remember what all those columns are used for.
  2. The datagrid lets you move around pretty quickly
  3. Your work is saved immediately, so you can work on it as time permits. Your edits are saved with the database.

Show off!

Now that you've documented your database, you can export it to share with others. There are two ways to share it:
  1. Documentation formats (Word, Excel, HTML)
  2. Importable formats (T-SQL, XML) - these let other users import your documentation into their copy of the database

Here's what the export looks like in Excel. Note that the Table and Column documentation are on separate worksheets. Feel free to pick your favorite AutoFormat to pretty this up.

Here's the HTML export:

The next two formats are importable. The T-SQL export can be executed via Query Analyzer / SSMS, or it can be loaded by DDC.

Here's the XML format. The only reasons you'd want to use this are to import into another copy of the database via DDC, or to export to another format. All file exports actually start with XML and go through an XSL transform. You can check out the XSL folder and modify any of these, or create your own.

Copy that documentation with Import

You can use the Import tab to load previously exported documentation. Browser for a T-SQL or XML export from DDC. We do a few checks to make sure the file was created by DDC, then load the documentation into the currently connected database.

Last edited Nov 15, 2006 at 7:35 AM by jongalloway, version 6


airyce Apr 9, 2010 at 1:43 AM 
yeah it looks great but it doesn't work on us! we have a SQL 2005 here so after we had used it this is the error :

every object we clicked it shows that error (>.>)
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.SqlServer.ConnectionInfo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91'
at DataDictionaryCreator.Main.DocumentationSetup(String sqlConnectionString)
at DataDictionaryCreator.Main.MainForm_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

************** Loaded Assemblies **************
Assembly Version:
Win32 Version: 2.0.50727.3603 (GDR.050727-3600)
CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
Assembly Version:
Win32 Version:
CodeBase: file:///E:/Program%20Files/DataDictionaryCreator/DataDictionaryCreator.exe
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/
Assembly Version:
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/
Assembly Version:
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the section.
The application must also be compiled with debugging

For example:

< jitDebugging="true" />

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

wilsonmar Nov 11, 2008 at 6:29 PM 
Looks great. When do you think you'll have a version for SQL 2008 (SQL 10)?