O'Reilly logo

Microsoft® SQL Server® 2008 Bible by Uttam Parui, Mike White, Paul Nielsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 43. Automating Database Maintenance with SQL Server Agent

IN THIS CHAPTER

  • Setting up SQL Server Agent

  • Understanding alerts, operators, and jobs

  • Managing alerts

  • Managing operators

  • Managing jobs

  • Setting up Database Mail

The automation of database maintenance is crucial to ensuring that a database is regularly checked, maintained, and optimized. Automated checking consists of monitoring database size to identify issues before they generate mayhem; maintenance includes frequent backups; and optimization involves tweaking the index configuration for optimal performance. Automation ensures that these activities do not consume too much of your time, so you can focus on more pressing issues (such as improving your golf game, perhaps).

Ideally, SQL Server can monitor itself and send alerts when it encounters a critical condition. Luckily Microsoft grants this specific wish, because SQL Server includes a powerful component that can send alerts when specific critical conditions occur. Better still, this same component also enables the scheduling of routine maintenance tasks either on a one-time basis or on a recurring basis—for example, once a month or, say, on the first Saturday of every month. SQL Server Agent is the service responsible for processing alerts and running scheduled jobs.

Note

SQL Server Agent service is not available in SQL Server Express Edition, for which scheduling of jobs has to be done using Windows Scheduler. For more information on Windows Scheduler, search the web, using ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required