SQL Backup failed with exit code: 850
xdai
Posts: 98
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
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
Syntax error: 'test@email.com'' after '='
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.