環境:
AD
NAS
MS SQL
異常狀況:
MS SQL 維護計劃 在設定DB備份的路徑,不能指定到NAS上的共用資料夾。
解決過程:
維護計劃在備份時,執行的身份通常是預設的一個系統服務帳號,可以到"服務"去查。
因為沒辦法在NAS上的共用資料夾上指派存取權限給這個帳號。
所以要換個方法
1.先在AD建立一個群組,然後把MS SQL這台主機的電腦帳號,加到這個群組。
2.接著在NAS上的共用資料夾,指派AD群組有修改權限。
這樣就完成了,備份時,這台主機就直接有權限讀寫,不會被SQL服務執行的身份給影響。
Environment:
Issue:
When configuring a database backup destination in an MS SQL Server Maintenance Plan, the backup cannot be written directly to a shared folder on a NAS.
Resolution:
When a Maintenance Plan runs, it typically executes under the security context of a SQL Server service account (which can be identified in Services).
Since it is often not possible to assign permissions on the NAS shared folder directly to this service account, the following approach can be used:
- Create a new Active Directory security group.
- Add the computer account of the SQL Server to this AD group.
- On the NAS shared folder, grant the AD group Modify permissions.
With this configuration, the SQL Server host can access the shared folder using its computer account permissions, allowing the Maintenance Plan to read from and write to the NAS share without being affected by the specific SQL Server service account being used.

