17.06.2013 Views

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

Beginning Microsoft SQL Server 2008 ... - S3 Tech Training

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 19: Playing Administrator<br />

You can then fill out a schedule indicating what times this operator is to receive e-mail notifications for<br />

certain kinds of errors that you’ll see on the Notifications tab.<br />

Speaking of that Notifications tab, go ahead and click over to that tab. It should appear as in Figure 19-2.<br />

Figure 19-2<br />

Until you have more alerts in your system (we’ll get to those later in this chapter), this page may not<br />

make a lot of sense. What it is about is setting up which notifications you want this operator to receive<br />

depending on which defined alerts get triggered. Again, hard to understand this concept before we’ve<br />

gotten to alerts, but suffice to say that alerts are triggered when certain things happen in your database,<br />

and this page defines which alerts this particular operator receives.<br />

Creating Jobs and Tasks<br />

566<br />

As I mentioned earlier, jobs are a collection of one or more tasks. A task is a logical unit of work, such as backing<br />

up one database or running a T-<strong>SQL</strong> script to meet a specific need such as rebuilding all your indexes.<br />

Even though a job can contain several tasks, this is no guarantee that every task in a job will run. They will<br />

either run or not run depending on the success or failure of other tasks in the job and what you’ve defined<br />

to be the response for each case of success or failure. For example, you might cancel the remainder of the<br />

job if one of the tasks fails.<br />

Just like operators, jobs can be created in Management Studio as well as through programmatic constructs.<br />

For purposes of this book, we’ll stick to the Management Studio method. (Even among highly<br />

advanced <strong>SQL</strong> <strong>Server</strong> developers, programmatic construction of jobs and tasks is very rare indeed.)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!