I work in Sql Server 2008 and there is a table change in my database. Therefore, I need to know which all queries I use in this table, or I need to know which all queries will cause errors. I changed some SPs to work fine. But there are many requests that can cause errors. Therefore, if there is one can find that all queries will return an error, as the table is not found or the column is not found.
I got sp that uses 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 return the entire SP that contains the name. But for some queries, I changed the name, but still use "machine_ID" as an alias. Thus, the above query returns all the SPs that contain 'machine_ID'. It can be used in the request inside the SP or it can be used as a parameter. Since I can get a query that will cause an error due to the lack of a table or coloumn
In some sp, an error is displayed, such as during execution
Invalid object name 'tblMachineryHdr'.
Is it possible to find out that all SPs will return such errors? Thanks in advance!
source share