Last updated: 2026-02-12

Dependency Viewer

Understand database object relationships before making changes. Dependency Viewer shows what objects depend on a table, view, procedure, or function, and what objects they depend on in return.

Why Dependency Analysis Matters

Before modifying or dropping a database object, you need to understand its impact:

  • Rename a column? Views and procedures referencing it may break
  • Drop a table? All dependent views, procedures, and functions will fail
  • Modify a procedure? Other procedures calling it might need updates

Dependency Viewer gives you this visibility, helping prevent unintended breakages.

Opening Dependency Viewer

View dependencies for any database object from Object Explorer:

From Context Menu

  1. Expand your database in Object Explorer
  2. Right-click any table, view, stored procedure, or function
  3. Select View Dependencies
  4. The Dependency Viewer opens in a new tab

Supported Objects

Dependency analysis works with:

  • Tables - See views, procedures, and functions that reference the table
  • Views - See underlying tables and dependent objects
  • Stored Procedures - See tables used and other procedures that call it
  • Functions - See tables used and objects that call the function

Understanding Dependencies

Dependencies are shown in two directions:

Dependency Viewer showing the tree view with Uses and Used By sections.
Dependency Viewer showing the tree view with Uses and Used By sections.

Uses (Dependencies)

Objects that the selected object depends on. If any of these objects are dropped, the selected object may break.

Example: A view vw_CustomerOrders uses:

  • Customers table
  • Orders table
  • OrderDetails table

Used By (Dependents)

Objects that depend on the selected object. These objects may break if you modify or drop the selected object.

Example: A table Products is used by:

  • vw_ProductInventory view
  • sp_UpdateStock procedure
  • fn_GetProductPrice function

Direct vs Indirect Dependencies

Dependencies can be direct or indirect:

  • Direct - Object A directly references Object B
  • Indirect - Object A references Object B, which references Object C (A indirectly depends on C)

The tree view shows the full dependency chain, letting you expand nodes to see indirect dependencies.

Tree View

The default view presents dependencies as an expandable tree:

Navigating the Tree

  • Expand/Collapse - Click the arrow icon to show or hide child dependencies
  • Select - Click an object to see its details in the panel
  • Open - Double-click to open the object (Table Explorer for tables, script view for procedures)

Object Icons

Each object type has a distinctive icon for quick identification:

IconObject TypeDescription
GridTableBase tables with data
EyeViewVirtual tables based on queries
CodeStored ProcedureExecutable SQL routines
FunctionFunctionScalar or table-valued functions
ColumnColumnIndividual column reference

Graph View

For a visual representation of dependencies, switch to Graph View:

Graph view showing visual representation of object dependencies.
Graph view showing visual representation of object dependencies.

Reading the Graph

  • Nodes - Each database object is a node with its name and type icon
  • Arrows - Point from dependent object to the object it depends on
  • Colors - Object types are color-coded (blue for tables, green for views, purple for procedures)
  • Selected object - Highlighted in the center of the graph

Graph Navigation

  • Pan - Click and drag to move the view
  • Zoom - Scroll or use +/- buttons
  • Fit - Click Fit to show all nodes
  • Select - Click a node to select it
  • Open - Double-click to open the object

Navigation

Efficiently navigate through dependencies:

Change Focus

Click any object in the dependency graph to make it the new focus. The dependency tree rebuilds around the selected object, showing its own dependencies and dependents.

Back Navigation

Use the Back button to return to previously viewed objects, maintaining your exploration history.

Jump to Definition

Right-click an object and select:

  • Open - Opens tables in Table Explorer, others in script view
  • Script as CREATE - Opens the CREATE script in a new query tab
  • Locate in Object Explorer - Highlights the object in the sidebar tree

Use Cases

Impact Analysis Before Schema Changes

  1. Open Dependency Viewer for the object you want to modify
  2. Review the "Used By" section to see all dependent objects
  3. Check column-level dependencies if renaming or removing columns
  4. Plan updates to all affected objects before making changes

Understanding Unknown Objects

  1. When encountering an unfamiliar stored procedure or view
  2. View its dependencies to understand what data sources it uses
  3. The "Uses" tree shows all underlying tables and other objects
  4. Column details help understand the query structure

Database Refactoring

  1. Identify objects with too many dependencies (high coupling)
  2. Find unused objects with no dependents
  3. Plan a safe order for dropping objects (children before parents)

Ready to Analyze Dependencies?

Download Jam SQL Studio and understand your database relationships.