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.