Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 restore from netwrok disk access denied
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Aged Yak Warrior

808 Posts

Posted - 01/21/2014 :  17:01:43  Show Profile  Reply with Quote

I tried to run next restore db from db01 ssms, but it failed. I want to restore these sharepoint dbs from db02 to db01. Both of these servers are on the same domain, and run under NT Service\MSSQLSERVER.

I could see these files inside windows explorer. And I also added MSSQLSERVICE account into db02\D folder permission list.

Restore database
WSS_Content_1 from Disk = '\\db02\D$\SharePointBackups\WSS_Content_1\WSS_Content_1_backup_2014_01_21_013003_7970114.bak'

Msg 3201, Level 16, State 2, Line 1
Cannot open backup device '\\db02\D$\SharePointBackups\WSS_Content_1\WSS_Content_1_backup_2014_01_21_013003_7970114.bak'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

What else should I check?


Flowing Fount of Yak Knowledge

South Africa
1466 Posts

Posted - 01/22/2014 :  05:33:00  Show Profile  Visit ditch's Homepage  Reply with Quote
Did you try restoring from SSMS and then scripting the task (using the script icon in the top left corner of the restore database window) and comparing that to your code ?
Your server might be seeing the network share differently to how you do.


Edited by - ditch on 01/22/2014 05:42:52
Go to Top of Page

Aged Yak Warrior

808 Posts

Posted - 01/22/2014 :  09:06:22  Show Profile  Reply with Quote
No, I did not get my script that way. I have modified a saved one from other 2008 mirroring restore.
Go to Top of Page

Bustaz Kool
Flowing Fount of Yak Knowledge

1834 Posts

Posted - 01/23/2014 :  11:12:41  Show Profile  Reply with Quote
Do you have the SPN registered? See for details how how to examine and set this.

A man is not old until regrets take the place of dreams. - John Barrymore
Go to Top of Page

Aged Yak Warrior

808 Posts

Posted - 01/28/2014 :  14:43:50  Show Profile  Reply with Quote
While I am getting by the above issue by manually copy these files for now, I run into another issue that may be the other side of the same coin.

I cannot connect to 2nd 2012 sql server (db02) through 1st(db01) SSMS using my windows account.

I can remote into either, but not from one to the other. The server was not found or was not accessible. Named Pipes Provider, error 40-...Access is denied.

We have other sql 2008 win 2003 servers on the same domain, where I can cross connect.

where should I check?

Go to Top of Page

Aged Yak Warrior

819 Posts

Posted - 01/28/2014 :  15:13:30  Show Profile  Reply with Quote
The service account: NT SERVICE\MSSQLSERVER is a service SID. The actual service account will be the account running the service which should be a domain user. That domain user will need access to the file share in order to be able to read from that share.

By default, SQL Server does not add the BUILTIN\Administrators anymore - so you need to add your windows account specifically in order to get access.
Go to Top of Page

Aged Yak Warrior

808 Posts

Posted - 01/28/2014 :  16:15:53  Show Profile  Reply with Quote
Ok, I have solved the 2nd part. it is not related to first part.

One of the server has named pipes disabled. After enable it, I was able to connect.

however, the first problem remains. That is, I can browse to the backup file folder on the network ('\\db01\h$\backup\') from within window explorer on db02. But the command running from db02 ssms got access denied:

restore database
dbname from disk ='\\db01\h$\backup\backupfile.bak'
Go to Top of Page

Starting Member

35 Posts

Posted - 02/01/2014 :  15:38:24  Show Profile  Reply with Quote
If you use a Windows Login, please check:
1. has the windows account used as a login read permissions on the share? (i would also try to create a share and not access the disk directly through the share - i am not sure if this is might place a role)
2. log on from Management Studio LOCALLY where you want to restore the database and restore it from there

If this works, than you have the classical double hop issue which can be fixed by setting the SPNs for the SQL Server instance and set delegation permissions in Active Directory to the SQL Service Account
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000