?
Solved

SQL Restore from networked server

Posted on 2012-12-23
7
Medium Priority
?
367 Views
Last Modified: 2012-12-31
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
0
Comment
Question by:jdr0606
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Expert Comment

by:igordevelop
ID: 38717515
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
0
 

Author Comment

by:jdr0606
ID: 38717600
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.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 1500 total points
ID: 38717645
Since you appear to be backing up to a remote server, you cannot use a local system account for this, it has to be a domain account with the appropriate permissions on the SQL Server box as well as access to the remote server.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 4

Expert Comment

by:jjjosef
ID: 38717854
The database is often running as a service under an account with no network access.

If this is the case, then you wouldn't be able to restore directly over the network.

Either the backup needs to be copied to the local machine or the database service needs to

run as a user with the proper network access.

For more information follow th given link...

SQL Server backup and restore to network drive

~ Edit by Modulus_Twelve - This post contains unattributed content from http://stackoverflow.com/questions/16491/restore-database-backup-over-the-network# ~
0
 
LVL 1

Expert Comment

by:igordevelop
ID: 38717991
Hi,

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.

Regards,
Igor
0
 

Accepted Solution

by:
jdr0606 earned 0 total points
ID: 38721479
I resolved the issue and it was related to permissions.

The script I attached works as is however the SQL Server service must be configured to login to with "This Account" network account with domain permissions to the network/server location and not to the "local account".
0
 

Author Closing Comment

by:jdr0606
ID: 38732190
Completed the permission solution
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question