Cannot open backup device ''. Operating system error 5(Access is denied.). BACKUP DATABASE is terminating abnormally.

You are trying to take a SQL Server Database backup and end up error saying:

"Msg 3201, Level 16, State 1, Line 1
Cannot open backup device ''. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally."

There are couple of Scenarios under which this Error Can Occur.

  • You are trying to place the backup File on Root of a Drive where the OS is installed. Ex. C Drive. By default microsoft considers this as critical Drive and does not allow something to be written to root of this drive from API or thrid party software or an application.
    • Solution to this is Point your Backup location to some sub directory under the drive say C:\TestBackup\MyBackupFileName.bak
  • The Service Account under which the SQL Server is running or the Domain Account under which the Backup is being done, does not have read permission on Network Shared Path or a Folder.
    • Solution to this is Provide Write Access to Network Shared Path or Folder to Service Account under which the SQL Server is running or the Domain Account under which the Backup is being done, this can be done only by Account which is having higher rights on this Path.