views:

262

answers:

3

SQL Server 2000 on Windows Server 2003.

I am trying to run a backup, from within EM, directly over to another server, as follows:

backup database AbraEmployeeSelfService to disk = '\\servername\f$\Backup\myDB_backup.bak'

I get this error: Cannot open backup device '\\servername\f$\Backup\myDB_backup.bak'. Device error or device off-line. See the SQL Server error log for more details. Msg 3013, Level 16, State 1, Line 1 BACKUP DATABASE is terminating abnormally.

The error log shows this message: BackupDiskFile::CreateMedia: Backup device '\\servername\f$\Backup\myDB_backup.bak' failed to create. Operating system error = 5(Access is denied.).

I am running the command using a windows login that has full rights on the destination path. At least, from my desktop I can open a run window, enter \\servername\f$\Backup, and in the resulting Explorer window I can add/edit/delete files in that directory.

What do I need to do to get past that access denial?

A: 

What user account is the MSSQLSERVER service running under? I believe LocalSystem is restricted and cannot access remote resources.

hunterjrj
+1  A: 

I'm not sure if SO is escaping your destination, but it should read:

'\\servername\f$\Backup\myDB_backup.bak'

(There's two \'s prefixing the server name)

SQL Server will attempt connecting to this network share as the user that SQL Server's service is running as. You might need to run SQL Server as another account that matches an account with priveleges to that destination.

Troubleshooting SQL Server backup and restore dilemmas

Adam
A: 

The double-backslash was chopped to one by SO.

The MSSQLSERVER service is running under LocalSystem. I'll look into getting that changed.

Thank you.

Oliver