Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

rolling back / undoing an update task

0 views
Skip to first unread message

.Net Sports

unread,
Nov 12, 2009, 6:05:24 PM11/12/09
to
I accidentally used this statement when trying to set my 'names'
column all to lower case in the away condition:

update mytable set names = lower('names') where home = 'away'

..as this changed all the names to literally 'names', wondering how to
use ROLLBACK to undo this, or is there another recovery method.

thanks in advance
NS

Kalen Delaney

unread,
Nov 12, 2009, 7:30:07 PM11/12/09
to
Once the transaction is committed, there is no way to roll it back.
The other recovery method is called RESTORE. You do have backups, don't you?

If you have a full backup, and an unbroken sequence of log backups, you can
restore until a time right before you ran this UPDATE statement.

Please read the BOL about RESTORE and the STOPAT clause.

--
HTH
Kalen
----------------------------------------
Kalen Delaney
SQL Server MVP
www.SQLServerInternals.com

".Net Sports" <ballz...@cox.net> wrote in message
news:71f15b38-530b-4053...@g10g2000pri.googlegroups.com...

0 new messages