SQL Server Agent Service

SQL Server Setup Help

SQL Server Setup Help

SQL Server Agent Service

SQL Server Agent supports features allowing the scheduling of periodic activities on Microsoft® SQL Server™ 2000, or the notification to system administrators of problems that have occurred with the server. The SQL Server Agent components that implement this capability are:

  • Jobs

    Defined objects consisting of one or more steps to be performed. The steps are Transact-SQL statements that can be executed. Jobs can be scheduled, for example, to execute at specific times or recurring intervals.

  • Alerts

    Actions to be taken when specific events occur, such as a specific error, errors of certain severities, or a database reaching a defined limit of free space available. The alert can be defined to take such actions as sending an e-mail, paging an operator, or running a job to address the problem.

  • Operators

    People identified through their network account or e-mail identifier (ID) who can address problems with the server. They can be the targets of alerts, either through e-mail, a pager, or a net send network command.

The service name of SQLServerAgent applies only to the Agent service associated with a default instance. SQL Server Agent services associated with named instances are named SQLAgent$InstanceName.

Managing Scheduled Operations

The illustration shows the primary components that are used in the definition and operation of jobs, alerts, and operators.

  • Jobs, alerts, and operators are specified using:
    • SQL Server Enterprise Manager.

    • Applications that use SQL Distributed Management Objects (SQL-DMO).

    • Applications that use Transact-SQL and a standard database API.
  • The definitions are stored by SQL Server in the msdb system database.

  • When the SQLServerAgent service is started, it queries the system tables in the msdb database to determine what jobs and alerts to enable.

  • SQL Server Agent executes jobs at their scheduled time.

  • SQL Server passes any events that occur to the SQL Server Agent.

  • SQL Server Agent executes any alerts, or sends SQL Mail requests to SQL Server, or sends net send commands to Windows.

SQL Server 2000 is more highly automated than SQL Server version 6.5 and earlier, and more efficiently tunes itself to meet processing demands. These features lower the potential for exception conditions that would trigger alerts. Scheduled jobs remain a good feature for implementing recurring tasks such as backup procedures.

See Also

Automating Administrative Tasks