发件人:http://msdn.microsoft.com/en-us/library/ms187495.aspx
例子:
--恢复常规日志备份(从备份集2)。
RESTORE LOG AdventureWorks2008R2
FROM DISK = 'Z:\SQLServerBackups\AdventureWorks2008R2FullRM.bak'
WITH FILE=2,
NORECOVERY;
我的问题:如果我不指定NORECOVERY
,它会是默认值吗?我有一堆以这种方式迁移的数据库,但我不确定如何判断使用了哪种恢复模型。
谢谢
最佳答案
恢复是默认设置。请参阅 RESTORE 的文档命令,其中指出:
Comparison of RECOVERY and NORECOVERY
Roll back is controlled by the RESTORE statement through the [ RECOVERY | NORECOVERY ] options:
NORECOVERY specifies that roll back not occur. This allows roll forward to continue with the next statement in the sequence.
In this case, the restore sequence can restore other backups and roll them forward.
RECOVERY (the default) indicates that roll back should be performed after roll forward is completed for the current backup.
Recovering the database requires that the entire set of data being restored (the roll forward set) is consistent with the database. If the roll forward set has not been rolled forward far enough to be consistent with the database and RECOVERY is specified, the Database Engine issues an error.
关于sql-server - SQL Server : if I don't specify a RECOVERY mode for a RESTORE DATABASE, 默认是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7666194/