March 24, 2003 at 9:40 am
Anyone know of a way to 'Restore' a "BAK" FILE from a network share... via UNC path? I can create a backup to the UNC, but no luck on restoring it.
March 24, 2003 at 9:44 am
Have you tried specifying where to move the database files to? Otherwise I would expect the problem to that SQL Server does not have rights to read the backup files.
--
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
March 24, 2003 at 10:30 am
What you have to do is map the network location within SQL server. If you map it from windows (DOS), SQL server doens't recognize the mapping so it won't see it. You must execute:
exec master.dbo.xp_cmshell 'NET USE G: \\UNCPath\d$ /user:domain\user password'
GO
Resotre Database DBName FROM Disk = 'G:\PAth to bak'
GO
EXEC master.dbo.xp_cmdshell 'NET USE G: /DELETE'
March 24, 2003 at 10:40 am
You can also do this in Windows if you are logged in as the account that starts SQL Server (need to restart SQL Server to see it).
Steve Jones
March 24, 2003 at 12:26 pm
Jeff, I'll paste your email response to me here so that others can follow the discussion:
quote:
So if this was a bak file that was created from an SQL server that I did not have permissions to, I would not be able "see" the bak file from the local SQL server I am trying to restore it to?
Yes, the local SQL Server that you are trying to restore the backup to must be able to see (i.e. read) the backup. This means that the account that SQL Server is running as (see Steve's post) must have appropriate permissions on the network to access the UNC share. Mapping it to a local drive letter should not be necessary though as far as know.
--
Chris Hedgate @ Apptus Technologies (http://www.apptus.se)
January 6, 2005 at 8:48 am
RESTORE DATABASE northwind FROM DISK = '\\SERVERNAME\SHARENAME\NWIND.BAK'
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply