Restores failing with exit code 790

brosatobrosato Posts: 89 Bronze 2
edited January 24, 2013 8:49AM in SQL Backup Previous Versions
I can't do a restore that includes full/diff/logs. I get sql error 3136 This differential cannot be restored because the database has not been restored to the correct earlier state. This happened after updating to 7.2.0.286 I'm really in a pickle here.

Comments

  • brosatobrosato Posts: 89 Bronze 2
    Seems to be related to Differential restores. A full with logs will restore.
  • peteypetey Posts: 2,358 New member
    Is it possible that the differential backup requires a different full backup, and not the one you restored?
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • brosatobrosato Posts: 89 Bronze 2
    Any insight? My backups are pretty much useless at this point.
  • brosatobrosato Posts: 89 Bronze 2
    Here's the error in detail.

    Dev-Thor: Restore - Failed
    ==========================

    Restoring full backup - Successful

    This operation completed successfully.

    Restoring RIP_Onyx (database) from:
    \\redgate1\SQLBackups\thor\Onyx\FULL_Onyx_20130113_025441.sqb
    Processed 4387672 pages for database 'RIP_Onyx', file 'Vanilla500054_Data' on file 1.
    Processed 9 pages for database 'RIP_Onyx', file 'Vanilla500054_Log' on file 1.
    RESTORE DATABASE successfully processed 4387681 pages in 470.348 seconds (72.879 MB/sec).
    SQL Backup process ended.



    Restoring differential backup - Failed

    This operation failed with errors.

    Restoring RIP_Onyx (database) from:
    \\redgate1\SQLBackups\thor\Onyx\DIFF_Onyx_20130116_023012.sqb
    Thread 0 error:
    Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
    SQL error 3013: SQL error 3013: RESTORE DATABASE is terminating abnormally.
    SQL error 3136: SQL error 3136: This differential backup cannot be restored because the database has not been restored to the correct earlier state.
    SQL Backup exit code: 790
    SQL error code: 3136



    Updating SQL Server information - Pending

    Operation pending.
  • peteypetey Posts: 2,358 New member
    Could you please run this query on the instance where the backup was taken?
    SELECT d.physical_device_name 
    FROM msdb..backupset a
    INNER JOIN msdb..backupset b ON a.database_backup_lsn = b.checkpoint_lsn
    INNER JOIN msdb..backupmediafamily c ON a.media_set_id = c.media_set_id
    INNER JOIN msdb..backupmediafamily d ON b.media_set_id = d.media_set_id
    WHERE c.physical_device_name LIKE '%DIFF_Onyx_20130116_023012.sqb'
    
    This query should tell you the full backup set that the differential backup requires.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • brosatobrosato Posts: 89 Bronze 2
    Ok, I had a chance to try again. The restore is only 2 files, a full backup from sunday and last nights diff. Here's the error and the results of the query you wanted me to run with the current diff.

    Dev-Thor: Restore - Failed
    ==========================

    Restoring full backup - Successful

    This operation completed successfully.

    Restoring RIP_Onyx (database) from:
    \\redgate1\SQLBackups\thor\Onyx\FULL_Onyx_20130120_025056.sqb
    Processed 4396432 pages for database 'RIP_Onyx', file 'Vanilla500054_Data' on file 1.
    Processed 17 pages for database 'RIP_Onyx', file 'Vanilla500054_Log' on file 1.
    RESTORE DATABASE successfully processed 4396449 pages in 469.187 seconds (73.205 MB/sec).
    SQL Backup process ended.



    Restoring differential backup - Failed

    This operation failed with errors.

    Restoring RIP_Onyx (database) from:
    \\redgate1\SQLBackups\thor\Onyx\DIFF_Onyx_20130123_023009.sqb
    Thread 0 error:
    Process terminated unexpectedly. Error code: -2139684860 (An abort request is preventing anything except termination actions.)
    SQL error 3013: SQL error 3013: RESTORE DATABASE is terminating abnormally.
    SQL error 3136: SQL error 3136: This differential backup cannot be restored because the database has not been restored to the correct earlier state.
    SQL Backup exit code: 790
    SQL error code: 3136



    Updating SQL Server information - Pending

    Operation pending.


    SELECT d.physical_device_name
    FROM msdb..backupset a
    INNER JOIN msdb..backupset b ON a.database_backup_lsn = b.checkpoint_lsn
    INNER JOIN msdb..backupmediafamily c ON a.media_set_id = c.media_set_id
    INNER JOIN msdb..backupmediafamily d ON b.media_set_id = d.media_set_id
    WHERE c.physical_device_name LIKE '%DIFF_Onyx_20130123_023009.sqb'

    Results

    physical_device_name
    {E2E5B7E6-6FD4-415D-8989-36FAD01A243E}14
    d:\temp\Onyx\LOG_Onyx_20130122_190001.sqb
    NUL
    d:\temp\Onyx\LOG_Onyx_20130122_191501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_193001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_194501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_200001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_201501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_203001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_204501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_210001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_211501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_213000.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_214501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_220001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_221501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_223000.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_224501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_230001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_231501.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_233001.sqb
    d:\temp\Onyx\LOG_Onyx_20130122_234500.sqb
  • brosatobrosato Posts: 89 Bronze 2
    You may be interested in this. Here's the problem. http://support.microsoft.com/default.as ... -US;937683

    Veeam, our virtual backup software has been writing to the msdb database after a filesystem backup. I just did a full backup and then a diff and the restore worked.
  • peteypetey Posts: 2,358 New member
    Thanks for the update. I was wondering about the '{E2E5B7E6-6FD4-415D-8989-36FAD01A243E}14' device name.
    Peter Yeoh
    SQL Backup Consultant Developer
    Associate, Yohz Software
    Beyond compression - SQL Backup goodies under the hood, updated for version 8
  • brosatobrosato Posts: 89 Bronze 2
    Seems that veeam is causing all kinds of problems on our servers.
Sign In or Register to comment.