开发者

Quick way to find usages of DB Objects in SQL Server 2008?

开发者 https://www.devze.com 2023-04-03 03:53 出处:网络
Just like Alt F开发者_JAVA百科1 gives you information about any DB object.,Is there any quick way to find out at what all places is a particular db object refered to.

Just like Alt F开发者_JAVA百科1 gives you information about any DB object., Is there any quick way to find out at what all places is a particular db object refered to. For instance:

-A table used in other stored procs. 
-A stored proc used in other stored procs. 
-A user defined type used as table value parameter in stored procs.

and so on...

In the past i have used Red Gate SQL Search but i will have to take permission here at my company to install it.

Queries will do too.


The dependencies information is a lot more robust in 2008 than previous versions as you no longer get permanently missing dependency info when creating objects in the "wrong" order.

Stealing the example from Books Online

SELECT referencing_schema_name, 
       referencing_entity_name, 
       referencing_id, 
       referencing_class_desc, 
       is_caller_dependent
FROM sys.dm_sql_referencing_entities ('Production.Product', 'OBJECT');


It's free, use Red-Gate SQL Search http://www.red-gate.com/products/sql-development/sql-search/


If you right click on an object in SQL Server Management Studio, there's a 'View Dependencies' feature.

What's the difficulty in getting SQL Search installed on your company machines?

0

精彩评论

暂无评论...
验证码 换一张
取 消