17.07.2015 Views

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

Download eBook (PDF) - Red Gate Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

9 – Honeycombing a Databaseto 127. This value is determined by adding the assigned values of thedays available. These assigned values are: Sunday (1), Monday (2),Tuesday (4), Wednesday (8), Thursday (16), Friday (32) and Saturday(64). For example: if an Operator is only available on Monday,Wednesday and Friday, this value would be 42 (2+8+32).• Netsend Address – the network address to which a notification isto be sent. This argument is only necessary when notifying through netsend.• Category – the category of the Operator. This argument is optional.Listing 9-6 shows how to create an operator for the DBA, called DBA1, in themsdb database. Of course, our intrepid DBA is always on call and so they areavailable everyday at all hours. Not that long ago, the DBA would have a pagerstrapped to them to receive very basic notifications. These days the availabilityof email, along with the multi-functional benefits of the cell phone, provide ameans to receive a detailed email message quickly; therefore, the notification inour example will be sent via email.USE msdb;GOEXEC msdb.dbo.sp_add_operator @name=N'DBA1',@enabled=1,@weekday_pager_start_time=0,@weekday_pager_end_time=235959,@saturday_pager_start_time=0,@saturday_pager_end_time=235959,@sunday_pager_start_time=0,@sunday_pager_end_time=235959,@pager_days=127,@email_address=N'DBA1@homelending.com';GOListing 9-6: Creating an operator to receive notifications195

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

Saved successfully!

Ooh no, something went wrong!