Relational Database ServiceRelational Database Service

Compute
Elastic Cloud Server
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
Domain Name Service
VPC Endpoint
Cloud Connect
Enterprise Switch
Security & Compliance
Anti-DDoS
Web Application Firewall
Host Security Service
Data Encryption Workshop
Database Security Service
Advanced Anti-DDoS
Data Security Center
Container Guard Service
Situation Awareness
Managed Threat Detection
Compass
Cloud Certificate Manager
Anti-DDoS Service
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GaussDB NoSQL
GaussDB(for MySQL)
Distributed Database Middleware
GaussDB(for openGauss)
Developer Services
ServiceStage
Distributed Cache Service
Simple Message Notification
Application Performance Management
Application Operations Management
Blockchain
API Gateway
Cloud Performance Test Service
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
DevCloud
ProjectMan
CodeHub
CloudRelease
CloudPipeline
CloudBuild
CloudDeploy
Cloud Communications
Message & SMS
Cloud Ecosystem
Marketplace
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP License Service
Support Plans
Customer Operation Capabilities
Partner Support Plans
Professional Services
enterprise-collaboration
Meeting
IoT
IoT
Intelligent EdgeFabric
DeveloperTools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Updated at: Apr 02, 2022 GMT+08:00

Updating Information About Operators for Alerts and Jobs

Scenarios

You can use a stored procedure to update information about an operator (notification recipient) for use with alerts and jobs.

Prerequisites

An RDS Microsoft SQL Server DB instance has been connected. Connect to the DB instance through the Microsoft SQL Server client. For details, see Connecting to a DB Instance Through a Public Network.

Procedure

Run the following commands to update information about the operator for the alert and job:

EXEC [msdb].[dbo].[rds_update_operator]

@name ='name',

@new_name = 'new_name',

@enabled=enabled,

@email_address='email_address',

@pager_address= 'pager_number',

@weekday_pager_start_time= weekday_pager_start_time,

@weekday_pager_end_time= weekday_pager_end_time,

@saturday_pager_start_time= saturday_pager_start_time,

@saturday_pager_end_time= saturday_pager_end_time,

@sunday_pager_start_time= sunday_pager_start_time,

@sunday_pager_end_time= sunday_pager_end_time,

@pager_days= pager_days,

@netsend_address ='netsend_address',

@category_name='category'

Table 1 Parameter description

Parameter

Description

'name'

The name of the operator to modify. This name must be unique and cannot contain the percent (%) character. name is sysname, with no default.

'new_name'

The new name for the operator. This name must be unique. new_name is sysname, with a default of NULL.

enabled

The current status of the operator. enabled is tinyint, with a default of 1 (enabled). If the value is 0, the operator is not enabled and does not receive notifications.

'email_address'

The e-mail address of the operator. This string is passed directly to the e-mail system. email_address is nvarchar(100), with a default of NULL.

'pager_number'

The pager address of the operator. This string is passed directly to the e-mail system. pager_number is nvarchar(100), with a default of NULL.

weekday_pager_start_time

The time after which SQL Server Agent sends pager notification to the specified operator on the weekdays, from Monday through Friday. weekday_pager_start_time is int, with a default of 090000, which indicates 9:00 A.M. on a 24-hour clock, and must be entered using the form HHMMSS.

weekday_pager_end_time

The time after which SQLServerAgent service no longer sends pager notification to the specified operator on the weekdays, from Monday through Friday. weekday_pager_end_time is int, with a default of 180000, which indicates 6:00 P.M. on a 24-hour clock, and must be entered using the form HHMMSS.

saturday_pager_start_time

The time after which SQLServerAgent service sends pager notification to the specified operator on Saturdays. saturday_pager_start_time is int, with a default of 090000, which indicates 9:00 A.M. on a 24-hour clock, and must be entered using the form HHMMSS.

saturday_pager_end_time

The time after which SQLServerAgent service no longer sends pager notification to the specified operator on Saturdays. saturday_pager_end_time is int, with a default of 180000, which indicates 6:00 P.M. on a 24-hour clock, and must be entered using the form HHMMSS.

sunday_pager_start_time

The time after which SQLServerAgent service sends pager notification to the specified operator on Sundays. sunday_pager_start_time is int, with a default of 090000, which indicates 9:00 A.M. on a 24-hour clock, and must be entered using the form HHMMSS.

sunday_pager_end_time

The time after which SQLServerAgent service no longer sends pager notification to the specified operator on Sundays. sunday_pager_end_time is int, with a default of 180000, which indicates 6:00 P.M. on a 24-hour clock, and must be entered using the form HHMMSS.

pager_days

A number that indicates the days that the operator is available for pages (subject to the specified start/end times). pager_days is tinyint, with a default of 0, indicating the operator is never available to receive a page. Valid values are from 0 through 127. pager_days is calculated by adding the individual values for the required days. For example, from Monday through Friday is 2+4+8+16+32 = 62. The following lists the value for each day of the week:

  • 1: indicates Sunday.
  • 2: indicates Monday.
  • 4: indicates Tuesday.
  • 8: indicates Wednesday.
  • 16: indicates Thursday.
  • 32: indicates Friday.
  • 64: indicates Saturday.

'netsend_address'

The network address of the operator to whom the network message is sent. netsend_address is nvarchar(100), with a default of NULL.

'category'

The name of the category for this operator. category is sysname, with a default of NULL.

After the command is executed, the system displays the following information.

Commands completed successfully.

Did you find this page helpful?

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel