sp_depends is a system stored procedure which will be used to find out the dependent objects of a particular database object.

Syntax for sp_depends is:

sp_depdens <database object Name>


Here is an example for sp_depends in case of stored procedure:

Syntax foe finding out dependent database objects on a stored procedure is :

sp_depends < stored procedure Name>

This will return all the tables, stored procedures, function , views etc., database objects which are used to build stored procedure.

Below picture shows the dependent database object on USP_CLASS_OF_STUD stored procedure:

This entry was posted in . Bookmark the permalink.

Leave a reply