Database dictionary

I have a SQL server database, I would like to create a data dictionary, that basically explains what the table and its columns definition. 
What production should I use to help the process?
Thanks

Best Answer

  • ben_bben_b Posts: 84 Silver 2
    edited March 8, 2023 4:43PM Answer ✓
    1.  Run this query, save results to excel and then send to the business analyst to fill in the description

    SELECT TABLE_SCHEMA AS SchemaName,
           TABLE_NAME AS TableName,
           COLUMN_NAME AS ColumnName,
           '' AS [Description goes here]
    FROM 
          INFORMATION_SCHEMA.COLUMNS
    ORDER BY SchemaName,
             TableName,
             ColumnName;<br>


    2.  Once you have the description from the BA, plug them into this query

    exec sp_addextendedproperty  
         @name = N'MS_Description' 
        ,@value = N'Description supplied by the business analyst' 
        ,@level0type = N'Schema', @level0name = 'dbo' 
        ,@level1type = N'Table',  @level1name = 'The table name goes here' 
        ,@level2type = N'Column', @level2name = 'The column name goes here'

    3.  Run SQL doc and it should produce what you need

    This all said, I've not actually tried it myself yet.

Answers

  • ben_bben_b Posts: 84 Silver 2
    Hello

    the below link explains how you can use sp_addextendedproperty within SQL server to add explanations to column and tables and store this information in the database... You can then use red-gate SQL doc to use that information to generate a data dictionary in Word/PDF/HTML

    https://www.red-gate.com/hub/product-learning/sql-doc/documenting-a-sql-server-data-catalog-in-html-and-git-markdown?product=sql-doc

    One potential alternative tool is Microsoft Purview - it should mean that you can add table/column descriptions using a web UI (as asset descriptions within Purview Data Catalog)... although I have not actually used Purview yet so remains unproven to me as of today.

    cheers
    Ben
  • rgfriendrgfriend Posts: 21 Bronze 2
    Thank you.
    Can I generate the doc with table and columns description field empty in a word document, and asked someone like business analyst to work on wording of the description of the table or column, then somehow load into the database, and regenerate the SQL doc?

    Thanks,
  • philljones22philljones22 Posts: 10 New member

    FM WhatsApp is a modified version of the popular social networking messaging app, offering enhanced features and greater customization options for a personalized chat experience. Enjoy additional privacy controls, unique themes, and extended media sharing capabilities with FM WhatsApp.

  • Jessicabuckley219Jessicabuckley219 Posts: 6 New member
    edited December 30, 2024 12:25PM
    To create a data dictionary for your SQL Server database that defines tables and columns, you can use built-in tools like SQL Server Management Studio (SSMS) to query system views such as INFORMATION_SCHEMA.COLUMNS and sys.tables. Export this metadata and enhance it with descriptions using tools like Excel or a documentation platform like Dataedo, which is specifically designed for such tasks. If you are looking for a streamlined and efficient process, focus on software that provides vip-like features for database management, akin to vip desert safari deals for adventures, ensuring you get top-tier functionality and ease of use.

Sign In or Register to comment.