We have had some issues where an update or delete operation on the database would update/delete more records then expected. This has passed multiple layers of testing and reviews. Now I am looking for some tool that can help me to test only the correct records where updated or maybe another strategy to prevent situations likes this.
I have looked at SQL compare of Red gate, this works pretty good, but data setup and compare is a bit time consuming.
Maybe there is a easier and or better way to prevent data loss when using update/delete queries in code:
- Which tool, possible run-able from the command-line
- Automated, if so please explain how
- Other testing techniques
- Process steps during development cycle
How do you tackle this?