LocalDict

SQL Server documentation guides

Working T-SQL for documenting a SQL Server database with the catalog views. Every script was tested on SQL Server 2022 against a sample pet-clinic database.

How to generate a data dictionary in SQL Server

Build a SQL Server data dictionary from sys.tables, sys.columns and MS_Description with one read-only T-SQL query, then add descriptions with sp_addextendedproperty.

Export a SQL Server schema to Markdown

A single T-SQL query (SQL Server 2017+) that writes every table, column, type, nullability, primary key and description as Markdown tables for GitHub or a wiki.

SQL Server ER diagram from catalog views with Mermaid

Generate a Mermaid erDiagram for a SQL Server database straight from sys.foreign_keys and sys.columns with T-SQL, then render it in GitHub, a docs site or the browser.

Find undocumented columns with MS_Description

Measure documentation coverage per table, list columns missing an MS_Description extended property, and generate sp_addextendedproperty stubs to fill them in.