Marked
Marked

Reputation: 162

Back-up of SQL Server Database to network writable location fails

I want to make a backup of SQL Sever database. Using sqlcmd I am able to direct output to a shared folder on my local machine. I can make a back-up to a location on the server but I cannot direct the back-up file to the location on my local machine (shared folder). That is in sqlcmd:

BACKUP DATABASE <dbname> TO DISK 'c:\Temp\dbname.bak';
Go

works

:out \\path\to\shared\location\msg.out
SELECT 1;

also works and creates a file with the select's output.

BACKUP DATABASE <dbname> TO DISK = '\\path\to\shared\location\db.bak';

Fails with:

Cannot open backup device '\path\to\shared\location\db.bak'. Operating system error 53(The network path was not found.). Msg 3013, Level 16, State 1, Server <xxxx\xxxx>, Line 1

Any idea why the backup fails?

Upvotes: 0

Views: 230

Answers (0)

Related Questions