Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I try to restore a database backup file, I get the following error:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Additional information:

Cannot open backup device 'C:\Domains\Backup.bak'. Operating system error 5(Access is denied.).

RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3201)

This only happens on our remote machine. The backup file restores fine locally. The user has administrative privileges on the remote machine and the network service has access to the database and backup file. What is the problem here?

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

The SQL user needs the rights to access that location. Network service and local user are not used by SQL anymore.

share|improve this answer
add comment

While installing sql server if u have selected network services then you will have to add network service in services.msc. select sql server (mssqlserver) and then click properties and then log on. Here specify the account you have used while installing sql server and I hope your problem will be solved. Still if it not solved then you can get in touch with me at gauravj.iitkgp@gmail.com

share|improve this answer
add comment

Is this using 2008/2008r2/win7/vista? If so, Adminsitrator users aren't administrators... until after UAC has it's say-so. You could try running the restore process with the application running in "Administrator Mode" (right-click run as administrator)... and see if that helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.