December 6th, 2013, 10:55 AM
Missing a record
I have a web app that uses SQL Server 2005 as the backend. Last night, a record was created via the app by a user. I know this happened because my app sends a notification email and references the integer in the identity field. Today, that record is no longer in the database. Adding another record to the same table shows this particular integer being skipped in the identity field, so the database still "knows" that a record was there.
Only one other person has direct access to the database (claims he did not delete the record) and there's nothing in my app that allows for the deletion of these records.
I'm not sure if this has anything to do with it, but I recently added a nightly Job that Shrinks the log file to 0, makes a file backup of the database and then FTPs the file to our backup server.
Any ideas what might have happened to this record or how I can go about finding what happened? Thanks!
December 16th, 2013, 03:35 PM
SOLVED and I feel really dumb for not figuring it out sooner. Turns out that the record in question was incorrectly time stamped (by the user) to a year in the past. I have code that looks for old records in this table and deletes them if they went unanswered.
I put that clean-up process in place 2 years ago, so it's no wonder I forgot about it.