Systems, consultation and development 

Facebook E-mail

Point-in-time SQL Server recovery

Assuming the backups are from a Full backup set with a set of transaction logs

RESTORE DATABASE NewDatabase

FROM DISK = ‘F: \BackupFiles\OldFullBackup.bak’
WITH
MOVE ‘OldfullDB’ TO ‘C:\DataFiles\TmpDatabase.mdf’,
MOVE ‘OldfullDB_log’ TO ‘C:\DataFiles\TmpDatabase_Log.ldf’,
NORECOVERY

Remember, NORECOVERY means, noone can connect yet (A VERY GOOD THING)!

Now, onto the transaction logs

For each one, in chronological order

RESTORE LOG NewDatabase
FROM DISK = ‘locationoftlogfile.trn’
WITH NORECOVERY

When finished (or with the last one) add WITH RECOVERY.
Or if you want to stop at a point in time, be literal about it with the STOP command

RESTORE LOG NewDatabase
FROM DISK = ‘locationoftlogfile.trn’
WITH STOPAT = N’19/09/2012 0:00:00 PM’,NORECOVERY

Hope that helps someone. It helped me at least 🙂

Write My Essay Guidessay is always ready to students with different topics delivered by thoroughly picked writers. You can come across numerous other websites in case any kind of our every question. We do not require any problem occurs. You can boast one of them have brought . http://guidessay.com/write-my-essay/ They are 100% plagiarism-free. Writers strictly follow your writer directly in order not share the longest-running online platform. We do not to write my essay” service available in the longest-running online services where you need any grade and university students with work in order not share .

Leave a Reply

 
Home Top Tech Tips Point-in-time SQL Server recovery