7

I am trying to restore from a backup and getting the following error

Msg 3201, Level 16, State 2, Line 1
Cannot open backup device 'Z:\FULL_BACKUP.bak'. Operating system error 3(failed to retrieve text for this error. Reason: 15105).
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

The code that I used in SQL Server is as follows (I also tried using the dialog screens and got the same result)

RESTORE DATABASE DEX
FROM DISK = 'Z:\FULL_BACKUP.bak'
WITH MOVE 'Decri' TO 'E:\Test\DEX.mdf',
MOVE 'Decri_log' TO 'E:\Test\DEX.LDF'

It may be worth noting that the "FULL_BACKUP" is created by the same SQL server, without any issues (so I assume that the server has permissions).

Drive Z is a network path, for which there is 'full access' to all domain users.

The full backup is 200Gb

Drive E (local) has 500Gb free space

Any help would be appreciated.

1
  • 1
    Was the full backup created WITH INIT? Can you create a very simple database, back it up to that same location, and try restoring it the same way? (This will separate whether the problem is the drive or the file.) Oct 15, 2013 at 12:32

3 Answers 3

16

OS Error code 3 is ERROR_PATH_NOT_FOUND: The system cannot find the path specified. With a path starting with Z: my pshyhic powers tell me it is a mapped drive. Drive mapping is session scoped and I'm convinced your service session does not see Z:. Mapping a drive to be seen by a service is, for all practical purposes, impossible.

Use a valid path. Use UNC names like \\server\share. Consider the security implication of impersonation and delegation when accessing remote shares.

1
  • 1
    I assumed they had set up the share to be visible by the service account, which isn't impossible if they use a domain account for the service, because they said that they created the backup from the same server. If they can back up to Z:\ (and I'll admit, they didn't say that explicitly), they should be able to restore from Z:\... Oct 15, 2013 at 12:50
2

Indeed, using the UNC path in the SQL seems to have worked (strangely the dialog screens still didn't, but the important factor, is that the fast response on here has resolved the issue (much thanks!)

RESTORE DATABASE [RESTOREDB] FROM  DISK = N'\\SERVER\PATH\FULL_BACKUP.bak' WITH  FILE = 3,  
MOVE N'myDB' TO N'E:\Test\DEX.mdf'
MOVE N'myDB_log' TO N'E:\Test\DEX.LDF',  NOUNLOAD,  STATS = 10
GO
3
  • 2
    This shouldn't really be a separate answer, it doesn't really add any information that the answer from Remus doesn't already explain. Oct 15, 2013 at 13:05
  • 1
    Additionally, what should be done here is the checkmark should be awarded to Remus' answer to indicate that it did precisely what you wanted, helped solve the problem, etc. This increases his net-community-standing, and gives your account a little boost too (yay gamification!)
    – jcolebrand
    Oct 15, 2013 at 16:54
  • Agree; just that the question was originally posted on StackOverflow and was moved here by admins. My login details for this site wouldn't work, so the only way I could see to give credit to Remus, was like this.
    – Sean
    Oct 16, 2013 at 9:04
-1

Here is what you guys need to do:

1) Launch SQL Server Configuration Manager - you should be able to find this program on your: Start menu -> All Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager

2) Expand tree view "SQL Server Services". On right pane, youl will see the list of Services installed. In my case, I will have to look at the SQL Server 2008 R2 instance. Previously, it was set to run under "NT AUTHORITY\NETWORK SERVICE"

3) Click on this SQL Server instance -> Properties and change the "Log on" to LOCAL SYSTEM. The system will prompt you that it needs to restart the SQL Service. Please do so.

4) Once this is done, you can then backup your database without any hassles!

Hope this helps!

1
  • This really doesn't answer the question... Aug 26, 2014 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.