SQL Server 安装程序似乎将 MSDB 恢复模式重置为简单

gre*_*kes 2 sql-server msdb recovery-model

每次我们升级 SQL Server 安装(服务包或累积更新)时,msdb都会从 FULL 恢复模式更改为 SIMPLE 恢复模式。

我知道msdb数据库没有太大变化,并且在 SIMPLE 中使用它是很常见的,但我想知道为什么安装程序要更改它。它导致我的备份软件出错。

以下是安装日志的摘录:

2020-02-15 03:06:38.25 spid8s      Starting execution of MSDB.SQL
2020-02-15 03:06:38.25 spid8s      ----------------------------------
2020-02-15 03:06:38.35 spid8s      Configuration option 'allow updates' changed from 0 to 1. Run the RECONFIGURE statement to install.
2020-02-15 03:06:38.35 spid8s      Configuration option 'allow updates' changed from 0 to 1. Run the RECONFIGURE statement to install.
2020-02-15 03:06:38.56 spid8s      Checking the size of MSDB...
2020-02-15 03:06:39.41 spid8s       
2020-02-15 03:06:39.41 spid8s      Setting database option TRUSTWORTHY to ON for database 'msdb'.
2020-02-15 03:06:39.41 spid8s      Setting database option RECOVERY to SIMPLE for database 'msdb'.
2020-02-15 03:06:39.46 spid8s      ----------------------------------
2020-02-15 03:06:39.46 spid8s      Finished execution of MSDB.SQL
2020-02-15 03:06:39.46 spid8s      ----------------------------------
2020-02-15 03:06:39.46 spid8s      -----------------------------------------
2020-02-15 03:06:39.46 spid8s      Starting execution of MSDB_VERSIONING.SQL
2020-02-15 03:06:39.46 spid8s      -----------------------------------------
2020-02-15 03:06:39.47 spid8s      -----------------------------------------
2020-02-15 03:06:39.47 spid8s      Finished execution of MSDB_VERSIONING.SQL
2020-02-15 03:06:39.47 spid8s      -----------------------------------------

Run Code Online (Sandbox Code Playgroud)

Lea*_*min 5

这已在Microsoft 站点的文档中提到,如下所示:

默认情况下,msdb 使用简单恢复模型。如果您使用备份和还原历史记录表,我们建议您使用 msdb 的完整恢复模型。有关详细信息,请参阅恢复模型 (SQL Server)。请注意,在安装或升级 SQL Server 以及使用 Setup.exe 重建系统数据库时,msdb 的恢复模式会自动设置为简单。

您需要根据您的要求在执行任何安装或服务包后更改恢复模型。

以上希望能澄清您的担忧。