How to fix SQL Server backup to network share access denied

Delia
4 min readAug 13, 2021

--

Many users have received this message when trying to backup SQL Server database to network share: “Cannot open backup device. Operating system error 5 (Access is denied)”.

The backup terminates abnormally because it cannot open the backup device, and the most likely reason is your login account of SQL Server does not have permission to read or write to the target share.

To fix, you could try following steps.

How to resolve Operating system error 5 Access is denied

1. To check the read and write permissions, you need to first confirm what the current SQL login account is.

Press Win + R and type “services.msc” in the Run window. Press Enter to execute it.

In the Services window, you could find the SQL instance you want to backup, and check which account you log on it as.

To copy the full account name, just right-click it and choose Properties, then switch to Log On tab.

2. Navigate to your target share, right-click it and choose Properties > Security. If the account you just found is already listed here, just Edit it and Allow its Full Control.

Otherwise, you need to click Edit > Add to enter the login account, click OK to search for it, and select the correct one to add it and give it full permissions.

3. Apply the changes and hit OK to exit. Then you can retry the SQL Server backup to see if the access denied problem has been solved.

*What if the error still occurs

For this access denied error, another possible scenario is that, there is already a backup file with the same name in the target path, and it is read-only, so you cannot overwrite it with the new backup file.

Check if this is the case for your target path. If there’s a really a backup file of the same name, right-click it and choose Properties to check its attribute.

For a Read-only bak file, please uncheck its select box and hit Apply to confirm the change.

2. Effective software to backup SQL database to network share without error

Besides Operating system error 5 (Access is denied), there may be some other problems that arise when backing up SQL Server to network drive. If you are tired of troubleshooting or cannot complete the backup even after trying common solutions, maybe it’s time to try 3rd party software.

AOMEI Centralized Backupper is a centralized backup strategy for all Windows PCs, servers and virtual machines within LAN. Its SQL Server Backup feature supports SQL 2005–2019 and enables you to backup selected databases or instances to network share smoothly.

After installation, you could launch the software and request control for any computer on the network. Then go to Tasks tab to create a new task of SQL Server Backup.

In Step 1, click + Add Computers to detect the controlled computers with SQL database, then select one from the list.

In Step 2, hit + Add to detect SQL Server instances on the select computer. Then you can select the databases you want to backup.

Now move to Step 3, click Add Storage to add a network share or NAS as destination. You need to enter its UNC path and corresponding authentication.

After the basic setup, you can mange more settings as you like, or set up a Schedule to auto execute the task. Then, just Start Backup.

As I tried, even when the SQL Server log-on account doesn’t have read & write permissions for the network share, the database backup can be fulfilled successfully. And the network share you’ve added once will be saved for quick use later.

Conclusion

Why does SQL Server backup to network share access denied? This is usually because the account you log in SQL Server as doesn’t have the permissions to read and write to the target path. To solve it, you can either provide full control to the account, or use an effective alternative software to perform the backup.

With AOMEI Centralized Backupper, you won’t be bothered by the Operating system error 5 (Access is denied) or some other problems. Not only SQL Server, this software also applies to all the computer data of client computers. You can even centrally backup multiple servers within LAN.

--

--

Delia
Delia

Written by Delia

Sharing tips and solutions about Windows 10, data protection, disk partition, etc.

No responses yet