Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I created a db in sql server 2008 and I wrote for some columns description to describe them, What I want now is to find a way to export these tables design including the description for each column into a document to be able to discuss with the teams and be printed.

share|improve this question
    
Previously: stackoverflow.com/questions/887370/… –  Valkyrie Dec 7 '11 at 15:20

3 Answers 3

The simplest solution is to buy something like Red-Gate's SQL Doc. There are a few people who have written scripts that you can find for free.

share|improve this answer

I used the following recently as the first step of a full DB audit. I know there are additional fields in COLUMNS and TABLES.

    SELECT
        TABLES.TABLE_SCHEMA + '.' + TABLES.TABLE_NAME 'TABLE_NAME',
        COLUMNS.COLUMN_NAME,
        COLUMNS.DATA_TYPE,
        COLUMNS.CHARACTER_MAXIMUM_LENGTH
    FROM 
        INFORMATION_SCHEMA.COLUMNS,
        INFORMATION_SCHEMA.TABLES
    WHERE
        COLUMNS.TABLE_NAME = TABLES.TABLE_NAME
        AND TABLES.TABLE_SCHEMA = 'MySchema'
    ORDER BY
        TABLES.TABLE_SCHEMA,
        TABLES.TABLE_NAME,
        COLUMNS.COLUMN_NAME
share|improve this answer

I've created an open source project to create MS SQL Server database documentation.

http://jeremykdev.github.io/SqlServerDatabaseDocumentationGenerator

share|improve this answer
    
seams good, just downloaded it, but had this on VS screencast.com/t/20zmaLAD2 can you help to solve it? –  Amr ElGarhy Feb 28 at 0:20
1  
The error appears to be caused by the long file path in the directory structure. Renaming or moving the solution to a directory with a shorter full path. See: bstruthers.com/weblog/2013/02/06/… –  Jeremy Mar 4 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.