Recovering a transaction log from a damaged SQL database

We have a database that is backed up weekly in easy mode. Yesterday we had a crc error, a damaged mdf file, and we could not save it. I restored the backup from last week, but now we have a gap from the moment of backup until the moment of recovery. Since I have an ldf file from this database, is there a way to β€œplay” this transaction log to fill in the gap?

I tried to attach the ldf file to the restored mdf file, but SQL will not allow me to do this. (It just creates a new ldf file with a different name when I reconnect the database.)

Any ideas will help. This is a lot of data that needs to be lost, and although this is not critical data, I would like to return it (and also learn how to do it.)

+4
source share
1 answer

If you follow the MSDN instructions β€”How: Restore a point in time (SQL Server Management Studio) , you should be good, I will not reproduce them here, because they are quite long. There is also MSDN - How to restore a transaction log backup

+2
source

Source: https://habr.com/ru/post/1304467/


All Articles