Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Its All About SQL Server
Browse by Tags · View All
Sql Server 2008 39
SQL Server 2012 39
Sql Server 2005 37
SQL Server Basics 11
TSQL Tips n Tricks 11
Performance Tuning 11
Sql Server Management 10
SQL Server Log 9
SQL Server Errors 9
Scripts 8

Archive · View All
July 2012 12
August 2012 8
September 2012 6
June 2012 6
November 2011 5
October 2011 3
August 2011 3
November 2012 2
October 2012 2
January 2012 2

SQL Server Scripts: Get All Nested Stored Procedures List (Procedures with dependent Procedures)

Jul 23 2012 1:35PM by aasim abdullah   


A stored procedure can be called from another stored procedure as nested stored procedure. Recently on production server, we were asked for all stored procedures in which other stored procedures are called as nested. Here is simple script.
SELECT  * FROM (SELECT  NAME ASProcedureName, SUBSTRING(( SELECT  ', ' + OBJDEP.NAME
FROM    sysdepends
        INNER JOIN sys.objects OBJ ON sysdepends.ID = OBJ.OBJECT_ID
        INNER JOIN sys.objects OBJDEP ON sysdepends.DEPID = OBJDEP.OBJECT_ID
WHERE obj.type = 'P'  
AND Objdep.type = 'P'
AND sysdepends.id = procs.object_id
ORDER BY OBJ.name

FOR
XML PATH('')
), 2, 8000) AS NestedProcedures
FROM sys.procedures  procs )InnerTab
WHERENestedProcedures IS NOTNULL



Republished from Connect SQL [12 clicks].  Read the original version here [1 clicks].

aasim abdullah
23 · 7% · 2372
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"SQL Server Scripts: Get All Nested Stored Procedures List (Procedures with dependent Procedures)" rated 5 out of 5 by 1 readers
SQL Server Scripts: Get All Nested Stored Procedures List (Procedures with dependent Procedures) , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]