1

Resolved

Trouble using network share as backup device

description

I am trying to specify a remote network share as my backup location, but am having difficulty.
 
This command line...

 

ExpressMaint -S .\<instance name> -D BACKUP_THIS_DB -T DB -R . -RU WEEKS -RV 1 -B "\servername\folder\DBBackups" -BU DAYS -BV 1 -DS -V

 
...results in the following error...

 

Expressmaint utility v1.4 , Logged on to SQL Server [servername\instancename] as [domain\user]
Created by Jasper Smith (www.sqldbatips.com)
 
Starting backup on 1/18/2008 5:14:12 PM
 
[1] Database BACKUP_THIS_DB: Backup starting at 1/18/2008 5:14:14 PM
An exception occurred while executing a Transact-SQL statement or batch.
Cannot open backup device '\\servername\folder\DBBackups\BACKUP_THIS_DB\20080118_1714_BACKUP_THIS_DB_FullBackup.bak'. Operating system error 5(Access is denied.).
BACKUP DATABASE is terminating abnormally.
Backup failed for Server 'servername\instancename'. 
An exception occurred while executing a Transact-SQL statement or batch.
Cannot open backup device '\\servername\folder\DBBackups\BACKUP_THIS_DB\20080118_1714_BACKUP_THIS_DB_FullBackup.bak'. Operating system error 5(Access is denied.).
BACKUP DATABASE is terminating abnormally.
 
 

Expressmaint finished unsuccessfully at 1/18/2008 5:14:14 PM with Return Code(-5)

 
I've tried mapping \servername\folder\DBBackups\ to z: which changed the command line to...

 

ExpressMaint -S .\<instance name> -D BACKUP_THIS_DB -T DB -R . -RU WEEKS -RV 1 -B z: -BU DAYS -BV 1 -DS -V

 
...and that fails for a different reason...

 

Expressmaint utility v1.4 , Logged on to SQL Server [servername\instancename] as [server\instance]
Created by Jasper Smith (www.sqldbatips.com)
 
Starting backup on 1/18/2008 5:12:44 PM
 
[1] Database BACKUP_THIS_DB: Backup starting at 1/18/2008 5:12:46 PM
An exception occurred while executing a Transact-SQL statement or batch.
Cannot open backup device 'z:\BACKUP_THIS_DB\20080118_1712_BACKUP_THIS_DB_FullBackup.bak'. Operating system error 3(The system cannot find the path specified.).
BACKUP DATABASE is terminating abnormally.
Backup failed for Server 'servername\instancename'. 
An exception occurred while executing a Transact-SQL statement or batch.
Cannot open backup device 'z:\BACKUP_THIS_DB\20080118_1712_BACKUP_THIS_DB_FullBackup.bak'. Operating system error 3(The system cannot find the path specified.).
BACKUP DATABASE is terminating abnormally.
 
 

Expressmaint finished unsuccessfully at 1/18/2008 5:12:46 PM with Return Code(-5)

 
Any ideas?

comments

jaspersmith wrote Jul 4, 2008 at 11:55 AM

You need to make sure that the SQL Server service account for the instance that you are backing up has read and write permissions to the backup share as well as the account used to run the utility. The backup itself will be created using the SQL Service account.