Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
venkath
Posting Yak Master
202 Posts |
Posted - 2009-04-13 : 21:33:46
|
Hi AllIs there way I can find procedures or views that are using a particular table?In other words, I need to get all the procedures, views that are built on a table.Help on this is greatly appreciated..Thanks |
|
toddbkc
Starting Member
9 Posts |
Posted - 2009-04-14 : 10:54:41
|
Yes - there is a way!!!This is the "Old" syntax, but still works...select distinct o.name from syscomments c INNER JOIN sysobjects oON c.id = o.idwhere c.text like '%table1%'You can also get fancy and filter the object types if you want - for example, if you only want stored procedures that contain that value, add "AND o.type = 'P'"Hope this helps!TODD |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-04-15 : 03:12:39
|
EXEC sp_depends 'table_name'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|