on 2013 Sep 12 7:24 PM
A customer called today reporting that a long-term employee's schedules were missing from our staffing-scheduling system. All application-level checks yielded nothing and I am now left hoping that sqla deletes rows much like windows deletes: data is not really deleted, but just marked as deleted. Is there a way to find/list deleted records in an sqla database?
Thanks, Doug
You could use dbtran on the log and find the inserts / updates for the data you are interested in. Alternatively, you could start up a copy of a recent backup of your database to find the data. You could then export (via UNLOAD or OUTPUT, etc) the data you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. Nothing from the original post suggests that they don't have backups. As for the logs, they should also be part of the backups -- even if they get truncated.
Deleted rows are truly deleted and the space is reused, often right away. When a row is removed from a page, adjacent row data is moved on top of the old row to keep the rows contiguous on the page. If you were extremely lucky, a forensics team might be able to find portions of some rows on some pages but that would be extremely time consuming, expensive and not likely to succeed.
Thanks for the feedback John & Volker. I will ask the customer for the last date the data was seen and then ask their IT team to restore a copy of the database from around that date. I will then mount the database, use isql to generate a list of the employee's schedules, save that list to a text file and import the data into production.
User | Count |
---|---|
68 | |
10 | |
10 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.