KB Issue
Using SQL Server Agent Jobs to create a backup scheduler to a network drive without the proper permissions will result in the Operating system error 5 (Access is denied.)
Copy
Search Site
Search Google
Issue Details
If the network folder you want to use for a backup location does not have adequate rights, you will receive the following error.
Operating system error 5 (Access is denied.)
11/23/2020 23:53:55,Backup,Error,,ServerName-01\SQL2019,Backup,,,The job failed. The Job was invoked by User YourUsername. The last step to run was step 1 (Database).,00:00:01,0,0,,,,0
11/23/2020 23:53:55,Backup,Error,1,ServerName-01\SQL2019,Backup,Database,,Executed as user: Your-Domain\sqlagent. Cannot open backup device '\\Network-Path\SQLBackup\11-23-2020\11-23-2020-DatabaseName.BAK'. Operating system error 5(Access is denied.). [SQLSTATE 42000] (Error 3201) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013)
Recreate Issue
Not properly setting permissions for the SQL Agent user to access the network share folder resource location.
Resolve Issue
[Step #1:]
  1. Right-click on the network folder.
  2. Click the [Security] Tab
  3. Click [Edit]
  4. Click [Add]
  5. Type in the SQL Agent account name and choose [OK]
  6. Give [Full Control]
  7. Click [Apply] then [OK]
[Step #2:]
  1. Choose the [Sharing] tab.
  2. Click on [Share...]
  3. Select the SQL Agent User.
  4. Under [Permission Level], choose [Read/Write]
  5. Click on [Share]