IT tutorials
 
Database
 

Protecting SQL Server Data : HONEYCOMBING A DATABASE - Creating an Operator for Notification

6/8/2013 7:41:06 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

The first step in creating a SQL Server alert is to create an Operator. An Operator is the person, or people, who will receive an alert when one is raised. We create an operator by executing the sp_add_operator system stored procedure in Management Studio. The following is an example of the syntax of this system stored procedure:

sp_add_operator [Operator Name],[Enabled],
                [Email Address],[Pager Address],
                [Weekday Pager Start],[Weekday Pager End],
                [Saturday Pager Start],[Saturday Pager End],
                [Sunday Pager Start],[Sunday Pager End],
                [Available Pager Days],[Netsend Address],
                [Category]

This system stored procedure's arguments are as follows:

  • Operator Name – the textual reference to the Operator.

  • Enabled– indicates whether the Operator can receive notifications.

  • Email Address – the e-mail address to which notifications are sent for this Operator. This argument is only necessary when notifying through e-mail.

  • Pager Address – all pager notifications are sent through the e-mail system. The value of this argument will need to be the e-mail account of the pager that will receive notifications. This argument is only necessary when notifying through a pager.

  • Weekday Pager Start/End – the time of day during the weekday that notifications can be received. The value must be in the format of HHMMSS (Hour, Minute, Second). 0 indicates midnight. Despite this argument having the word "Pager" in it, it applies to e-mail notifications as well. This argument is only necessary when the Operator is active on weekdays.

  • Saturday Pager Start/End– the time of day on Saturday that notifications can be received. This argument is only necessary when the Operator is active on Saturdays.

  • Sunday Pager Start/End– the time of day on Sunday that notifications can be received. This argument is only necessary when the Operator is active on Sundays.

  • Available Pager Days– this indicates the days on which the Operator is available to receive notifications. This value ranges from 0 to 127. This value is determined by adding the assigned values of the days 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 is to be sent. This argument is only necessary when notifying through net send.

  • Category – the category of the Operator. This argument is optional.

Listing 1 shows how to create an operator for the DBA, called DBA1, in the msdb database. Of course, our intrepid DBA is always on call and so they are available everyday at all hours. Not that long ago, the DBA would have a pager strapped to them to receive very basic notifications. These days the availability of email, along with the multi-functional benefits of the cell phone, provide a means to receive a detailed email message quickly; therefore, the notification in our example will be sent via email.

Listing 1. Creating an operator to receive notifications.
 
Others
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us