Generating data dictionary for SQL Server database

Viewed 38367

I am trying to generate a data dictionary for a table in my database.

Ideally I would like to export the column names, data type, restrictions and extended property descriptions.

How can this be achieved?

4 Answers

To generate a data dictionary of your SQL Server database, I suggest you use ERBuilder data modeller, just follow these steps:

To generate an ER diagram it is necessary to first, reverse engineer your database select: Menu -> File -> Reverse Engineer the ER diagram will be displayed in ERBuilder. To generate a data dictionary of your database select: Menu -> Tool -> Generate model documentation

Since this is the first search result for 'mssql data dictionary', here's a simple query to get the list of tables and columns in a db -

select table_name, ordinal_position, column_name, data_type 
from information_schema.columns 
order by table_name, ordinal_position;

giving eg

"table_name","ordinal_position","column_name","data_type"
Account,1,Account,varchar
Account,2,Type,varchar
Account,3,Description,varchar
Account,4,Rollup_Account,varchar
Account,5,Last_Updated,datetime
Account,6,Section_Name,varchar
Account,7,QB_ID,varchar
Additional_Charge,1,Additional_ChargeKey,int
Additional_Charge,2,Additional_Charge,int
...
Related