Export Database Design

  • I am using 2008 Management Studio, looking at an old 2000 database. I have a request to send somebody the design of the database (not scripting, just a layout of what is in each table). Any easy way to do this? Thanks.

    Sean

  • Use the Information_Schema catalog views to spit out a table / column list. Adjust the below code as necessary:

    SELECT Table_Catalog, Table_Schema, Table_Name, Column_Name, Is_Nullable,

    Column_Default, Data_Type, Character_Maximum_Length as ChLen,

    numeric_Precision, Numeric_Scale, Datetime_Precision

    FROM Information_Schema.columns

    ORDER BY Table_Name;

    EDIT: WHOOPS! That won't work on SQL 2000. Sorry. Use sys.objects and join it to sys.columns.

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Sound like they want a model of the database. You can use the database diagram ability in SSMS, but then you'd need to either create an image of the diagram using a screen capture utility or print it to PDF using a print to pdf utility like cutePDF.

    OR

    You could use something like Visio/ERWin/Toad Datamodeler to reverse engineer the database into a model.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply