docdb.console 0.9.0-g52635d6cc9

This is a prerelease version of docdb.console.
dotnet tool install --global docdb.console --version 0.9.0-g52635d6cc9                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local docdb.console --version 0.9.0-g52635d6cc9                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=docdb.console&version=0.9.0-g52635d6cc9&prerelease                
nuke :add-package docdb.console --version 0.9.0-g52635d6cc9                

DocDB

Generate metadata from SQL Server databases for use with DocFX to generate reference documentation.

NuGet Status MIT License

You can use this tool to generate meta data files (<code>.yml</code> files) for a given SQL Server database. Then use <code>docfx</code> to generate reference documentation like you would do for other languages (e.g. C#).

Warning: Albeit usable, this tool is not complete. Still lacking are unit tests and code coverage and integration style tests. YMMV.

Features

DocDB can document the following SQL Server objects:

  • Tables (including indexes, checks, keys, triggers)
  • Stored Procedures
  • Functions (scalar, table valued, aggregates)
  • Types (data types, table types, CLR types)
  • Assemblies (incl. decompilied C# code)
  • DDL Triggers
  • XML Schema collections
  • Parition information (functions, schemes)
  • Sequences
  • Rules
  • Defaults
  • Roles (database and application roles)
  • Users
  • Synonyms
  • Schemas
  • Database itself (files, filegroups, settings, etc.)

All documents and objects are cross references (for example, foreign keys to target table). For every applicable object, the relevant SQL CREATE script is included.

Additionally, a table of contents is generated that structures the objects as they are in the Object Explorer of SSMS.

Getting Started

  1. Install docfx as a global tool:
dotnet tool install -g docfx
  1. Install DocDB as a global tool:
dotnet tool install -g docdb.console

TODO: Document rest of procedure (or see AdventureWorks2022 sample).

Examples

The following pictures are based on the AdventureWorks Sample Database. To generate those yourself see AdventureWorks2022 sample.

alternate text is missing from this package README image Database Overview

alternate text is missing from this package README image Table Details

alternate text is missing from this package README image Views Overview

alternate text is missing from this package README image Stored Procedure Details

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.9.0-g52635d6cc9 54 1/1/2025