SQL Server系统数据库– msdb数据库

本文详述了msdb数据库在SQL Server中的作用,它不仅作为SQL Server Agent的数据库存储作业信息,还用于存储备份和恢复记录。此外,文章讨论了msdb的角色、容量规划、操作限制以及如何管理和维护其大小。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

介绍 (Introduction)

This article is the third I am writing about Microsoft SQL system databases.

本文是我正在撰写的有关Microsoft SQL系统数据库的第三篇文章。

In this article, I will focus only on the msdb database, one of the four system databases that exist in any MSSQL instance:

在本文中,我将仅关注msdb数据库,该数据库是任何MSSQL实例中存在的四个系统数据库之一:

msdb的用法 (msdb usage)

The msdb database is mostly known as “the SQL Server Agent database” because it stores information of all SQL Agent jobs as their configuration and their execution history.

msdb数据库通常被称为“ SQL Server代理数据库”,因为它存储所有SQL代理作业的信息作为其配置和执行历史记录。

But it is not dedicated mainly to SQL Server Agent. Features like the Service Broker or the Database Mail also stores data in msdb database.

但是它不是主要用于SQL Server代理。 Service Broker或数据库邮件之类的功能也将数据存储在msdb数据库中。

The msdb database it is also used to store information about all backups and restores that are executed, no matter if they were executed by a SQL Agent job or ran by SSMS, sqlcmd or any other application (e.g. backup solutions as NetBackup), msdb will keep track of all related operations.

msdb数据库还用于存储有关已执行的所有备份和还原的信息,无论它们是由SQL Agent作业执行还是由SSMS,sqlcmd或任何其他应用程序(例如,备份解决方案,如NetBackup)运行, msdb都会跟踪所有相关操作。

的角色 (Roles)

One particularity of the msdb is that is the only system database that has pre-defined database roles besides the regular fixed database roles ones. Besides the members of the sysadmin fixed server role that are able to perform any operation in the MSSQL instance, only members of the following database roles are able to execute the related operations (for better understanding I have grouped these database roles):

msdb的一个特殊性是,除了常规的固定数据库角色之外,它是唯一具有预定义数据库角色的系统数据库。 除了能够在MSSQL实例中执行任何操作的sysadmin固定服务器角色的成员之外,只有以下数据库角色的成员才能执行相关的操作(为了更好地理解,我将这些数据库角色分组了):

Group name Database role name Notes
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值