tag:blogger.com,1999:blog-495177919198719500.post126696421259925301..comments2023-12-27T20:52:29.483-08:00Comments on Microsoft Sql Server Tutorials: How to List the Stored Procedures and Views where your Table is being usedSuprotim Agarwalhttp://www.blogger.com/profile/08349831623922214390noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-495177919198719500.post-59069039444370152952009-04-09T06:52:00.000-07:002009-04-09T06:52:00.000-07:00This how I find them, it is 2 separate queries but...This how I find them, it is 2 separate queries but I have had good luck with both. Enjoy!<BR/><BR/>SELECT ROUTINE_NAME, ROUTINE_DEFINITION, ROUTINE_TYPE <BR/> FROM INFORMATION_SCHEMA.ROUTINES <BR/> WHERE ROUTINE_DEFINITION LIKE '%SEARCHTERM%'<BR/> AND ROUTINE_TYPE='PROCEDURE'<BR/> <BR/> SELECT TABLE_NAME, VIEW_DEFINITION <BR/> FROM INFORMATION_SCHEMA.VIEWS<BR/> WHERE VIEW_DEFINITION LIKE '%SEARCHTERM%'<BR/> <BR/><BR/><BR/>Brad BowmanBrad Bowmanhttp://twitter.com/bmbowmannoreply@blogger.com