How to find the dependent objects of stored procedure without using sp_depends?


Following query can be used to find the dependent objects information of a stored procedure without using sp_depends:


select name from sysobjects where id
in
(select dep.depid
from sysdepends  dep
inner join sysobjects obj
on dep.id= obj.id and
obj.name=<Stored Procedure Name>)


Example: 

To find out the dependent objects of USP_CLASS_OF_STUD stored procedure, following query will be used.

select name from sysobjects where id
in
(select dep.depid
from sysdepends  dep
inner join sysobjects obj
on dep.id= obj.id and
obj.name='USP_CLASS_OF_STUD')



 

This entry was posted in . Bookmark the permalink.

Leave a reply