SQL Backup failed with exit code: 850

xdaixdai Posts: 98
edited January 11, 2010 11:44AM in SQL Backup Previous Versions
Hi, when I create a backup job which delete prior backup older than 20hours, the job failed, but when i change to 1 day, it is successful, please advice, here is the execute command

EXECUTE master..sqlbackup '-SQL "BACKUP DATABASE [testdb] TO DISK = ''\\xxxx\N$\MSSQL.1\MSSQL\Backup\<AUTO>.sqb'' WITH ERASEFILES_ATSTART = 20H, MAILTO = "test@email.com'', COMPRESSION = 2, THREADCOUNT = 7"', @exitcode OUT, @sqlerrorcode OUT

Comments

  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Thanks for your post. I've copy/ pasted the query from your previous post and tried to run it (more or less). It seems there is a double-quote after the email address as I get this error:
    Syntax error: 'test@email.com'' after '='
  • Here is the command

    EXECUTE master..sqlbackup '-SQL "BACKUP DATABASE [testdb] TO DISK = ''\\server\F$\MSSQL.1\MSSQL\Backup\<AUTO>.sqb'' WITH ERASEFILES_ATSTART = 20H, MAILTO = "test@email.com'', COMPRESSION = 2, THREADCOUNT = 7"'

    the version is 1.2.
Sign In or Register to comment.