Detailed SQL Server differential backup restore

Source: Internet
Author: User
Tags management studio sql server management sql server management studio backup

Restoring a differential backup in SQL Server requires restoring a full backup prior to the differential backup point, adding the NORECOVERY parameter when restoring a full backup, and the sample SQL statement is as follows:

RESTORE database [DB name] 
from  DISK = N ' full backup file path '
with  file = 1,  
nounload,  
STATS = ten, 
NORECOVERY Go

The corresponding options in Management Studio are:

Leave the database non-operational, and do not roll back uncommitted transactions. Additional transaction logs can be restored. (RESTORE with NORECOVERY)

If the NORECOVERY parameter is not added and the default is recovery, then:

A window operation in SQL Server Management Studio will cause an error message: Unable to create restore plan due to break in the LSN chain.

The error prompts you to execute SQL statements in SQL Server 2008/2012 Management Studio: The log or differential backup cannot be restored because no files are ready to rollforward.

(Complain: It's easy to mislead people by prompting information)

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/SQLServer/

When you restore a differential backup, if only one differential backup file needs to be restored, without using the NORECOVERY parameter, the sample SQL statement is as follows:

RESTORE database [DB name]  from DISK = N ' differential backup file path '  with file = 1,  
nounload,  
STATS = ten
Go

If you have multiple differential backup files that need to be restored, you will need to add the NORECOVERY parameter in addition to the last differential backup file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.