A complete and precise documentation serves a good basis for developers and DBAs during their onboarding to get a general picture of the database they start working with. Creating such a documentation manually takes a lot of time and effort. So you seat for hours and hours digging through the database structure figuring out its functionality, data types stored therein, building relationship diagrams, etc. Moreover, every time changes are introduced to the database, you have to get back to it update the documentation by hand. This definitely feels like a burden and you keep delaying it until the last minute.
However, this tiresome work can be avoided if you use a tool that automates the documentation process. One of such tools is dbForge Documenter for SQL Server from Devart. It is an automated database generation utility that creates a comprehensive and professionally looking documentation in just a few clicks.
This article covers the key features and advantages of Documenter and explains how to use the tool to automatically generate SQL database documentation.
Documenter is an easy-to-use tool and a big time saver when it comes to extracting an extensive data on database objects, properties, inter-object dependencies, and other info. The tool includes a rich set of features for customizing documentation output to meet your specific requirements.
Another great feature of Documenter is that it seamlessly integrates into SQL Server Management Studio (SSMS) so that you can document databases directly from the Object Explorer of your SSMS solution.
Now let’s move from words to deeds and see Documenter in action. The following example demonstrates how to generate documentation for the AdventureWorks2012 sample database.
- Start dbForge Documenter for SQL Server. Click New Documenter… on the Start Page.
- Select one or several existing connections from the list or create a new one.
- After you click the Select button, the Database Documenter project window will open with an object hierarchy structure pane on the left and a preview pane on the right.
- The preview pane initially shows the Cover Page of the documentation, where you can switch on breadcrumb navigation links, add a logo, specify a header, title, and descriptive text of the documentation, as well as specify the author and the date of creation.
- In the upper right, you can select a style defining the overall appearance of the documentation. Documenter provides a number of style templates and also allows to use various Bootstrap themes to change the look of the documentation. This approach makes the documentation highly customizable in terms of style and presentation.
- In the search field of the Structure pane, start typing the database name you want to document. For example, type “Adv…”. As you type, Documenter filters out the databases and displays only the matching ones and highlights the relevant letters of the search text.
- Click the AdventureWorks2012 arrow in the structure pane to expand the list of database objects. Documenter retrieves metadata from the database and analyzes its structure.
- Once the data have been extracted, the Structure pane displays a tree-view structure of the database entities.
- Select the components you want to document. These can be the components at different levels, such as the entire database, or a specific table, or a column of a table.
- As you select the components, the preview pane shows details relating to the components under the following sections: Description, Object Types, Properties, Options, Database Files, and Sections To Include. These are the database-level sections.
Documenter allows you to configure elements of documentation on several levels, including:
– servers level;
– server level;
– databases level;
– database level;
– objects group level;
– database object level.
For example, in the structure pane, click the arrow next to Tables to expand the list of available tables and then select the Person.Address table.
The Documenter opens a preview of the table with the following sections: Description, Properties, Columns, Indexes, Foreign Keys, SQL Script, Depends On, Used By. You can exclude any of the listed sections and also specific properties (in the Properties section) for the Person.Address table so that they will not appear in the generated documentation.
- A nice and useful feature of Documenter is support of MS_Description, a descriptive text added to database objects by database designers. Documenter pulls this text from the MS_Description extended properties and automatically inserts it into the Description field of a database object. You can edit the descriptions directly in Documenter.
- When all settings of the Documenter are configured, click Generate to proceed to the generation of documentation.
- In the Generate Documentation dialog box, you should choose a file format for the documentation. HTML format is suitable for databases to be uploaded to a web server. The HTML documentation requires no specific viewer tool (just web browser) and can be instantly shared among a group of people. PDF is good for distributing to various systems and devices. Both formats are searchable, which is very convenient especially for large databases.
- Next, specify the folder to store the generated documentation.
- Click the Generate button and enjoy the progress of the database generation.
- In a minute, your Adventure Works2012 documentation is ready!
Documenter presents documentation in an easy to view format, so you can share it with your boss or clients, other developers, DBAs, testers, project managers, business executives or other related persons.
Conclusion
As you can see, dbForge Documenter for SQL Server fully automates the documentation process and creates a professionally looking technical description of an SQL Server database.
Reference: Pinal Dave (http://blog.sqlauthority.com)
First appeared on SQL SERVER – How to Automatically Generate SQL Server Documentation ?