You could also use the free database diagram in Enterprise Manager. It allows you to provide descriptions for the tables and columns. Although I would not recommend using this tool so it is pretty limited in functionality, here is some code that I wrote to extract the data dictionary from the diagram:SET NOCOUNT ONCREATE TABLE #DataDictionary(TableName SYSNAME NOT NULL,ColumnName SYSNAME NOT NULL,Description VARCHAR(255) NOT NULL,ColumnOrder INT NOT NULL)INSERT INTO #DataDictionarySELECT o.name, c.name, CONVERT(VARCHAR(255), p.value), c.colidFROM syscolumns c, sysproperties p, sysobjects oWHERE p.smallid = c.colid AND c.id = p.id AND c.id = o.idUNIONSELECT o.name, '', CONVERT(VARCHAR(255), p.value), 0FROM sysproperties p, sysobjects oWHERE p.id = o.id AND p.smallid = 0ORDER BY 1, 4-- This is your Data Dictionary-- Export to Excel through DTSSELECT CONVERT(varchar(30), TableName) AS TableName, CONVERT(varchar(40), ColumnName) AS ColumnName, DescriptionFROM #DataDictionaryDROP TABLE #DataDictionary
Tara