Home Database Mysql Tutorial SQL server 警报类型

SQL server 警报类型

Jun 07, 2016 pm 05:20 PM
sql server

SQL Server 代理仅在特定数据库中发生事件时才发出警报。 此选项是对错误号或严重级别的补充。 例如,如果实例中包含一个用于生产

一个警报响应一种特定的事件。 警报响应下列事件类型:

1.SQL Server 事件:

可以指定一个警报响应一个或多个事件。 使用下列参数来指定触发警报的事件:

错误号

SQL Server 代理在发生特定错误时发出警报。 例如,,可以指定错误号 2571 来响应未经授权就尝试调用数据库控制台命令 (DBCC) 的操作。

严重级别

SQL Server 代理在发生特定级别的严重错误时发出警报。 例如,可以指定严重级别 15 来响应 Transact-SQL 语句中的语法错误。

数据库

SQL Server 代理仅在特定数据库中发生事件时才发出警报。 此选项是对错误号或严重级别的补充。 例如,如果实例中包含一个用于生产的数据库和一个用于报告的数据库,可以定义仅响应生产数据库中的语法错误的警报。

事件文本

SQL Server 代理在指定事件的事件消息中包含特定文本字符串时发出警报。 例如,可以定义警报来响应包含特定表名或特定约束的消息。

2.SQL Server 性能条件

可以指定警报来响应特定的性能条件。 在这种情况下,需要指定要监视的性能计数器、警报的阈值以及警报发生时计数器必须执行的操作。 若要设置性能条件,必须在 SQL Server 代理的“新建警报”或“警报属性”对话框中的“常规”页上定义下列项:

对象

对象是要监视的性能区域。

计数器

计数器是要监视的区域的属性。

实例

SQL Server 实例定义了要监视的属性的特定实例(如果存在)。

“计数器满足以下条件时触发警报”和“值”

警报的阈值和导致警报的行为。 阈值是数字。 行为是下列之一:“低于”、“等于”或“大于”指定的值。 “值”是描述性能条件计数器的数字。 例如,若要为性能对象 SQLServer:Locks 设置在 Lock Wait Time 超过 30 秒时要发生的警报,则可以选择“大于”并指定 30 作为“值”。

又如,可以为性能对象 SQLServer:Transactions 指定在 tempdb 中的可用空间低于 1000 KB 时发出警报。 若要这样设置,您应当选择计数器 Free space in tempdb (KB)、“小于”和“值”1000。

3.WMI 事件

可以指定发出警报来响应特定的 WMI 事件。 若要选择 WMI 事件,必须在 SQL Server 代理的“新建警报”或“警报属性”对话框中的“常规”页上定义下列内容:

命名空间

SQL Server 代理作为 WMI 客户端在 WMI 命名空间(使用该命名空间查询事件)进行注册。

查询

SQL Server 代理使用所提供的 Windows Management Instrumentation 查询语言 (WQL) 语句来标识特定事件。

下列链接指向常见的任务:

基于消息号创建警报

SQL Server Management Studio

Transact-SQL

SQL Server 管理对象 (SMO)

基于严重级别创建警报

SQL Server Management Studio

Transact-SQL

SQL Server 管理对象 (SMO)

基于 WMI 事件创建警报

SQL Server Management Studio

Transact-SQL

SQL Server 管理对象 (SMO)

定义对警报的响应

SQL Server Management Studio

Transact-SQL

SQL Server 管理对象 (SMO)

创建用户定义事件的错误消息

Transact-SQL

修改用户定义事件的错误消息

Transact-SQL

删除用户定义事件的错误消息

Transact-SQL

禁用或重新激活警报

SQL Server Management Studio

Transact-SQL

SQL Server 管理对象 (SMO)

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What software is microsoft sql server? What software is microsoft sql server? Feb 28, 2023 pm 03:00 PM

Microsoft SQL Server is a relational database management system launched by Microsoft. It is a comprehensive database platform that uses integrated business intelligence (BI) tools to provide enterprise-level data management. It is easy to use, has good scalability, and has a high degree of integration with related software. High advantages. The SQL Server database engine provides more secure and reliable storage functions for relational data and structured data, allowing users to build and manage highly available and high-performance data applications for business.

SQL Server or MySQL? New research reveals the best database choices. SQL Server or MySQL? New research reveals the best database choices. Sep 08, 2023 pm 04:34 PM

SQLServer or MySQL? The latest research reveals the best database selection. In recent years, with the rapid development of the Internet and big data, database selection has become an important issue faced by enterprises and developers. Among many databases, SQL Server and MySQL, as the two most common and widely used relational databases, are highly controversial. So, between SQLServer and MySQL, which one should you choose? The latest research sheds light on this problem for us. First, let

How to connect to a Microsoft SQL Server database using PDO How to connect to a Microsoft SQL Server database using PDO Jul 29, 2023 pm 01:49 PM

Introduction to how to use PDO to connect to a Microsoft SQL Server database: PDO (PHPDataObjects) is a unified interface for accessing databases provided by PHP. It provides many advantages, such as implementing an abstraction layer of the database and making it easy to switch between different database types without modifying a large amount of code. This article will introduce how to use PDO to connect to a Microsoft SQL Server database and provide some related code examples. step

PHP and SQL Server database development PHP and SQL Server database development Jun 20, 2023 pm 10:38 PM

With the popularity of the Internet, website and application development has become the main business of many companies and individuals. PHP and SQLServer database are two very important tools. PHP is a server-side scripting language that can be used to develop dynamic websites; SQL Server is a relational database management system developed by Microsoft and has a wide range of application scenarios. In this article, we will discuss the development of PHP and SQL Server, as well as their advantages, disadvantages and application methods. First, let's

SQL Server vs. MySQL: Which database is more suitable for high availability architecture? SQL Server vs. MySQL: Which database is more suitable for high availability architecture? Sep 10, 2023 pm 01:39 PM

SQL Server vs. MySQL: Which database is more suitable for high availability architecture? In today's data-driven world, high availability is one of the necessities for building reliable and stable systems. As the core component of data storage and management, the database's high availability is crucial to the business operation of the enterprise. Among the many databases, SQLServer and MySQL are common choices. So in terms of high availability architecture, which database is more suitable? This article will compare the two and give some suggestions.

A brief analysis of five methods of connecting SQL Server with PHP A brief analysis of five methods of connecting SQL Server with PHP Mar 21, 2023 pm 04:32 PM

In web development, the combination of PHP and MySQL is very common. However, in some cases, we need to connect to other types of databases, such as SQL Server. In this article, we will cover five different ways to connect to SQL Server using PHP.

SQL Server vs. MySQL comparison: Which one is better for large-scale data processing? SQL Server vs. MySQL comparison: Which one is better for large-scale data processing? Sep 09, 2023 am 09:36 AM

SQLServer and MySQL are currently two very popular relational database management systems (RDBMS). They are both powerful tools for storing and managing large-scale data. However, they have some differences in handling large-scale data. This article will compare SQL Server and MySQL, focusing on their suitability for large-scale data processing. First, let us understand the basic characteristics of SQLServer and MySQL. SQLServer is developed by Microsoft

SQL Server and MySQL compete, how to choose the best database solution? SQL Server and MySQL compete, how to choose the best database solution? Sep 10, 2023 am 08:07 AM

With the continuous development of the Internet, database selection has become increasingly important. Among the many databases, SQLServer and MySQL are two high-profile options. SQLServer is a relational database management system developed by Microsoft, while MySQL is an open source relational database management system. So how to choose the best database solution between SQLServer and MySQL? First, we can compare these two databases in terms of performance. SQLServer is processing

See all articles