April 28, 2009 at 3:26 am
sp_depends is giving perfect result.For example
I created PRC2 SP.
CREATE PROC PRC2 AS
BEGIN
Print 'PROC2'
END
PRC2 SP is used in PRC1
CREATE PROC PRC1 AS
BEGIN
exec PRC2
Print 'PROC1'
END
When i execute SP_Depends PRC1 it is displaying PRC2 as depends.This is right.
when i drop and Create PRC2
DROP PROC PRC2
When i execute SP_Depends PRC1 it is not displaying depends.
Please can you tell me how to find depends.
April 28, 2009 at 7:05 am
Unfortunately because the way that SQL Server tracks dependencies sp_depends and the sysdepends table are not always accurate. Mainly because of situations like you describe, and also because SQL Server uses deferred name resolution so you can reference an object that does not exist because SQL Server assumes you are going to create it.
sysdepends uses the object id to track dependencies and when you drop and recreate an object the object_id changes.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply