sys dm sql referencing entities in SQL Server

preview_player
Показать описание
sql server referencing entities
sql server referenced objects
sql server schema bound dependency
sql server non schema bound dependency

In this video we will discuss
How to find object dependencies using the following dynamic management functions

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.

Difference between
Referencing entity and Referenced entity
Schema-bound dependency and Non-schema-bound dependency

This is continuation to Part 131, in which we discussed how to find object dependencies using SQL Server Management Studio. Please watch Part 131 from SQL Server tutorial before proceeding.

The following example returns all the objects that depend on Employees table.

Difference between referencing entity and referenced entity
A dependency is created between two objects when one object appears by name inside a SQL statement stored in another object. The object which is appearing inside the SQL expression is known as referenced entity and the object which has the SQL expression is known as a referencing entity.

The following query returns all the referenced entities of the stored procedure sp_GetEmployeesandDepartments

Please note : For both these dynamic management functions to work we need to specify the schema name as well. Without the schema name you may not get any results.

Difference between Schema-bound dependency and Non-schema-bound dependency
Schema-bound dependency : Schema-bound dependency prevents referenced objects from being dropped or modified as long as the referencing object exists

Example : A view created with SCHEMABINDING, or a table created with foreign key constraint.

Non-schema-bound dependency : A non-schema-bound dependency doesn't prevent the referenced object from being dropped or modified.

Link for all dot net and sql server video tutorial playlists

Link for slides, code samples and text version of the video
Рекомендации по теме
Комментарии
Автор

Schemabinding rules! Venkat rules! You are the best teacher on youtube. The best SQL Server tutorial ever made by human. Thank you and greetings from Poland. Please keep goin in educating community.

krzysztofs
Автор

Awesome video, you did a great job of explaining how to get dependencies on objects, and how they relate. Thanks!!

Cirdarin
Автор

Thanks venkat sir! You are my excellent trainer or teacher. :) take care

muhammadrehbarsheikh
Автор

so so so so so good. thank you sir for the most excellent tutorial

justinli
Автор

thank you once again for clarifying the difficult part

wasimbader
Автор

Can you make a video that shows the difference b/w Sp_depends, view dependencies,

sohailsyed
Автор

Is result include from all the Db from one server connection ?

vikramrao