Monday, March 26, 2012

restore to a specific transaction in the log

i have been doing tests and i cannot manage to do this. here is what i have done and am trying to do:

I created a full backup of the adventureworks database

I made some updates to tables.

I created a differential backup.

I done an update update to another table, dropped a table, and done another update.


Lets say in a production envrionment i just realised the table was dropped and i wanted to go to the transaction just before the table was dropped. is this possible, or are all transactions in the log going to be lost? All i have found remotely related to this are marked transactions, but they are not what i am looking for. i want a list of transactions in the log and be able to select one as the backup point ( via SSMS or TSQL). i am not looking for a point in time restore.

Thanks all

You can use the RESTORE syntax for point-in-time RESTORE to have the log stop at whatever time or LSN you choose. See the STOPAT clause for the RESTORE statement in books-online.

|||yea, i have since discovered that there is no way to restore to a specific transaction, i have to know the time of the transaction i want and restore to that time. pity, it would be a great feature. thanks for the reply.

No comments:

Post a Comment