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

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 restore from netwrok disk access denied

Author  Topic 

Hommer
Aged Yak Warrior

808 Posts

Posted - 2014-01-21 : 17:01:43
Hi,

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?

Thanks!

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2014-01-22 : 05:33:00
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.


Duane.
Go to Top of Page

Hommer
Aged Yak Warrior

808 Posts

Posted - 2014-01-22 : 09:06:22
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
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2014-01-23 : 11:12:41
Do you have the SPN registered? See http://msdn.microsoft.com/en-us/library/ms191153.aspx#Manual 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

Hommer
Aged Yak Warrior

808 Posts

Posted - 2014-01-28 : 14:43:50
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?

Thanks!
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2014-01-28 : 15:13:30
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

Hommer
Aged Yak Warrior

808 Posts

Posted - 2014-01-28 : 16:15:53
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
Go to Top of Page

ovc
Starting Member

35 Posts

Posted - 2014-02-01 : 15:38:24
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
   

- Advertisement -