SIGN UP MEMBER LOGIN:    
ARTICLE

SQL Dependencies in SQL Server 2008

Posted by Shirsendu Nandi Articles | SQL Server 2012 May 11, 2011
In this article I will describe how to do SqlDependencies in SQL Server 2008 using SQL Server Management Studio.
Reader Level:


Description: In this article I will describe how to do SqlDependencies in SQL Server 2008 using SQL Server Management Studio:

Content:

User-defined database objects can have dependencies upon other user-defined database objects.

For example, views and stored procedures depend upon the existence of tables that contain the data returned by the view or procedure. Before modifying or moving a database object, it is important to identify the objects that depend upon that object as well as the database objects that must be present for the object to function properly.

Now for using the SQL Dependencies we can see a table whether it is dependent on which tables, stored procedures, views, triggers etc.

Reference : Microsoft

For doing that:

Step 1:

Open SQL Server 2008.

Step 2:

Expand Databases. For my case I expand my "Silvideoproject" just like the following Figure 1 marked with red:

Sql1.gif

Figure 1:

Step 3:

Now select a particular object; a table. For my case I have selected "dbo.tblVideo_Desc" like in the following figure marked with red.

Sql2.gif

Figure 2:

Step 4:

Now right-click on that particular table and click the View Dependences just like in the following figure:

Sql3.gif

Figure 3:

After clicking that you will see as in the following figure:

Sql4.gif

Figure 4:

In the above picture we have seen that my table "tblVideo_desc" is dependent on so many objects like stored procedure, views, tables which I have marked with red.

Now if you click the other radio button named "object on which[tblVideo_Desc] depends" you will see like the following figure:

Sql5.gif

Figure 5:

Here you have seen that my table "tblVideo_Desc" is dependent on "tblVideo" which I marked with red.

Conclusion:

So in this article We have seen how we can get the view dependency object of a particular table by using "object Dependency".

Login to add your contents and source code to this article
share this article :
post comment
 
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Nevron Gauge for SharePoint
Become a Sponsor