How to generate SQL Server data dictionary from SQL script
Channel: DataResearchLabs
Date: 2021-05-17

Sure, you can use Visual Studio, or Toad, or a similar IDE to generate a data dictionary from an application.  But what if you don't have those applications? Or what if you want a more universal way of generating a data dictionary?  Then the following SQL script is for you.

This script will return the schema and table names as well as numerous column properties beyond just the column name.  It also includes the column's ordinal position, whether or not it is a part of a primary key / foreign key / unique key, its data type and various length/size/precision components, whether or not it is nullable, and the description.

This short video walks you through downloading the script, executing it, pulling the metadata into an Excel file where it can easily be formatted to look pretty and shared with other team members via email. 


------- Chapter Timestamps (click to jump forward): -----------------------------
 0:00 - Intro
 0:09 - Ever Needed to Troubleshoot What Schema Change Broke Your App?
 0:39 - Demo: How to Download the Script
 1:41 - Demo: How to Run the Script and Generate the Data Dictionary
 3:31 - Demo: The Data Dictionary output in Excel
 4:22 - The End


Download:
- https://raw.githubusercontent.com/DataResearchLabs/sql_scripts/main/mssql/data_dictionary/data_dict_dump.sql


Watch related playlist videos: 
- https://www.youtube.com/playlist?list=PLVHoUDdbskUSlZTVZmllGTdSuvyI4LBiE


Use Free MSSQL Data Dictionary Generator Tool:
- https://youtu.be/Lh14fKxIalc
- https://github.com/DataResearchLabs/data_analysts_toolbox/blob/main/data_dictionary_generator/readme.md


Connect with me on social media:
- LinkedIn:  https://www.linkedin.com/in/mpiercead576/
- YouTube:  https://www.youtube.com/channel/UCQciXv3xaBykeUFc04GxSXA
- GitHub:  https://github.com/DataResearchLabs


Subscribe to my YouTube Channel:
- https://www.youtube.com/channel/UCQciXv3xaBykeUFc04GxSXA?sub_confirmation=1


Background Music (via YouTube "always free" Audio):
- "Rewind" by Ofshane:  https://www.youtube.com/channel/UC34Wh4ysdP50H-ThbZFFfsA


#MSSQL #datadictionary #autogenerate