Search in All Stored Procedures Views

Tags: SQL

For me, the following SQL syntax turned out very handy when I wanted to see where either a table or a view or a stored procedure is being referenced. I've so many stored procedures in one of the database(used/created by other users) and it became hard to follow.

Hope this helps!

select * from sys.all_sql_modules
where definition like '%SearchText%'

No Comments