I am working in Sql Server 2008 and there is a change of table in my database. So I need to know which all the queries I am using that table or I need to know which all queries will throw errors.I has changed some SP to work fine.But there is a lot of queries which may cause errors.So If there is possible to find which all queries will return error like table not found or column not found.
I got the sp which is using by the following query
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%machine_ID%'
AND ROUTINE_TYPE='PROCEDURE'
But the problem is that it will returns all the SP which is contains the name.But for some queries I changed the name but still uses 'machine_ID' as an alias name.So the above query will returns all the SP which contains 'machine_ID'.It may be used in query inside SP or it may be used as a parameter.So how can i get the query which will cause error due to absence of table or coloumn
In some sp it shows error like this while execution
Invalid object name 'tblMachineryHdr'.
Whether it is possible to know what all the SP will returns errors like this? Thanks in advance !