Thursday, March 29, 2012

Error restoring database

When attempting to restore a database, I get the following error:

'Cannot open backup device, (filename).bak, Operating system error 5, access is denied.'

I get similar errors when attempting to attach the database file, it shows up in the Mngt. Tool as 'read only'.

This error does not occur when restoring the same .bak file to other pc's. On the problem pc, we have completely uninstalled and reinstalled Sql Express and Mngt. Tool Express. It occurs whether logged in as full administrator or other user.

check the path where the backup file resides whether you could access it....may be that mite cause the above error|||Which OS are you running on ? using Vista it might be caused that you don′t have elevated rights (although logged on with an administrator account)

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

OS is xp-pro.

The directory of the file is accessible as well.

|||

Are you connecting using SQL Server authentication ? Then you will be impersonated with the SQL Server account which is running the service on the machine. If this one does not have permissions on the file / directory, then you probably will get the Permission denied error message.

Jens K. Suessmeyer

http://www.sqlserver2005.de

|||

Have tried using SQL authentication and windows authentication. How do you determine if the sql server account has particular permissions on the file/directory?

|||

just right click the file/directory and go to security tab and check the permission for the sql service account

No comments:

Post a Comment