1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database...

21
1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs

Transcript of 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database...

Page 1: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

1

Chapter Overview

• Defining Operators

• Creating Jobs

• Configuring Alerts

• Creating a Database Maintenance Plan

• Creating Multiserver Jobs

Page 2: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

2

Notification Methods

• E-mail

• Pager

• NET SEND

Page 3: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

3

Operators

Page 4: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

4

Job Steps

• Three types• Operating system commands

• Transact-SQL statements

• ActiveX scripts

• Each step can contain only one type of job step.

• Each job can contain multiple job steps.

Page 5: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

5

Permissions and Job Ownership

• A job is generally owned by the creator, but it can be assigned to another user.

• Jobs operate in the security context of the job owner, not in the security context of the user executing the job.

• By default, only sysadmins can execute operating system and ActiveX job steps.

• Non-sysadmins can be given permission to run operating system and ActiveX job steps in the security context of a defined proxy account.

Page 6: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

6

Multiple Job Steps and Job Responses

Page 7: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

7

Job Scheduling

Page 8: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

8

Job Creation

• Using the Create Job wizard

• Creating directly in SQL Server Enterprise Manager

• Using Transact-SQL

Page 9: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

9

Proxy Account

• Click on the General tab for the SQL Server Agent Properties dialog box.

• Enable non-sysadmins to execute operating system and ActiveX scripting jobs.

• Define a local or domain user account.

Page 10: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

10

Job Information and History

• View status of jobs in the details pane for the Jobs container.

• View the properties of a job to review or modify it.

• View the job history log for a job to review its execution history.

• Manage the job history log size as a property of the SQL Server Agent service.

• Use the SQL Server Agent error log to view error information.

Page 11: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

11

Error Detection Alerts

Page 12: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

12

Performance Condition Alerts

Page 13: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

13

Alert Creation

• Using the Create Alert wizard

• Creating directly in SQL Server Enterprise Manager

• Using Transact-SQL

• Using user-defined error messages

Page 14: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

14

Alert Information and History

• View status of alerts in the details pane for Alerts container.

• Refresh Alerts container to view most recent alert information.

• When troubleshooting, verify that an alert is enabled.

• View the properties of an alert to review or modify it.

Page 15: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

15

Database Maintenance Plan Wizard

• Rebuild indexes, and update distributions statistics.

• Automatically shrink a database.

• Perform DBCC consistency checks.

• Back up database and transaction log files.

• Configure log shipping.

Page 16: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

16

Maintenance Plan Information and History

• View status of maintenance plans in the details pane.

• Refresh the Database Maintenance Plan container.

• When troubleshooting, verify that the maintenance plan is enabled.

• View the history log of a maintenance plan, including each component.

• View the properties of a maintenance plan.

Page 17: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

17

Multiserver Job Architecture

Page 18: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

18

Master and Target Server Creation

• Select a server that can handle the performance hit for the master.

• Configure it as the master, and designate an MSXOperator.

• Enlist target servers–they must be registered with SQL Server Enterprise Manager.

Page 19: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

19

Job Creation for Target Servers

• Use same process as for creating local jobs, but designate target servers.

• Jobs are downloaded by target servers as read-only jobs.

• Database and file system paths must be valid on each target server.

Page 20: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

20

Target Server Information and Job History

• View the status of a target server, including pending instructions.

• Force download of instructions immediately.

• Start jobs on target servers, change polling interval, or synchronize clocks.

• View information by server or by target job.

• View job history log on any target server.

Page 21: 1 Chapter Overview Defining Operators Creating Jobs Configuring Alerts Creating a Database Maintenance Plan Creating Multiserver Jobs.

21

Chapter Summary

• Define users and groups to act as operators.

• Create simple or complex jobs to perform tasks, and specify notifications.

• Define event and performance condition alerts, and specify notifications and jobs.

• Use Database Maintenance Plan wizard to automate tasks.

• Create multiserver jobs to centrally manage jobs.