Solved

SQL Restore from networked server

Posted on 2012-12-23
7
331 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
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 500 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

827 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