How can we help you today? How can we help you today?

SQL Backup failed with exit code: 850

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
xdai
0

Comments

2 comments

  • Brian Donahue
    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 '='
    Brian Donahue
    0
  • xdai
    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.
    xdai
    0

Add comment

Please sign in to leave a comment.