Hey guys, so I may be overthinking this but basically, I have a bunch of stored procedures which I want to begin keeping historical track of. I want to know which records were updated by which SP & when, and I'm just looking for the best way to do this. Is there any built in sql functionality that can let me know which records were modified by an SP?
Here's my issue...we have a scheduler application. All it does is reach out to our sql server database and execute a bunch of different SP's at their scheduled execution times, in order to insert/update various data. The only thing we track, is whether or not the SP that ran, was successfully completed, or threw an error. We have no way of knowing which records were updated & when.
Recently however, we've had a few incidents happen where we needed to know which records were affected & we've had no way of knowing. So my thought process was the following:
- Setup a batch table to record the overall count of affected records & time the SP executed.
- Setup a batch details table to record the id's of any of the batch's records affected within the SP executed.
Again, I may be overthinking this. I'm just looking for the best way to find all records affected by the SP, so I can then insert them into my batch & batch details tables.
- This topic was modified 1 year, 6 months ago by Goalie35.