TFS 2015 - TF401002: The SQL Server Database Engine failed to save the database backup to path

烂漫一生 提交于 2021-02-11 08:18:32

问题


When attempting to create scheduled backups for TFS 2015, I received the following message: "TF401002: The SQL Server Database Engine failed to save the database backup to path \{share}\d$\TFSBackups. Please grant SQL service account read/write access to that folder."

I can't seem to find a solution that will work for me. The 'TFSBackups' folder is shared with full permissions for the NETWORK SERVICE and MSSQLSERVER.

What haven't I done?


回答1:


Put the comment from Panagiotis Kanavos in the answer.

The error message is crystal clear and has nothing to do with TFS. That account doesn't have permission to write to that folder.

The path is NOT a path to a valid share, it uses the administrative endpoint d$ to directly access a physical drive. Only administrators are allowed to use administrative endpoints.

Just share TFSBackups, set the proper permissions and use the share's path, eg \\MyStorageMachine\TFSBackups




回答2:


Normally SQL Service is running at user NT Authority/SQLAgent or similar(these users doesn't have authorization to tfs network folder). Go services and change owner of service to an account which has access to tfs folder.




回答3:


I had the same problem with TFS, You must be setting up TFS Backups using TFS Admin console. It is actually the SQL service which write and read backup files to the said location. Just make sure you grant access to the SQL Service accounts.




回答4:


If you're on Domain pay attention to Domain User Name.

In my case, SQL Server engine was executed by domain user User@Domain.com but my true permission was for Domain\User so fixing user Logon as in SQL engine saved my day.

Most of the time NT Authority doesn't have write permission on network path so, you need to change Azure or TFS owner user to valid network user.



来源:https://stackoverflow.com/questions/41846807/tfs-2015-tf401002-the-sql-server-database-engine-failed-to-save-the-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!