Stairway to SQL Server Agent
SQL Server Agent is at the heart of any live database system. The Agent has a number of uses which aren't always obvious, and so a knowledge of the system is always useful, to developers as well as DBAs. Richard Waymire provides a simple explanation of its many uses.
- SQL Server Agent is a Microsoft Windows service that allows a DBA to automate administrative tasks. SQL Server Agent can run jobs, monitor SQL Server, and process alerts. The SQL Server Agent service must be running before any jobs scheduled to execute automatically can be run
- SQL Server Agent jobs are made up of a series of one or more Job Steps. A job step is assigned to a specific job subsystem, which identifies the kind of work the job step is going to perform. Each job step runs in a separate security context, although each job also has an owner that determines who can modify the job.
- How to be notified when a job succeeds or fails, or be notified when a SQL Server performance condition is met.
- Examines the database mail system configuration in depth. You will learn how to configure database mail to work with SMTP mail systems, and get some troubleshooting tips.
- How to interpret and configure the SQL Server Agent error logs. Critical information about SQL Server Agent is sent to this error log, so knowing how to find it and how to interpret information in the log will save you valuable troubleshooting time.
- How to configure and optimize job steps. Topics such as process flow between steps, security, and more details of the job subsystems are examined.
- The Job Activity Monitor is the system administration tool to run jobs, view job history, and enable/disable jobs. This article will also review some of the stored procedures run by the Job Activity Monitor that you can also use directly to do your own custom job monitoring.
- One common usage of SQL Server Agent historically has been the ability to shell out to the operating system and run command line programs, using SQL Server Agent primarily as a job scheduler. This article will examine the pros and cons of using the SQL Server 2008 & 2008 R2 Powershell subsystem versus the CmdExec subsystem to perform tasks in the Operating System.
- Security is a confusing topic to many, especially when it comes to understanding what rights are needed to monitor and use SQL Server Agent. This article will examine the rights and roles used for SQL Server Agent, as well as the security context requirements for jobs.
- Examines the proxy subsystem, which allows job steps to impersonate another user account in order to perform tasks as a user other than the SQL Server Agent service account. This is especially useful when you want jobs to run as lower privileged users of your SQL Server.
- How maintenance plans are used as SQL Server Agent jobs to automate standard system tasks. This article will also lay out some suggested jobs that should be on virtually all SQL Server systems.
- Examines the scale-out capabilities of SQL Server Agent, using the MSX/TSX subsystem. This capability allows you to run jobs on multiple systems and consolidate the job results/history onto a single server.