directory lookup for the file failed with the operating system error 5(access is denied.)

12,394

Solution 1

Do check your directory path at which Backup and Restore taking place. (some folder might be deleted). Also solution would be you can backup using scripts and there you could avoid this error by mentioning the path to backup or restore database.

Refer to http://social.msdn.microsoft.com/Forums/en-US/sqlkjmanageability/thread/1d044ccd-9c16-4a60-819d-cf7f9125384c

Solution 2

SQL Server 2012 runs with your user account , so if you don't have read and right access, you will get this error so give your account administrator rights or proper rights needed to perform your task.

Share:
12,394
michael
Author by

michael

Updated on June 27, 2022

Comments

  • michael
    michael almost 2 years

    I had SQL Server 2008 R2. I uninstalled it and installed SQL Server 2012 - now I can't attach database or back up database because I have error:

    directory lookup for the file failed with the operating system error 5(access is denied.)

    What should I do? :(