SQL Server provides a built-in stored procedure, sp_depends, that returns object dependencies. Recently, I discovered a need for determining dependencies on a table column, not just the table itself. For example, a table may be referenced by many stored procedures and views, but a specific column in that table may only be referenced in a few of those objects. The following code will determine which views and stored procedures reference a specific column in a table, and whether the object is a view (V) or stored procedure (P).
Detect SQL Server Instances using reg.exe
Detect SQL Server Instance(s) using reg.exe from the resource kit, just pass the host name! (and make sure reg.exe from the resouce kit is in the ../tools/bin directory. SS2k Only.Enjoy!
2002-04-23
1,046 reads