I have a few tables in SQL server 2008. I want to find a list of all the stored procedures and views that are using this table. I am new to SQL server, I think there has to be an easy way rather than opening each view and stored procedure and search for the table name. Thanks
Share
This is a little more reliable than the dependency views, because those rely on objects being compiled in the right order.
But there are some caveats:
This has the potential for false positives, of course, since you could have
Or the table name you’re searching for could be a common word that appears naturally in other code even though it doesn’t reference that specific table.
This could potentially miss references, e.g. if you build strings dynamically or pass table names in to dynamic SQL.