Dependency diagram (DOT)
generate_dependency_dotGenerate a Graphviz DOT diagram of SQL Server database object dependencies, with arrows from tables, views, procedures, and functions to referenced objects.
Instructions
Generates a Graphviz DOT diagram of the dependencies between database objects: an arrow runs from each table, view, procedure or function to the object it depends on, through a foreign key or a reference in its code. Returns the DOT text in 'dot', ready for 'dot -Tsvg', and the same graph as 'nodes' (with node_kind) and 'edges' (with dependency_kind). Use it to draw the graph; for the edges alone use get_dependency_graph, and for what references a single table use get_table_usage. A whole database makes an unreadable diagram, so narrow it with schema. 'visibility' says when references from code are missing for lack of permission.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Filter by schema name. Empty means every schema. Example: 'Feeder' | |
| database | Yes | Name of the database as registered in the configuration. |