I recently had a job running on a reporting server that would restore the backups from the production server over the network. I had a system failure and had to rebuild the reporting server and now when I run the restore script I receive the following error. I have attached the job restore script.
Msg 3201, Level 16, State 2, Line 22
Cannot open backup device '\\serv007\r$\SQLBackups\DYNAMICS_EXT\DYNAMICS_EXT_backup_201212222235.bak'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 22
RESTORE DATABASE is terminating abnormally. Untitled.doc
Microsoft DevelopmentMicrosoft SQL Server
Last Comment
jdr0606
8/22/2022 - Mon
igordevelop
Hi,
I am sure this is a user permissions issue.
Try to go to the Control panel->administrative tools->services-> SQL Server
At the properties, choose log on as: local system account and also choose to allow service to interact with desktop.
I hope this will solve the problem.
Please let me know if anything.
Regards,
Igor
jdr0606
ASKER
Unfortunately that didn't resolve the issue, I'm still getting the same error.
My current work around is to copy the .bak file using \\serv007... to the server with reporting SQL and then restore from the local source.
I don't know if you have developed the script, but you can try to modify it to copy the backup file locally and than make the restore. Obviously the script can not do this directly via the remote server.
Or whoever made the script, needs to be asked to modify it a bit.
You can try yourself, to take the backup file locally and see if you can do the restore manually. If this works, than we'll know the diagnose.
I am sure this is a user permissions issue.
Try to go to the Control panel->administrative tools->services-> SQL Server
At the properties, choose log on as: local system account and also choose to allow service to interact with desktop.
I hope this will solve the problem.
Please let me know if anything.
Regards,
Igor