Microsoft SQL Server 需要特定使用者角色,才能執行特定作業。如要在 SQL Server 資料庫上執行 Backup and DR 擷取、還原、解除掛接、刪除和虛擬應用程式掛接作業,您必須提供 Windows 使用者 (本機使用者或網域使用者) 的憑證,該使用者必須具備足夠的 SQL 權限角色,才能執行作業。
本節詳細說明從備份/復原裝置執行擷取、還原、卸載、刪除和虛擬應用程式掛接作業所需的使用者角色。本節列出的建議角色是根據 Microsoft 存取 SQL Server 資料庫的最佳做法。
如要執行擷取、還原、解除掛接刪除和虛擬應用程式掛接作業,必須使用在 SQL 環境中具備足夠權限的 Microsoft Windows 使用者憑證,安裝 Backup and DR 代理程式。必須為 Windows 使用者指派特定角色。Microsoft Windows 使用者可以是新建立的使用者,也可以是現有使用者。
Windows 使用者必須具備的 SQL 角色
指派給 sysadmin 伺服器角色的 Windows 本機管理員使用者,擁有執行 Backup and DR 擷取、還原和虛擬應用程式掛接作業的所有必要權限。
如果 sysadmin 伺服器角色過於寬鬆,請將下列角色指派給 Windows 使用者:
dbcreator 伺服器角色
db_backupoperator 資料庫角色
db_owner 資料庫角色
此外,這類使用者也必須獲派下列可保護資源:
查看任何資料庫
建立任何資料庫
變更任何資料庫
連結 SQL
以下各節詳細說明在何處輸入 Windows 本機管理員的使用者名稱和密碼,以執行特定的 Backup and DR SQL 相關作業。
擷取 SQL Server 資料庫記錄的憑證
將備份計畫政策範本套用至 SQL Server 資料庫時,如果範本包含擷取資料庫記錄的政策,您必須在應用程式的備份計畫應用程式詳細資料和設定中,輸入已在管理主控台中指派適當角色的 Windows 使用者憑證。
還原 Microsoft SQL Server 資料庫的憑證
從管理控制台還原 SQL Server 資料庫時,請在「還原」對話方塊中,輸入已指派適當角色的 Windows 使用者憑證。
將 SQL Server 資料庫掛接為虛擬應用程式的憑證
虛擬應用程式掛接會將 SQL Server 資料庫掛接為虛擬應用程式。從備份/復原裝置執行 SQL Server 資料庫的虛擬應用程式掛接時,使用者必須獲派可掛接及卸載 (分離) SQL Server 資料庫的角色。
執行虛擬應用程式掛接時,請在「Mount」(掛接) 對話方塊的「Advanced options」(進階選項) 中,輸入已獲派適當角色的 Windows 使用者憑證。
備份和災難復原 Microsoft SQL Server DBA 指南
本頁面是系列頁面之一,專門介紹如何使用 Backup and DR 保護及還原 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"]],["上次更新時間: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,[]]