How to know any table/function is used any query

select * from sys.sql_modules where definition like '%tablename/funName%'

Comments