Turning back from update on SQL Server
There is any code from backing from update on SQL Server. I mean without triggers and logs.
KR,
开发者_如何转开发Çağın
If you happen to have change data capture or audit logging, you can easily recover from a bad change. Or as suggested you can restore yesterday's backup to another instance and then copy the data as much as possible. If you don't have any of these things, perhaps you need to them set up for future problems. Or maybe even hire a database professional so you don't get caught like this again. And of course, take all update, delete and insert rights away from application ddevelopers on production. Sometimes the best thing you can do is at least learn from your mistakes and make the system better for the next time.
I guess it's rather just "update was wrong" and now finding out there is no Undo like in Word.
Depends on what has been done else to the data. You could restore the effected columns by restoring your yesterday's backup of the database to another database, different name (don't overwrite your current database ...), and set up an update query to restore just your columns. Referencing tables in other databases is basically a simple syntax like database.schema.table; you have to look up the details on msdn, haven't had the need to do that before.
Alternatively, use a frontend dbms, e.g. Access, link both old and new table and name them in a way easy to distinguish between them, and set up an update query in Access to restore the old values. Might be that you need to cache your old values in a local table in your dbms.
If your answer is, you don't have a backup, then you are really lost.
精彩评论