Question

I am a programmer who has done a very bad thing and somehow didn't select the WHERE clause before hitting F5 on an update query in SQL Server 2008. I know this isn't a programming question but it is a question from a desprate programmer ...

Is there anyway to get the one column's data back from the transaction log or a log kept by the mirroring system?

Oh and yes, it gets better: the nightly maintenance plan for backups seems to have been turned off.

Any ideas please? -Mike stunned at reading "(197875 row(s) affected)"

Was it helpful?

Solution

Call off the dogs. I regenerated the database from an old backup and the source log files used to populate it.

In a more lucid moment I came to understand my question as:

Is the original value of a row stored in the transaction log of an update operation? I'm almost sure the answer is no.

Thanks for listening.

-Mike

OTHER TIPS

Mike, glad to hear you were able to recover the data. Now is the time to implement some sort of backup strategy :)

To your question, the transaction log can be backed up (every 10 minutes, etc.), but no... the original value is not persisted anywhere unless you explicitly build that functionality in. A great place to start is Ola Hallengren's great set of free maintenance scripts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top