sql-server - SQL Server : if I don't specify a RECOVERY mode for a RESTORE DATABASE, 默认是什么?

标签 sql-server database backup

发件人: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/

相关文章:

sql - 匹配列中的逗号分隔值

sql-server - 有没有办法转换客户 ID 及其最近的订单日期?

php - 我如何在 laravel 中使用 "php artisan migrate"迁移我的数据库

database - 通用数据库备份/提取格式

sql-server - 获取数据库中所有表和 View 的计数

sql-server - 了解执行计划中的执行次数

php - 除非我刷新页面,否则数据不会插入数据库?

database - 数据库设计中的陷阱

php - MySQLdump 结果有很多注释行,没有真正的内容

linux - 使用dd创建磁盘镜像时"No space left on device"