I've got a field in a table that changed value unexpectedly. Clearly, a stored procedure caused that (I've already searched the few triggers we're using, and no login has update grants on any table in our database), and I'm in the process of finding which one did.
If I was say in Visual Studio, I would just do a "Find all references" on the field, and the task would be easy.
Is there an equivalent tool for SQL ? I know about the "find object dependencies" feature of SSMS, but this would only return the stored procedures (and views) using the table, not the specific field. (and unfortunately my table is joined in literally thousands of SQL queries)
The column name is 'Active', so doing a text search on my database schema is not gonna help a lot either (I've got hundreds of tables with such a field)
So basically the two options I see are :
- writing a complicated regex to match the updates. Writing such a regex is probably a huge task (because of all the syntaxix subtleties of SQL).
- using a tool that does just this.
Do you know of such a tool (or such a regex, or another way to do this) ?