7 Automating Administrative Tasks with Jobs and Alerts

(Part of a series of SQL Server 2012 training course notes. Previous | Contents | Next)

These are displayed under the “SQL Server Agent” tree in SQL Server Management Studio.

For alerts, there are predefined errors , e.g. Error 9002 – Transaction Log Full. User defined errors can be added – these must have error numbers greater than 50000.

Alerts can be emailed, although this feature is disabled by default, see section 3.4 above for details.

Jobs can be multiserver – in that case one SQL Server is the controlling master server and executes the job on a number of target servers.

Note that the SQL Server Agent service must be running for jobs and alerts to execute automatically.

Right click on a job and select “View History” to see outcome of previous runs of the job. Note that you need to click on the + symbol to see details for the job steps – easy to miss.

Jobs can be started immediately by right clicking the job and selecting “Start job at step”.

Long running operations, like restores of large databases, may be better run through a job than direct in GUI.

Lab 7 – Create jobs and alerts.

(Part of a series of SQL Server 2012 training course notes. Previous | Contents | Next)

Leave a Reply

Your email address will not be published. Required fields are marked *

*