We have a COTS (commercial off the shelf) application that is changing its database schema enough to make existing queries return invalid data. Think "select * from cars where cartype='car'", but now we've added trucks in too .. so you need to do "select * fro mcars where cartype='car' and subtype='car'" to get the actual car results (ignore the insanity of this .. it makes more sense in the obscure actual instance).
Is there a way to audit all SQL statements executed by a given sql server login?
Is there a SQL Server "proxy" that can do this, or other inline modifications (progmatically replace a table with a view)?
We are looking to capture queries such that I can match them against a rules engine (ie, a perl script) looking for the lack of the second parameter.
ie.. "if a query INCLUDES "cartype" but not "subtype" email me an alert"