0

I need to create a backup of my database and then restore the same on my PC. I am copying my backup file to another folder( Eg: 'Example' ) and setting the property as 'Share with Nobody' to the folder( Right click on the 'Example' folder->Share with->Nobody ). If I try to perform a restore operation after this, I am getting below Access denied error.

SQL Error : [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open backup device 'C:\Temp\Example\Example.bak'. Operating system error 5(Access is denied.).

This scenario is reproduced when we ran the query

RESTORE VERIFYONLY FROM DISK = 'C:\Temp\Example\Example.bak'
Lukasz Szozda
  • 162,964
  • 23
  • 234
  • 275
Kiran Joshy
  • 105
  • 10
  • Probably MS SQL server has no access to the directory? http://stackoverflow.com/questions/18286765/sql-server-operating-system-error-5-5access-is-denied – smyatkin_max Sep 18 '15 at 10:31

1 Answers1

0

Your Sql Server instance needs permissions to read the backup file. Make sure the service account that's running Sql Server has rights to access the file share.

Rachel Ambler
  • 1,440
  • 12
  • 23