How to document a SQL Server database with extended properties

ApexSQL Doc, a SQL Server documentation tool, displays descriptions for SQL database objects using the extended properties that are stored in the SQL Server database. The Extended property editor feature allows you to add or edit your database object descriptions using the extended properties that are stored in your SQL Server database. The extended property of an object can be fully customized from a specialized dialog, opened by clicking the Extended property editor button in the Tools group of the Home tab:

Documenting SQL databases - Extended property editor

In the Connect to SQL Server dialog, select the server and connection parameters, as well as the database that needs to be edited:

Connect to SQL Server dialog

After selecting the Extended property name from the drop-down list, all object names that match the selected extended property name will be shown, and the Description box in the main grid will be filled. By default, MS_Description is selected as an extended property name.

With a click on the Filter row button from the top menu bar, the filter row will appear at the top of each column, to filter out unneeded objects, allowing to quickly find the objects that need to be edited:

Filtering out unneeded SQL objects in ApexSQL Doc

If the expand sign “+” next to each object is clicked, additional elements such as columns, primary keys, parameters etc. can be edited further:

Editing additional elements such as columns, primary keys

Adding or editing a description of a specific database object can be done by typing it directly into the description field in the grid, or using the Edit extended properties dialog, which is opened on a click of the ellipsis (…) button in the description field:

The ellipsis button in the description field

While the description field displays a very limited number of characters, in the Edit extended properties dialog, a longer description can be entered, while retaining maximum visibility:

Edit extended properties dialog

SQL Server Management Studio makes managing objects’ extended properties, such as object descriptions, tedious work. The Extended property editor feature helps with the SQL database documentation, and simplifies the task making management and editing of extended properties easier.

Useful links:

March 4, 2015