no error returned while the backup is not done
we use sql backup on several servers. we configure the job to send an mail for when the backup hasn't been done properly. the mailing etc works fine.
we had a job running which made it's backup properly until it stopped 2 days. although we configured to receive an email with problems we didn't receive an warning. lucky enough we have an extra monitoring tool that alerts us if a database has not been backupped for more than 2 days (which means i already miss 2 backups). i was not happy the sqlbackup didn't do it's backup without us informing of it. also it didn't put the job in failed status.
i did have a look at it and the cause was quickly found when i used the job inside query analyzer:
master..sqlbackup '-SQL "BACKUP DATABASE [database] TO DISK = ''d:\somewhere\database\<AUTO>'' WITH NAME = ''Database(database)'', DESCRIPTION = ''Backup Database: database Server: SOMESERVER'', INIT, PASSWORD = ''<ENCRYPTEDPASSWORD>**removed**==</ENCRYPTEDPASSWORD>'', VERIFY, KEYSIZE = 256, ERASEFILES = 1h, MAILTO_ONERROR = ''[email protected]'', COMPRESSION = 2"'
(i did edit the databasename, emailaddress and password)
(this job is the only statement and only job step)
the result is:
SQL Backup v184.108.40.2064
Trial has expired.
(1 row(s) affected)
(2 row(s) affected)
so i know how to solve it.
now the question:
can you change the behaviour that if a backup had not been made for some reason (and i mean for whatever reason) it wil do 2 things:
1 put the job on failure status
2 mail the information using the supplied email address
also my collegue noticed a different cause where we weren't informed that sql backup didn't do its backupjob either:
we have installed most of our servers in a standard way. which means backups are placed on F:. This server didn't have an F: and the backups should have been done on E:
my collegue noticed that if you configure the backupjob to use a drive that does not exist we dont receive a mail and also no job failure status (the job didn't do it's backup off course)
(i checked the knowledge base and found one article but that was meant for calling from stored procedures)