March 29, 2004 at 4:05 am
Hi All,
Is any way to take a backup on on Network drive?. If any body know give me the full details how to do this.
Biju
March 29, 2004 at 8:01 am
You can create a backup device to a netword drive, like this:
exec addumpdevice 'DISK', 'NetBkp', '\\ServerName\d$\Directory\File.bkp'
And then execute directly the backup to that device:
Backup Database DBNAme TO NetBkp
Or can just backup directly to it
Backup Database DBNAme TO DISK = '\\ServerName\d$\Directory\File.bkp'
You can also map the netword drive from SQL and then execute the backup.
EXEC master.dbo.xp_cmdshell 'NET USE F: \\ServerName\d$\Directory\ /User:WinUser Password'
GO
BACKUP DATABASE DBName TO DISK = 'F:\File.bkp'
GO
EXEC master.dbo.xp_cmdshell 'NET USE F: /delete'
March 30, 2004 at 8:00 am
In order to backup to a network drive, your SQL server must be started using a domain account that can "see" your network resources.
By default many folks just select "Local System Account" to run the SQL Server service. However, the Local System Account cannot access anything outside of the server.
You would specify this account in the Admin Tools ->Services section.
Once the SQL service is running as a domain account, you can direct your backups to either mapped network drives (F:\), or using the UNC convention (\\ServerName\...)
For more info see "Local System Account" in BOL.
March 30, 2004 at 3:17 pm
I don't think you can map a network drive from a service! Mapped drives info is strored at profile level which by the way services are not aware of. That is why MS recomends the use of UNC
HTH
* Noel
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply