1

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.

4

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

http://jeremykdev.github.io/SqlServerDatabaseDocumentationGenerator

2

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.

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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