Msg 3201, Level 16, State 2, Line 2

Hi All,

Below error occurred while restoring a database from network/nas drive. This backup was taken from different machine and I am restoring on different machine.

Msg 3201, Level 16, State 2, Line 2

Cannot open backup device '\\nas_drive\backup_7448075.bak'. Operating system error 5(failed to retrieve text for this error. Reason: 15105).

Msg 3013, Level 16, State 1, Line 2

RESTORE DATABASE is terminating abnormally.

Regards,

kccrga

October 8th, 2013 11:08pm

Hello,

OS Error 5 (net helpmsg 5) returns "Access Denied."

What does this mean? It means the service account running SQL Server on the instance you are trying to restore to doesn't have adequate rights to the file on the network share. Please give the service account the correct windows level permissions on the share and you should be good to go.

-Sean

Free Windows Admin Tool Kit Click here and download it now
October 9th, 2013 1:19am

Hi kccrga,

Im writing to follow up with you on this post. Was the problem resolved after performing our action plan steps? If you are satisfied with our solution, Id like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings or concerns you may have.

 Thanks,
Sofiya Li

October 16th, 2013 9:50am

Yes, the problem was solved after changing the instance under domain account.
Free Windows Admin Tool Kit Click here and download it now
October 17th, 2013 4:02am

Hi I am having the same error crossing between Windows 2012 with SQL 2012 going to a Windows 2002 server with SQL 2005.

I have mapped a drive to the F drive on the 2003 server \\server2003\f$\ to an X: drive on the Windows 2012 server. 

Script:

USE [MASTER]
RESTORE DATABASE [A]FROM  DISK = N'X:\DIR\DB_201503052010.bak'
WITH
FILE = 1,  MOVE N'Default' TO N'E:\DB.mdf',
MOVE N'Log' TO N'E:\DB_LOG.ldf',  NOUNLOAD,  REPLACE,  STATS = 5
GO

X is my drive letter than I have mapped to for my actual location of the external server at drive F.

When I try this between two server that are either Windows 2003 or windows 2008, this work ok, but when I try between Windows 2003 to Windows 2012 I don't have permission.  I have permission to log on to both boxes and can perform backups and restores locally.  I am an administrator on the box, I also have the abililty to log on as a batch and as a service locally on both boxes.

What additional security would I need to fix this issue.  Our internal NT Admins have not been able to assist.

Thanks for any assistance.

dbmsql

March 6th, 2015 2:53pm

Hello,

Your internal admins should have known that post Windows Server 2008R2, the root of the drives are protected. Don't put databases on the root of drives (this is a BP from even before WS2008R2). If you attempt to do anything to the root of drives you'll need the admin token in your security context (that means you need to explicitly use run as admin).

Create a folder, add the SQL Server Service account to be able to read/write/modify that folder. Restore the databases there.

I don't know exactly what error you are getting as you didn't specify, but stop mounting shared drives. Those are created in the context of the session that creates them and may not work in other sessions, such as the one SQL Server is running in. Instead, restore directly from the shared folder path: \\Server\Sahred_Folder\MyBack.bak as SQL Server 2012 has support for UNC pathing with backup files.

If you're still having issues, please post the exact error message you are receiving.

-Sean

Free Windows Admin Tool Kit Click here and download it now
March 6th, 2015 9:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics