Microsoft SQL Server 需要特定的用户角色才能执行特定操作。如需对 SQL Server 数据库执行 Backup and DR 捕获、恢复、卸载、删除和虚拟应用装载操作,您必须提供 Windows 用户的凭据(本地用户或网域用户),该用户所拥有的角色必须具有足够的 SQL 权限来执行相应操作。
本部分详细介绍了从备份/恢复设备执行捕获、恢复、卸载、删除和虚拟应用装载操作所需的用户角色。本部分中介绍的建议角色基于 Microsoft 关于访问 SQL Server 数据库的最佳实践。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-21。"],[[["\u003cp\u003eMicrosoft SQL Server operations like backup, restore, and mounting require a Windows user with specific SQL privileges.\u003c/p\u003e\n"],["\u003cp\u003eA Windows user with the \u003ccode\u003esysadmin\u003c/code\u003e server role has all necessary permissions, but if this is deemed too liberal, the roles \u003ccode\u003edbcreator\u003c/code\u003e, \u003ccode\u003edb_backupoperator\u003c/code\u003e, and \u003ccode\u003edb_owner\u003c/code\u003e, along with securables like "View any database," "Create any database," "Alter any database," and "Connect SQL" are an alternative.\u003c/p\u003e\n"],["\u003cp\u003eCredentials for a Windows user with the appropriate roles are necessary when capturing database logs, restoring databases, or mounting a database as a virtual application.\u003c/p\u003e\n"],["\u003cp\u003eThe Backup and DR agent must be installed using the credentials of a Microsoft Windows user who has sufficient privileges in the SQL environment.\u003c/p\u003e\n"],["\u003cp\u003eImproperly defined users or roles can lead to Backup and DR job failures, security violations, and potential data loss, so a qualified administrator must define them.\u003c/p\u003e\n"]]],[],null,["# Prepare SQL Server databases for Backup and DR Service\n\nMicrosoft SQL Server requires specific user roles to perform specific\noperations. To perform Backup and DR capture, restore, unmount,\ndelete, and virtual application mount operations on a SQL Server database, you\nmust provide credentials for a Windows user---a local user or a domain\nuser---who has a role with sufficient SQL privileges to perform the\noperation.\n\nThis section details the user roles required to perform capture, restore,\nunmount, delete, and virtual application mount operations from a\nbackup/recovery appliance. The recommended roles presented in this section are\nbased on Microsoft's best practices for accessing SQL Server databases.\n\nBefore you begin, it's a good idea to review [Backup and DR for SQL\nServer databases](/backup-disaster-recovery/docs/concepts/sql-intro).\n| **Note:** Creating users and assigning roles must be done by qualified system and database administrators. If users are improperly defined, or roles are improperly applied, the result can lead to Backup and DR job failure, security violations, and possible data loss.\n\nWindows local administrator user\n--------------------------------\n\nTo perform capture, restore, unmount delete, and virtual application mounts, the\nBackup and DR agent must be installed with the credentials of a\nMicrosoft Windows user who has sufficient privileges in the SQL environment. The\nWindows user must be assigned a specific role or roles. The Microsoft Windows\nuser can be a newly created or existing user.\n\nRequired SQL roles for the Windows user\n---------------------------------------\n\nA Windows local administrator user assigned to the `sysadmin` server role has\nall necessary permissions to perform Backup and DR capture, restore\nand virtual application mounts.\n\nIf the `sysadmin` server role is deemed too liberal, then assign a\nWindows user the following roles:\n\n- `dbcreator` server role\n\n- `db_backupoperator` database role\n\n- `db_owner` database role\n\nIn addition, such users must also be assigned the following securables:\n\n- View any database\n\n- Create any database\n\n- Alter any database\n\n- Connect SQL\n\nThe following sections detail where to enter the Windows local admin's username\nand password to perform specific Backup and DR SQL related operations.\n| **Note:** In the following procedures, when entering user names, in most cases the domain name and user name---domain or username---format is sufficient. In rare cases, entering the domain name or username returns the error `Logon failure: unknown user name or bad password [1326]` In such cases, use the fully qualified domain name format `(username@fqdn\u003c/span\u003e_)` to address the problem.\n\n### Credentials for capturing SQL Server database logs\n\nWhen applying a backup plan policy template to a SQL Server database, if the\ntemplate contains a policy that captures database logs you must enter\ncredentials of a Windows user assigned the proper roles in the management\nconsole in the application's backup plan application details and settings.\n| **Note:** Credentials are required for logs; they are not required if only databases are being captured.\n\n### Credentials for restoring a Microsoft SQL Server database\n\nWhen restoring SQL Server databases from the management console, in the\n**Restore** dialog, enter credentials of a Windows user assigned the\nproper roles.\n\n### Credentials for mounting a SQL Server database as a virtual application\n\nA virtual application mount mounts a SQL Server database as a virtual\napplication. When performing a virtual application mount of a SQL Server\ndatabase from a backup/recovery appliance, the user must be assigned a role that\nallows both the ability to mount and unmount---detach---the SQL Server\ndatabase.\n\nWhen performing a virtual application mount, in the **Mount** dialog\n**Advanced options**, enter the credentials of a Windows user assigned the\nproper roles.\n\nThe Backup and DR Microsoft SQL Server DBA guide\n------------------------------------------------\n\nThis page is one in a series of pages specific to protecting and recovering\nMicrosoft SQL Server databases with Backup and DR.\nYou can find additional information at:\n\n- [Backup and DR for Microsoft SQL Server Databases](/backup-disaster-recovery/docs/concepts/backupdr-for-sql-server)\n- [Prepare SQL Server databases for Backup and DR Service](/backup-disaster-recovery/docs/configuration/prepare-sql-server)\n- [Add a SQL Server database host and discover databases](/backup-disaster-recovery/docs/configuration/discover-sql-server)\n- [Configure backup plans for Microsoft SQL Server instances and databases](/backup-disaster-recovery/docs/backup/back-up-sql-server)\n- [Application details and settings for Microsoft SQL Server instances and databases](/backup-disaster-recovery/docs/backup/app-details-settings-sql-server)\n- [Mount a SQL Server database](/backup-disaster-recovery/docs/access-data/mount-sql-server)\n- [Mount databases into SQL Always On Availability Groups](/backup-disaster-recovery/docs/access-data/mount-sql-server-aag)\n- [Manage an active mount](/backup-disaster-recovery/docs/access-data/manage-active-mounts)\n- [Migrate a SQL Server database](/backup-disaster-recovery/docs/access-data/mount-and-migrate-sql-server-2)\n- [Clone SQL Server databases](/backup-disaster-recovery/docs/access-data/clone-sql-server)\n- [Recover SQL Server backups](/backup-disaster-recovery/docs/restore-data/restore-sql-server)"]]