How to Fix SQL Server Backup "Access Denied" Error?

SQL Server backup can be easily executed by SSMS or command but there is a common error “access denied”. You will know its cause and how fix to it in this post.

download-icon
Free Download
for VM, OS, DB, File, NAS, etc.
nick-zhao

Updated by Nick Zhao on 2023/07/04

Table of contents
  • Why you see “access denied” error during SQL Server backup?

  • How to fix “access denied” error if you can’t backup database to certain location?

  • How to check and modify the permission of your account to target folder?

  • How to check and change target folder’s attribute?

  • How to check and change the account of SQL Server service?

  • How to backup and restore SQL Server with Vinchin Backup & Recovery?

  • Sum Up

Are you looking for a robust database server backup solution? Try Vinchin Backup & Recovery!↘ Download Free Trial

SQL Server database is widely used in companies because of its powerful features and ease of use. Substantial business data is generated and then stored to the database every day. To protect precious data, companies should backup the database in case of any disasters.

Because SQL Server provides an intuitive interface SSMS, SQL Server Management Studio, you can easily make a backup step by step in it or you can directly generate a backup file using T-SQL command.

The procedures are not complicated but the result is not always satisfying. When you execute the command or click the button OK, you might receive the error message which indicates that the backup job cannot be completed because access is denied.

A common message might be “Cannot open backup device. Operating system error 5(Access is denied)” and it particularly appears when you would like to backup SQL Server to a network share.

You will know the causes of this error and how to fix it in the following content.

Why you see “access denied” error during SQL Server backup?

Generally speaking, this error is often caused by account permission issue or wrong folder attribute.

If you wish to save SQL server backup to certain folder, the account must have the permission to read and write the folder. You should know that the commands of SQL Server are executed with the permissions of the account of SQL Server service, not the Windows account.

With no permissions, no matter you use SSMS or command, it will return the error message. Therefore, you should check the permissions of the account, set up its permission, or change the account to backup the database.

On the other hand, the properties of the folder should allow you to write data into it. If it is read-only, then you can’t create the bak backup file in it. Therefore, you should also check the folder’s properties to make sure it will accept your data.

How to fix “access denied” error if you can’t backup database to certain location?

Since you have known the possible causes of this error, you can troubleshoot or fix it by checking the permissions of the account, modifying the permissions of it, logging in to SQL Server service with another account, checking the attribute of target folder, or modifying its attribute.

How to check and modify the permission of your account to target folder?

Just right-click the folder > select Properties > click Security tab

You will see which group or user has permission to access the folder. See whether your account is in the list and then click it to check whether it has permission to read and write this folder.

What if this account doesn’t have permission to read and write this folder?

Still under Security tab in Properties of the folder > click your account > click Edit > check Read, Write, and Full Control to allow your account to save backup file to this folder

How to check and change target folder’s attribute?

Still in the Properties of this folder > select General this time > check whether this folder is read-only

Just Uncheck the box Read only to allow SQL server create file in it.

How to check and change the account of SQL Server service?

You should also check which account you are using to log in to SQL Server service to make sure your other configurations take effect.

Search Service in the search bar and open it > find SQL Server (MSSQLSERVER) > right click it and select Properties > click Log On tab > check the account you are using or use another account here

How to backup and restore SQL Server with Vinchin Backup & Recovery?

Manually making database backup is just the primary backup solution. For companies, to protect business data, a professional backup solution is needed.

Vinchin Backup & Recovery supports backing up various mainstream databases including SQL Server, MySQL, Oracle Database, PostgreSQL, MariaDB, etc. It will help automatically backup database while it is running and delete the outdated backup to effectively protect data and save backup storage and let you recover database with better granularity.

A user-friendly web console will help easily make backup to the desired destination like file server or NAS.

1. Select backup source. You can select the wanted databases to add them into one backup job.

Select SQL Server Database

2. Select backup destination. Vinchin backup supports multiple kinds of backup storage including local partition or disk, logical volume, local directory, Fiber Channel Storage Area Network (FC SAN) storage, iSCSI storage, NFS storage, CIFS storage, etc. so if you want to backup database to network share, just add it into the backup system and then you can select it here.

Select Network Share as Backup Destination

3. Select backup strategies. You can create incremental backup every day to shorten backup window and save backup storage. Log Backup will improve the granularity during data recovery.

Select Backup Strategies

4. Just review the summary of the job and submit it

Submit the job

Vinchin Backup & Recovery has been selected by thousands of companies and you can also start a 60-day full-featured trial here. Also, contact us directly and then you will receive the tailored solution for your companies. We have established partnerships with companies all over the world so if you wish to start a local business, just find a local partner here.

Sum Up

“Access denied” error often appears during SQL Server data backup especially when backing up data to network share and is very related to permission of account and folder attribute. You can use these tips in this post to troubleshoot and fix it.

Companies should have a highly efficient backup solution to protect business data. Vinchin Backup & Recovery has helped thousands of companies protect database and you can also use it to guarantee business continuity. Don’t miss the free trial.

Share on:

Categories: Database Tips
Free Trial Now close-icon