Create Call Graphs with Visual Expert for SQL Server
WHY USE CALL GRAPHS?
A call graph is a diagram representing objects referencing each others (multiple levels).
This graph can be used to:
- Document the inner workings of an application, analyze every possible run.
- Predict the impact of a change
- Track the flow of values between procedures
- Detect anomalies of program execution, find procedures never called.
- etc.
How to Generate a Call Hierarchy Diagram for SQL Server Code?
- In the treeview, select a stored procedure or a table, a function, a trigger, etc.
- Go to [Diagrams] in the ribbon menu, and click on "Called Hierarchy diagram".
- A diagram is generated. When hovering an item, a tooltip shows details about this item.
![generate call tree diagrams for database objects](/images/generate-call-tree-diagrams-for-oracle-and-sql-server-code-1.png)
- You can highlight a particular entity and its dependencies:
Select it in the diagram, all the connected items will be highlighted in blue
![generate call tree diagrams for oracle and sql server database code with visual expert](/images/generate-call-tree-diagrams-for-oracle-and-sql-server-code-2b.png)
- If you select an entity in the diagram, its code is displayed in the source code view.
![generate call tree diagrams for SQL Server code](/images/generate-call-tree-diagrams-for-sql-server-code-3b.png)
The Call Graph Diagram macro also includes a parameter to limit the number of items displayed.
If need be, users can change the default value in the [Options] window.
- Mouse over the Call Graph (Diagram) macro in the Navigation Bar and click on the
icon.
![Set Call Graph Diagram Parameter](/images/Set-Call-Diagram-Parameter.png)
- A new [Options] window will open on your screen.
![Set Display Items Number Value](/images/Set-Display-Items-Number.png)
- Set the "Number of items displayed" to any value below 300.
By default, this value will be set to 150.
- In case, the resultant items for Call Graph (Diagram) feature exceed the set value by user,
Visual Expert will display an error message. See below:
![Call Graph Items Warning Message](/images/Call-Graph-Items-Warning.png)
Learn More