I am using Ola's scripts for our database backups, I am trying to come up with a way to be notified if any of the database backup fails. Job completes successfully and logs the errors to text file, Can we get a notification\alert that it found errors.
Sql-server – Job completes successfully and logs the errors to a text file
ola-hallengrensql server
Related Question
- Sql-server – Powershell to dump database schema to text file
- Sql-server – how to add attachment(text file) to database mail
- Transaction Log Backups – Serial or Parallel?
- Sql-server – Xp_delete deletes old backup even when the backup job failed
- Sql-server – Output File Default Location using MultiServer Agent Jobs
- Sql-server – SUSPECT Status Of Databases, but Ola Hallengren backup job completed SUCCESSFULLY
- SQL Server – How to Control Backup File Retention with Ola Hallengren’s DatabaseBackup
- Sql-server – Ola Hallengren scripts: after a job failure, how to skip the databases that worked and backup only the remaining ones
Best Answer
Create a notification for the Job failure. The below email will help you with the steps:
Step 1 : Configure database mail and do a test if thats working fine.
Step 2 : Change Agent properties Under Mail session, select the option to Enable mail profile. Ensure the correct Mail profile is selected.
Step 3 : Create Operator. Under the SQL Server Agent, right-click Operators and select New Operator and configure accordingly.
Step 4 : Under the job properties for the backup, go to Notification tab and select email when the job fails:
Step 4 :
Notification for job failure