<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Get the List of Object Dependencies &#8211; sp_depends and information_schema.routines and sys.dm_sql_referencing_entities</title>
	<atom:link href="http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Basavaraj</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-465452</link>
		<dc:creator><![CDATA[Basavaraj]]></dc:creator>
		<pubDate>Sun, 28 Apr 2013 07:37:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-465452</guid>
		<description><![CDATA[It can happen if you are missing schema prefix. Try prefixing schema example dbo.Employee]]></description>
		<content:encoded><![CDATA[<p>It can happen if you are missing schema prefix. Try prefixing schema example dbo.Employee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avaneesh1@gmail.com</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-452952</link>
		<dc:creator><![CDATA[avaneesh1@gmail.com]]></dc:creator>
		<pubDate>Wed, 10 Apr 2013 06:47:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-452952</guid>
		<description><![CDATA[Dear Pinal and everyone, This is very interesting thread for me. Actually, yesterday itself I renamed one of my tables as the data was getting bulky and I decided not to drop the table or truncate the data. Just firstly I shall monitor the performance of the system after creating a new table by the same name, if every thing works fine then I shall  drop the original table leaving the newly created table intact. So, I created a new table by the same name and renamed the original table. Now when I run the sp_depends the new table does not show any dependencies while the old one shows the dependencies whereas when I right click on the respective tables to &quot;view dependencies&quot; the situation is vice versa i.e the original table does not show dependencies and the newly created table shows them. Please advice.....]]></description>
		<content:encoded><![CDATA[<p>Dear Pinal and everyone, This is very interesting thread for me. Actually, yesterday itself I renamed one of my tables as the data was getting bulky and I decided not to drop the table or truncate the data. Just firstly I shall monitor the performance of the system after creating a new table by the same name, if every thing works fine then I shall  drop the original table leaving the newly created table intact. So, I created a new table by the same name and renamed the original table. Now when I run the sp_depends the new table does not show any dependencies while the old one shows the dependencies whereas when I right click on the respective tables to &#8220;view dependencies&#8221; the situation is vice versa i.e the original table does not show dependencies and the newly created table shows them. Please advice&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jorge L.</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-449379</link>
		<dc:creator><![CDATA[Jorge L.]]></dc:creator>
		<pubDate>Wed, 03 Apr 2013 16:46:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-449379</guid>
		<description><![CDATA[Pinal,

Under which conditions does your query fail to return any information?
I am testing it with table names I know for sure either depend on other tables or have tables that depend on them.  However, it always comes back with empty results.  I am using SQL Server 2008.

Thanks]]></description>
		<content:encoded><![CDATA[<p>Pinal,</p>
<p>Under which conditions does your query fail to return any information?<br />
I am testing it with table names I know for sure either depend on other tables or have tables that depend on them.  However, it always comes back with empty results.  I am using SQL Server 2008.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shikha sharma</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-437054</link>
		<dc:creator><![CDATA[shikha sharma]]></dc:creator>
		<pubDate>Thu, 14 Mar 2013 06:12:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-437054</guid>
		<description><![CDATA[bt it doesnt show the name of dependent table as well as column]]></description>
		<content:encoded><![CDATA[<p>bt it doesnt show the name of dependent table as well as column</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #015 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-419684</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #015 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 09 Feb 2013 01:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-419684</guid>
		<description><![CDATA[[...] Get the List of Object Dependencies – sp_depends and information_schema.routines and sys.dm_sql_re...I have quite often seen that information_schema. Routines give proper dependency relationship where assp_depends returns an incorrect answer. However, as per book online sp_depends will be deprecated, and instead, sys.dm_sql_referencing_entities and sys.dm_sql_referenced_entities are recommended. Let us quickly see where sp_depends fail and other solutions work fine. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Get the List of Object Dependencies – sp_depends and information_schema.routines and sys.dm_sql_re&#8230;I have quite often seen that information_schema. Routines give proper dependency relationship where assp_depends returns an incorrect answer. However, as per book online sp_depends will be deprecated, and instead, sys.dm_sql_referencing_entities and sys.dm_sql_referenced_entities are recommended. Let us quickly see where sp_depends fail and other solutions work fine. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pepro</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-399641</link>
		<dc:creator><![CDATA[Pepro]]></dc:creator>
		<pubDate>Wed, 26 Dec 2012 22:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-399641</guid>
		<description><![CDATA[How about If you want to determine column dependencies, that is: which column(s) are used to calculate another for instance:

 create view vwTest as
select t1.field1 + t2.field2 as Calculation from table1 t1 inner join table2 t2 on t1.id = t2.id

 
Dependencie info should show something like:

Object	&#124; Column	&#124; Depends On	&#124; Depends On Column 
--------+---------------+---------------+-------------------
vwTest	&#124; Calculation	&#124; Table1 	&#124; Field1 
vwTest 	&#124; Calculation	&#124; Table2 	&#124; Field2 


I&#039;ve tried sql_expression_dependencies and other metatada views from sqlServer but I haven&#039;t been able to get this info

Because it doen&#039;t link column with dependant columns]]></description>
		<content:encoded><![CDATA[<p>How about If you want to determine column dependencies, that is: which column(s) are used to calculate another for instance:</p>
<p> create view vwTest as<br />
select t1.field1 + t2.field2 as Calculation from table1 t1 inner join table2 t2 on t1.id = t2.id</p>
<p>Dependencie info should show something like:</p>
<p>Object	| Column	| Depends On	| Depends On Column<br />
&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
vwTest	| Calculation	| Table1 	| Field1<br />
vwTest 	| Calculation	| Table2 	| Field2 </p>
<p>I&#8217;ve tried sql_expression_dependencies and other metatada views from sqlServer but I haven&#8217;t been able to get this info</p>
<p>Because it doen&#8217;t link column with dependant columns</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fidelis</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-370704</link>
		<dc:creator><![CDATA[Fidelis]]></dc:creator>
		<pubDate>Wed, 07 Nov 2012 09:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-370704</guid>
		<description><![CDATA[Thanks for this resource material, it is really educating and self teaching]]></description>
		<content:encoded><![CDATA[<p>Thanks for this resource material, it is really educating and self teaching</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Epon</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-305059</link>
		<dc:creator><![CDATA[Epon]]></dc:creator>
		<pubDate>Sun, 24 Jun 2012 07:43:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-305059</guid>
		<description><![CDATA[sys.dm_sql_referenced_entities always raise error when some referenced entities have not been found. then my question is:

how do you ignore those errors, when your procedure contains &quot;select into statement&quot;?

i have been looking around for days and yet no better solution than a try...catch. :-( 

any suggestion please?]]></description>
		<content:encoded><![CDATA[<p>sys.dm_sql_referenced_entities always raise error when some referenced entities have not been found. then my question is:</p>
<p>how do you ignore those errors, when your procedure contains &#8220;select into statement&#8221;?</p>
<p>i have been looking around for days and yet no better solution than a try&#8230;catch. :-( </p>
<p>any suggestion please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niall</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-210858</link>
		<dc:creator><![CDATA[Niall]]></dc:creator>
		<pubDate>Sun, 04 Dec 2011 20:48:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-210858</guid>
		<description><![CDATA[@madhivanan, I guess you didn&#039;t read the article:  &quot;sp_depends does not give appropriate results whereas information_schema.routines does give proper answer.

I have quite often seen that information_schema.routines gives proper dependency relationship where assp_depends returns an incorrect answer. However, as per book online sp_depends will be deprecated, and instead, sys.dm_sql_referencing_entities and sys.dm_sql_referenced_entities are recommended.&quot;]]></description>
		<content:encoded><![CDATA[<p>@madhivanan, I guess you didn&#8217;t read the article:  &#8220;sp_depends does not give appropriate results whereas information_schema.routines does give proper answer.</p>
<p>I have quite often seen that information_schema.routines gives proper dependency relationship where assp_depends returns an incorrect answer. However, as per book online sp_depends will be deprecated, and instead, sys.dm_sql_referencing_entities and sys.dm_sql_referenced_entities are recommended.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vguruprasad</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-210645</link>
		<dc:creator><![CDATA[vguruprasad]]></dc:creator>
		<pubDate>Sun, 04 Dec 2011 13:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-210645</guid>
		<description><![CDATA[How about using SYS.SQL_Expression_Dependencies?]]></description>
		<content:encoded><![CDATA[<p>How about using SYS.SQL_Expression_Dependencies?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Niall</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-196550</link>
		<dc:creator><![CDATA[Niall]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 04:08:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-196550</guid>
		<description><![CDATA[Love it - exactly what I was after.
Thanks heaps Lisa.]]></description>
		<content:encoded><![CDATA[<p>Love it &#8211; exactly what I was after.<br />
Thanks heaps Lisa.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pekka</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-183335</link>
		<dc:creator><![CDATA[Pekka]]></dc:creator>
		<pubDate>Tue, 25 Oct 2011 11:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-183335</guid>
		<description><![CDATA[try sp_depends]]></description>
		<content:encoded><![CDATA[<p>try sp_depends</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-177991</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 12 Oct 2011 14:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-177991</guid>
		<description><![CDATA[You can use sp_depends system stored procedure

EXEC sp_depends &#039;yyour spname&#039;]]></description>
		<content:encoded><![CDATA[<p>You can use sp_depends system stored procedure</p>
<p>EXEC sp_depends &#8216;yyour spname&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavan Nayakanti</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-177854</link>
		<dc:creator><![CDATA[Pavan Nayakanti]]></dc:creator>
		<pubDate>Wed, 12 Oct 2011 07:58:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-177854</guid>
		<description><![CDATA[Am trying to figure out a way to find the list of SPs which are using a table and a column. Let me know if someone has any inputs to do.

Appreciate your help. - Thnx]]></description>
		<content:encoded><![CDATA[<p>Am trying to figure out a way to find the list of SPs which are using a table and a column. Let me know if someone has any inputs to do.</p>
<p>Appreciate your help. &#8211; Thnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Have fun online</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-177625</link>
		<dc:creator><![CDATA[Have fun online]]></dc:creator>
		<pubDate>Tue, 11 Oct 2011 18:41:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-177625</guid>
		<description><![CDATA[That was a frankly amazing piece]]></description>
		<content:encoded><![CDATA[<p>That was a frankly amazing piece</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa Morgan</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-169679</link>
		<dc:creator><![CDATA[Lisa Morgan]]></dc:creator>
		<pubDate>Mon, 19 Sep 2011 20:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-169679</guid>
		<description><![CDATA[For quick and dirty results, I just use:
SELECT     TOP (100) PERCENT OBJECT_NAME(d.object_id) AS SP_Or_Function, OBJECT_NAME(d.referenced_major_id) AS TableReferenced
FROM         sys.sql_dependencies AS d INNER JOIN
                      sys.all_sql_modules AS m ON m.object_id = d.object_id
GROUP BY OBJECT_NAME(d.object_id), OBJECT_NAME(d.referenced_major_id)
ORDER BY SP_Or_Function, TableReferenced]]></description>
		<content:encoded><![CDATA[<p>For quick and dirty results, I just use:<br />
SELECT     TOP (100) PERCENT OBJECT_NAME(d.object_id) AS SP_Or_Function, OBJECT_NAME(d.referenced_major_id) AS TableReferenced<br />
FROM         sys.sql_dependencies AS d INNER JOIN<br />
                      sys.all_sql_modules AS m ON m.object_id = d.object_id<br />
GROUP BY OBJECT_NAME(d.object_id), OBJECT_NAME(d.referenced_major_id)<br />
ORDER BY SP_Or_Function, TableReferenced</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-168114</link>
		<dc:creator><![CDATA[Gabriel]]></dc:creator>
		<pubDate>Wed, 14 Sep 2011 21:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-168114</guid>
		<description><![CDATA[Hi Pinal, may be I&#039;m late :) but I wrote an old query to solve the problem you set, I&#039;ve tested in both scenarios and brings the right result.

Here it is, I know is a bit old and kind of &quot;artistic&quot; -LOL- I wanted to analyze all kind of objects, but never implemented that part.....

Regards
Gabriel

====FOLLOW SCRIPT====


/* ******************************************************
   *                                                    *
   *	Retrieve depending objects on a given table		*
   *                                                    *
   **************************************************** */

DECLARE 
@ObjectName SYSNAME,
@ObjectType VARCHAR(5),
@ObjectID AS BIGINT    


/*	Load table name to analyze */
SET @ObjectName=&#039;First&#039;

/*	Press F5	*/ 

--SET @ObjectType=&#039;TABLE&#039;   &lt;--- Not Implemented

 SELECT TOP(1) @ObjectID = object_id
 FROM sys.objects
 WHERE name = @ObjectName
 --AND type = ISNULL(@ObjectType, type)    

PRINT @ObjectID

 SET NOCOUNT ON ;    

       WITH DependentObjectCTE (DependentObjectID, DependentObjectName, ReferencedObjectName, ReferencedObjectID)
         AS
         (
         SELECT DISTINCT
                sd.object_id,
                OBJECT_NAME(sd.object_id),
                ReferencedObject = OBJECT_NAME(sd.referenced_major_id),
                ReferencedObjectID = sd.referenced_major_id
         FROM    
                sys.sql_dependencies sd
                JOIN sys.objects so ON sd.referenced_major_id = so.object_id
         WHERE   
                sd.referenced_major_id = @ObjectID
         UNION ALL
         SELECT
                sd.object_id,
                OBJECT_NAME(sd.object_id),
                OBJECT_NAME(referenced_major_id),
                object_id
         FROM    
                sys.sql_dependencies sd
             JOIN DependentObjectCTE do ON sd.referenced_major_id = do.DependentObjectID       
         WHERE
                sd.referenced_major_id  sd.object_id     
         )
         SELECT DISTINCT
                DependentObjectName
         FROM   
                DependentObjectCTE c]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal, may be I&#8217;m late :) but I wrote an old query to solve the problem you set, I&#8217;ve tested in both scenarios and brings the right result.</p>
<p>Here it is, I know is a bit old and kind of &#8220;artistic&#8221; -LOL- I wanted to analyze all kind of objects, but never implemented that part&#8230;..</p>
<p>Regards<br />
Gabriel</p>
<p>====FOLLOW SCRIPT====</p>
<p>/* ******************************************************<br />
   *                                                    *<br />
   *	Retrieve depending objects on a given table		*<br />
   *                                                    *<br />
   **************************************************** */</p>
<p>DECLARE<br />
@ObjectName SYSNAME,<br />
@ObjectType VARCHAR(5),<br />
@ObjectID AS BIGINT    </p>
<p>/*	Load table name to analyze */<br />
SET @ObjectName=&#8217;First&#8217;</p>
<p>/*	Press F5	*/ </p>
<p>&#8211;SET @ObjectType=&#8217;TABLE&#8217;   &lt;&#8212; Not Implemented</p>
<p> SELECT TOP(1) @ObjectID = object_id<br />
 FROM sys.objects<br />
 WHERE name = @ObjectName<br />
 &#8211;AND type = ISNULL(@ObjectType, type)    </p>
<p>PRINT @ObjectID</p>
<p> SET NOCOUNT ON ;    </p>
<p>       WITH DependentObjectCTE (DependentObjectID, DependentObjectName, ReferencedObjectName, ReferencedObjectID)<br />
         AS<br />
         (<br />
         SELECT DISTINCT<br />
                sd.object_id,<br />
                OBJECT_NAME(sd.object_id),<br />
                ReferencedObject = OBJECT_NAME(sd.referenced_major_id),<br />
                ReferencedObjectID = sd.referenced_major_id<br />
         FROM<br />
                sys.sql_dependencies sd<br />
                JOIN sys.objects so ON sd.referenced_major_id = so.object_id<br />
         WHERE<br />
                sd.referenced_major_id = @ObjectID<br />
         UNION ALL<br />
         SELECT<br />
                sd.object_id,<br />
                OBJECT_NAME(sd.object_id),<br />
                OBJECT_NAME(referenced_major_id),<br />
                object_id<br />
         FROM<br />
                sys.sql_dependencies sd<br />
             JOIN DependentObjectCTE do ON sd.referenced_major_id = do.DependentObjectID<br />
         WHERE<br />
                sd.referenced_major_id  sd.object_id<br />
         )<br />
         SELECT DISTINCT<br />
                DependentObjectName<br />
         FROM<br />
                DependentObjectCTE c</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-160569</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 10:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-160569</guid>
		<description><![CDATA[Do you want to find relations for reach table individually?]]></description>
		<content:encoded><![CDATA[<p>Do you want to find relations for reach table individually?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Puneet Jaggi</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-160562</link>
		<dc:creator><![CDATA[Puneet Jaggi]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 10:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-160562</guid>
		<description><![CDATA[I generally runs the following query to know the usage of sql object across the whole db:

select b.name,b.xtype,a.text from syscomments a (nolock)
inner join sysobjects b (nolock)
on a.id = b.id
where a.text like &#039;%Table1%&#039;

in the example above &#039;Table1&#039; is my table name.

Thanks,
Puneet Jaggi]]></description>
		<content:encoded><![CDATA[<p>I generally runs the following query to know the usage of sql object across the whole db:</p>
<p>select b.name,b.xtype,a.text from syscomments a (nolock)<br />
inner join sysobjects b (nolock)<br />
on a.id = b.id<br />
where a.text like &#8216;%Table1%&#8217;</p>
<p>in the example above &#8216;Table1&#8242; is my table name.</p>
<p>Thanks,<br />
Puneet Jaggi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nirav Raval</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-156016</link>
		<dc:creator><![CDATA[Nirav Raval]]></dc:creator>
		<pubDate>Thu, 11 Aug 2011 05:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-156016</guid>
		<description><![CDATA[@Sanjay,
You must have some prefix with the backup procedures/functions/views.. use it... :)]]></description>
		<content:encoded><![CDATA[<p>@Sanjay,<br />
You must have some prefix with the backup procedures/functions/views.. use it&#8230; :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-149727</link>
		<dc:creator><![CDATA[Sanjay]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 07:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-149727</guid>
		<description><![CDATA[Thanks for you Response madhivanan. I tried with sp_depends and with “select * from sys.dm_sql_referencing_entities (‘dbo.Object Name’, ‘OBJECT’)–for SQL Server 2008. But I have 100′s of objects. So I cannot do this for all. Is there any alternative for this.]]></description>
		<content:encoded><![CDATA[<p>Thanks for you Response madhivanan. I tried with sp_depends and with “select * from sys.dm_sql_referencing_entities (‘dbo.Object Name’, ‘OBJECT’)–for SQL Server 2008. But I have 100′s of objects. So I cannot do this for all. Is there any alternative for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-149726</link>
		<dc:creator><![CDATA[Sanjay]]></dc:creator>
		<pubDate>Thu, 21 Jul 2011 07:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-149726</guid>
		<description><![CDATA[Thanks for you Response madhivanan. I tried with sp_depends and with &quot;select * from sys.dm_sql_referencing_entities (&#039;dbo.Object Name&#039;, &#039;OBJECT&#039;)--for SQL Server 2008. But I have 100&#039;s of objects. So I cannot do this for all. Is there any alternative for this.]]></description>
		<content:encoded><![CDATA[<p>Thanks for you Response madhivanan. I tried with sp_depends and with &#8220;select * from sys.dm_sql_referencing_entities (&#8216;dbo.Object Name&#8217;, &#8216;OBJECT&#8217;)&#8211;for SQL Server 2008. But I have 100&#8242;s of objects. So I cannot do this for all. Is there any alternative for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-149598</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 13:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-149598</guid>
		<description><![CDATA[Run this to know the dependent objects.

EXEC sp_depends &#039;your table&#039;]]></description>
		<content:encoded><![CDATA[<p>Run this to know the dependent objects.</p>
<p>EXEC sp_depends &#8216;your table&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sanjay</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-149594</link>
		<dc:creator><![CDATA[Sanjay]]></dc:creator>
		<pubDate>Wed, 20 Jul 2011 12:28:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-149594</guid>
		<description><![CDATA[Hi,

How can we delete dependent stored procedures. We are cleaning our DB by deleting unwanted objects. But I&#039;m getting dependency&#039;s error. My DB is having around 600 Sp&#039;s and 200 tables. 30% of them are backup copies. Previously we used to create backup of object while modifying that. After modification when we press F5 these backup object also comes under dependency&#039;s list. So how do I delete them.

Regards, 
Sanjay]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>How can we delete dependent stored procedures. We are cleaning our DB by deleting unwanted objects. But I&#8217;m getting dependency&#8217;s error. My DB is having around 600 Sp&#8217;s and 200 tables. 30% of them are backup copies. Previously we used to create backup of object while modifying that. After modification when we press F5 these backup object also comes under dependency&#8217;s list. So how do I delete them.</p>
<p>Regards,<br />
Sanjay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Surya</title>
		<link>http://blog.sqlauthority.com/2010/02/04/sql-server-get-the-list-of-object-dependencies-sp_depends-and-information_schema-routines-and-sys-dm_sql_referencing_entities/#comment-92149</link>
		<dc:creator><![CDATA[Surya]]></dc:creator>
		<pubDate>Mon, 11 Oct 2010 20:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7890#comment-92149</guid>
		<description><![CDATA[Well... none of them are giving PK, FK &amp; Index information.]]></description>
		<content:encoded><![CDATA[<p>Well&#8230; none of them are giving PK, FK &amp; Index information.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
