Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Utility to document database

Author  Topic 

skiabox
Posting Yak Master

169 Posts

Posted - 2008-02-27 : 06:00:18
Is there any utility that can document some sql server 2005 tables that I have in my database?I mean to add some description to column names so that I can know what they represent.Thank you!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-27 : 06:55:48
You can add exntended description to your table as well as to its columns.Use sp_addextendedproperty system stored procedure to add the descriptions and sp_updateextendedproperty to modify them. Look into BOL for syntax & sample usage.
Also, Use ::fn_listextendedproperty to view the extended descriptions of table/columns
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-02-27 : 09:51:37
Try this code. You can also do this in the table designer SQL Server 2000 Enterprise Manager, or in SQL Server 2005 Management Studio.

exec sp_addextendedproperty
@name = N'MS_Description',
@value = N'My Column description text', -- Actual Description
@level0type = N'user',
@level0name = N'dbo', -- Actual Table Owner
@level1type = N'table',
@level1name = N'MyTableName', -- Actual Table Name
@level2type = N'column',
@level2name = N'MyColumnName' -- Actual Column Name


CODO ERGO SUM
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-02-27 : 12:24:40
I wrote a tool that does this. It generates docs, and then allows you to edit the extended properties from the generated docs, sort of like a wiki.

see the link in my sig for details.


elsasoft.org
Go to Top of Page
   

- Advertisement -