The log or differential backup cannot be restored because no files are ready to rollforward.

The log or differential backup cannot be restored because no files are ready to rollforward.

If you have found this page, it is likely that you encountered the following error when you tried to restore a differential backup using Microsoft SQL Server 2005. Restore failed for Server ‘‘. (Microsoft.SqlServer.Smo) Additional Information:System.Data.SqlClient.SqlError: The log or differential backup cannot be restored because no files are ready to rollforward. (Microsoft.SqlServer.Smo) What this error is telling you is that there is no database that was left in non-operational mode, and thus has not been cleaned up such that uncommitted transactions have not been rolled back. The easy way to reproduce this error is to backup your database using full recover model, and do full and differential backups. Once you have your full and differential backup files you, if you want to restore your database all you have to do is restore the full backup first, and then one of the differential files (differential backups have all the changes since the last full backup) that brings you up to the point you want to restore to. You will get the above error when you try to restore the differential backup (after you just restored the full backup). Unfortunately, you forgot one critical detail (just like I did at first). You MUST restore all but the last (in this case the full backup) with NORECOVERY option. In the Microsoft SQL Server Management Studio there are three options on the Option "page" when you restore a database. Option 1 (the default): Leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored.(RESTORE WITH RECOVERY) Option 2: Leave the database non-operational, and do not roll back uncommitted transactions. Additional transaction logs can be restored.(RESTORE WITH NORECOVERY) To properly restore a database that is backup up using full recovery mode with full and differential backups, here are the steps you need to follow to not get the above error. Restore Full backup

  1. Open the Restore Database window in Microsoft SQL Server Management Studio
  2. Ensure the To database field is filled in with the name you want.
  3. Choose From device as the Source for restore.
  4. Choose the full backup file you want to restore. In most cases this is the most recent full backup file.
  5. Click the Options page on the left navigation.
  6. Choose Leave the database non-operational, and do not roll back uncommitted transactions. Additional transaction logs can be restored.(RESTORE WITH NORECOVERY). This is the most important step!!!

Restore Differential backup

  1. Open the Restore Database window in Microsoft SQL Server Management Studio
  2. Ensure the To database field is filled in with the name you want. The same that you specified in step 2 for the Restore Full backup
  3. Choose From device as the Source for restore.
  4. Choose the differential backup file you want to restore. In most cases this is the most recent differential backup file.
  5. Click the Options page on the left navigation.
  6. Choose the default: Leave the database ready to use by rolling back uncommitted transactions. Additional transaction logs cannot be restored.(RESTORE WITH RECOVERY) Make sure to choose this if you want to use your database after the restore

source http://justgeeks.blogspot.com/2009/03/log-or-differential-backup-cannot-be.html

时间: 2024-11-05 22:46:34

The log or differential backup cannot be restored because no files are ready to rollforward.的相关文章

MySQL二进制日志总结

二进制日志简单介绍 MySQL的二进制日志(binary log)是一个二进制文件,主要用于记录修改数据或有可能引起数据变更的MySQL语句.二进制日志(binary log)中记录了对MySQL数据库执行更改的所有操作,并且记录了语句发生时间.执行时长.操作数据等其它额外信息,但是它不记录SELECT.SHOW等那些不修改数据的SQL语句.二进制日志(binary log)主要用于数据库恢复和主从复制,以及审计(audit)操作. 官方文档关于二进制日志(binary log)的介绍如下: T

backup1:backup database

一,使用 BACKUP Database 命令创建数据库的完整备份和差异备份.1,syntax --Backing Up a Whole Database BACKUP DATABASE database_name TO <backup_device> [ ,...n ] [ WITH { DIFFERENTIAL | <general_WITH_options> [ ,...n ] } ] [;] <backup_device>::= { logical_device

backup3:backup devices 的查询和验证

Backup database 命令执行成功之后,SQL Server 会创建相应的Backup set,media set 和 backup media family,在msdb中,存在相应的table来查询metadata. BACKUP DATABASE [TestSite] TO disk = 'D:\TestDBBackupFolder\Site1_db_bak1.bak', disk = 'D:\TestDBBackupFolder\Site1_db_bak2.bak' MIRROR

Backup and Recovery Basics(10g)- 目录

今天先把目录搬上来,后续会翻译相应的章节,并更新超链接,希望对想学习oracle的人有所帮助.fighting Contents Title and Copyright Information Preface Audience Documentation Accessibility Related Documentation Conventions 1 Backup and Recovery Overview 1.1 What is Backup and Recovery? 1.1.1 Phys

转 RMAN: RAC Backup, Restore and Recovery using RMAN

PURPOSE The purpose of this document is to give a quick guide for using RMAN on RAC databases. We will follow this points: 1. Verify the database mode and archive destination.2. Verify connectivity using sqlnet for target and catalog.3. Determine the

backup2:backup devices

Backup Devices 是存储SQL Server 数据和Trasaction Log备份的文件,分为两种:Physical backup device 和 logical backup device.physical backup device 是指Windows OS的file,其 physical name 类似:"D:\FolderPaths\FileName.bak",也可以是远程共享网络上一个file,其physical name 类似:"\\ServerN

master db 只能做full backup

今天在做Differential 备份时,发现 master db 只能做full backup,原因是master只能处于Recovered 状态,不能处于NoRecovery(recovering)状态. You can only perform a full backup of the master database. Use BACKUP DATABASE to back up the entire master database. 参考文档:Differential backup of

Backup your Android without root or custom recovery

ecently discovered a neat new way to back up apps on my Android without having to use Titanium Backup, having to unlock bootloader or root the device to take a NANDroid snapshot. The icing on the cake - I can do it from command line! Warning: this me

TFS Express backup and restore

 When we setup source control server, we should always make a backup and restore plan for it. This article is to describe how to backup and restore a TFS Express instance from one server to another server. This blog is an English version, for Chine