December 11, 2014 at 8:01 am
Greetings all.
Coming from Oracle trying same logic on SQL Server (2008R2 in this case).
Trying to do a PIT restore.
Backup schema:
fri 8pm full
other days 8pm diff
every 4 hours t-log backup (.trn)
When I scheduled the t-log backup, I forgot to provide a new name (I just put in the date, not the time). Oooopssss..
Now I'm restoring ProdDB into a NewDB.
Full with norecovery : Successful
Diff with norecovery : Successful
T-log with no recovery.. error :
System.Data.SqlClient.SqlError: The log in this backup set terminates at LSN 85939000009823600001, which is too early to apply to the database. A more recent log backup that includes LSN 86145000000264800001 can be restored. (Microsoft.SqlServer.Smo)
Checking contants of trn file:
RESTORE HEADERONLY from disk='O:\Backup\FSI019I1\AgressoP_Tlog_Backup_20141109.trn'
I get 6 positions.
LSN 86145 000000 2648 00001 can be found in the position 6 part.
BackupTypeExpirationDatePositionFirstLSN LastLSN
22014-11-14 20:30:00.0006 8614200000128410000186145000001447300001
Is there a way to extract 1 t-log backup from the complete t-log file?
Or tell the database the restore should start at position 6?
December 11, 2014 at 9:13 am
Perfect!
Tried the restore through SSMS, selected the option "export to new SQL".
Removed previous statements and voila... t-log backup applied.
Kind regards and gratitude.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply