Failed restore

  • Hi!

    Used the following commands to test database backup/restore:

    BACKUP DATABASE ONEC TO DISK='R:\TEST\ONEC.BAK' with INIT

    -- restore is OK

    WAITFOR TIME '12:30'

    BACKUP DATABASE ONEC TO DISK='R:\TEST\ONEC_diff.BAK' with INIT, DIFFERENTIAL

    -- restore is OK

    WAITFOR TIME '12:45'

    BACKUP LOG ONEC TO DISK='R:\TEST\ONEC.TLF' with NOINIT

    -- restore is OK

    WAITFOR TIME '13:00'

    BACKUP LOG ONEC TO DISK='R:\TEST\ONEC.TLF' with NOINIT

    -- restore is OK

    WAITFOR TIME '13:15'

    BACKUP LOG ONEC TO DISK='R:\TEST\ONEC.TLF' with NOINIT

    -- restore is OK

    WAITFOR TIME '13:30'

    BACKUP LOG ONEC TO DISK='R:\TEST\ONEC.TLF' with NOINIT

    -- restore is OK

    WAITFOR TIME '13:35'

    BACKUP DATABASE ONEC TO DISK='R:\TEST\ONEC_diff.BAK' with INIT, DIFFERENTIAL

    -- restore is OK

    WAITFOR TIME '13:45'

    BACKUP LOG ONEC TO DISK='R:\TEST\ONEC.TLF' with NOINIT

    -- !!! restore FAILED:

    "The log in this backup set begins at LSN ... , which is too ealy to apply to the database An more recent log backup that includes LSN ... , can be restored. Restore log is terminating abnormaly"

    Am I doing something wrong?

  • quote:


    BACKUP DATABASE ONEC TO DISK='R:\TEST\ONEC_diff.BAK' with INIT, DIFFERENTIAL

    -- restore is OK

    WAITFOR TIME '13:45'

    BACKUP LOG ONEC TO DISK='R:\TEST\ONEC.TLF' with NOINIT

    -- !!! restore FAILED:

    "The log in this backup set begins at LSN ... , which is too ealy to apply to the database An more recent log backup that includes LSN ... , can be restored. Restore log is terminating abnormaly"


    Can you post results of 'restore filelistonly' from both backup sets 'R:\TEST\ONEC_diff.BAK' and 'R:\TEST\ONEC.TLF'?

    Please also post last two restore statements too.

  • I used EM to restore full backup first with "leave database non operational, but able to restore additional transactional logs" option (OK), then restored diff backup with the same option (OK), then tried to restore log backup and got the error...

    This is Filelist restore:

    RESTORE FILELISTONLY

    FROM disk = 'D:\ONEC\ONEC_diff.BAK'

    --------------------------------------------

    LogicalName,PhysicalName,Type,FileGroupName,Size,MaxSize

    ONEC_Data,d:\sql_data\ONEC_Data.mdf,D,PRIMARY,927334400,35184372080640

    ONEC_Log,d:\sql_log\ONEC_Log.ldf,L,,383320064,35184372080640

    (2 row(s) affected)

    =============================================

    RESTORE FILELISTONLY

    FROM disk = 'D:\ONEC\ONEC.TLF'

    ---------------------------------------------

    LogicalName,PhysicalName,Type,FileGroupName,Size,MaxSize

    ONEC_Data,d:\sql_data\ONEC_Data.mdf,D,PRIMARY,927334400,35184372080640

    ONEC_Log,d:\sql_log\ONEC_Log.ldf,L,,383320064,35184372080640

    (2 row(s) affected)

  • Sorry I gave you worng command. What I like to have is 'RESTORE HEADERONLY' from both backup sets.

  • Here it is:

    RESTORE HEADERONLY

    FROM disk = 'D:\ONEC\ONEC_diff.BAK'

    --------------------------------------------

    BackupName,BackupDescription,BackupType,ExpirationDate,Compressed,Position,DeviceType,UserName,ServerName,DatabaseName,DatabaseVersion,DatabaseCreationDate,BackupSize,FirstLsn,LastLsn,CheckpointLsn,DifferentialBaseLsn,BackupStartDate,BackupFinishDate,SortOrder,CodePage,UnicodeLocaleId,UnicodeComparisonStyle,CompatibilityLevel,SoftwareVendorId,SoftwareVersionMajor,SoftwareVersionMinor,SoftwareVersionBuild,MachineName,Flags,BindingId,RecoveryForkId,Collation

    ,,5,,0,1,2,DOMAIN.CENTER\sql_admin,SPICA,ONEC,539,2001-10-06 14:15:37.000,43902976,1113000000026400011,1113000000026900001,1113000000026400011,1112000000320600011,2003-07-17 13:34:27.000,2003-07-17 13:34:41.000,106,227,1033,196609,80,4608,8,0,760,SPICA,0,{25F1C387-968E-11D3-8CCC-0090278CBDBB},{59362432-EF65-410B-AB37-174F07E01A37},SQL_Latin1_General_CP1251_CI_AS

    (1 row(s) affected)

    =====================================================

    RESTORE HEADERONLY

    FROM disk = 'D:\ONEC\ONEC.TLF'

    -----------------------------------------------------

    BackupName,BackupDescription,BackupType,ExpirationDate,Compressed,Position,DeviceType,UserName,ServerName,DatabaseName,DatabaseVersion,DatabaseCreationDate,BackupSize,FirstLsn,LastLsn,CheckpointLsn,DifferentialBaseLsn,BackupStartDate,BackupFinishDate,SortOrder,CodePage,UnicodeLocaleId,UnicodeComparisonStyle,CompatibilityLevel,SoftwareVendorId,SoftwareVersionMajor,SoftwareVersionMinor,SoftwareVersionBuild,MachineName,Flags,BindingId,RecoveryForkId,Collation

    ,,2,,0,1,2,DOMAIN.CENTER\sql_admin,SPICA,ONEC,539,2001-10-06 14:15:37.000,2156032,1112000000094700001,1112000000499500001,1112000000440000009,1112000000320600011,2003-07-17 12:45:00.000,2003-07-17 12:45:01.000,106,227,1033,196609,80,4608,8,0,760,SPICA,0,{25F1C387-968E-11D3-8CCC-0090278CBDBB},{59362432-EF65-410B-AB37-174F07E01A37},SQL_Latin1_General_CP1251_CI_AS

    ,,2,,0,2,2,DOMAIN.CENTER\sql_admin,SPICA,ONEC,539,2001-10-06 14:15:37.000,647168,1112000000499500001,1112000000609100001,1112000000440000009,1112000000320600011,2003-07-17 13:00:00.000,2003-07-17 13:00:01.000,106,227,1033,196609,80,4608,8,0,760,SPICA,0,{25F1C387-968E-11D3-8CCC-0090278CBDBB},{59362432-EF65-410B-AB37-174F07E01A37},SQL_Latin1_General_CP1251_CI_AS

    ,,2,,0,3,2,DOMAIN.CENTER\sql_admin,SPICA,ONEC,539,2001-10-06 14:15:37.000,122880,1112000000609100001,1112000000615900001,1112000000440000009,1112000000320600011,2003-07-17 13:14:59.000,2003-07-17 13:15:01.000,106,227,1033,196609,80,4608,8,0,760,SPICA,0,{25F1C387-968E-11D3-8CCC-0090278CBDBB},{59362432-EF65-410B-AB37-174F07E01A37},SQL_Latin1_General_CP1251_CI_AS

    ,,2,,0,4,2,DOMAIN.CENTER\sql_admin,SPICA,ONEC,539,2001-10-06 14:15:37.000,253952,1112000000615900001,1112000000641700001,1112000000440000009,1112000000320600011,2003-07-17 13:30:00.000,2003-07-17 13:30:01.000,106,227,1033,196609,80,4608,8,0,760,SPICA,0,{25F1C387-968E-11D3-8CCC-0090278CBDBB},{59362432-EF65-410B-AB37-174F07E01A37},SQL_Latin1_General_CP1251_CI_AS

    ,,2,,0,5,2,DOMAIN.CENTER\sql_admin,SPICA,ONEC,539,2001-10-06 14:15:37.000,975872,1112000000641700001,1113000000167200001,1113000000026400011,1112000000320600011,2003-07-17 13:45:00.000,2003-07-17 13:45:01.000,106,227,1033,196609,80,4608,8,0,760,SPICA,0,{25F1C387-968E-11D3-8CCC-0090278CBDBB},{59362432-EF65-410B-AB37-174F07E01A37},SQL_Latin1_General_CP1251_CI_AS

    (5 row(s) affected)

  • quote:


    "The log in this backup set begins at LSN ... , which is too ealy to apply to the database An more recent log backup that includes LSN ... , can be restored. Restore log is terminating abnormaly"


    I am wondering you did not restore the last transaction log backup created at 13:45. Do you still have the complete error message with the LSN number?

  • Try to run:

    Restore database 'dbname' with recovery

    from QA

    Robert

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply