Showing posts with label dependent. Show all posts
Showing posts with label dependent. Show all posts

Friday, February 24, 2012

How to find Dependent/Referenced Objects of a Stored Procedure?

Hi Frens,

Could anybody tell me how can I find all the database objects that are used in /referenced by/called by/dependent on a given stored procedure? In other words, I am looking for something like a stored procedure or a function that takes as input the name of a stored procedure and outputs all the names of the tables, functions, procedures, cursors and etc. database objects that are used in that procedure. Could you please give me suggestions or possible answers for this?

Thanks a lot for your time.
Regards,
-Ram.Sure, take this query here:

Select OBJECT_NAME(id),OBJECT_NAME(depid) from sysdepends

WHERE id = OBJECT_ID('YourPrcoedurename')

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

|||Thanks Jens.

How to find dependent objects?

Hi,
Is there any way to find out all the dependent objects in sql server?
Sp_depends doesnt do it sysdepends table corruption.
Any thoughts?
Thanks
> Is there any way to find out all the dependent objects in sql server?
> Sp_depends doesnt do it sysdepends table corruption.
You might want to check a 3rd party tol, for example
http://www.red-gate.com/sql/more/sysdepends.htm.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

How to find dependent objects?

Hi,
Is there any way to find out all the dependent objects in sql server?
Sp_depends doesnt do it sysdepends table corruption.
Any thoughts?
Thanks> Is there any way to find out all the dependent objects in sql server?
> Sp_depends doesnt do it sysdepends table corruption.
You might want to check a 3rd party tol, for example
http://www.red-gate.com/sql/more/sysdepends.htm.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com

How to find dependent objects?

Hi,
Is there any way to find out all the dependent objects in sql server?
Sp_depends doesnt do it sysdepends table corruption.
Any thoughts?
Thanks> Is there any way to find out all the dependent objects in sql server?
> Sp_depends doesnt do it sysdepends table corruption.
You might want to check a 3rd party tol, for example
http://www.red-gate.com/sql/more/sysdepends.htm.
--
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com