Compartir a través de


Alert.PerformanceCondition Property

Gets or sets the performance condition text.

Espacio de nombres: Microsoft.SqlServer.Management.Smo.Agent
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

Sintaxis

'Declaración
Public Property PerformanceCondition As String
public string PerformanceCondition { get; set; }
public:
property String^ PerformanceCondition {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_PerformanceCondition ()

/** @property */
public void set_PerformanceCondition (String value)
public function get PerformanceCondition () : String

public function set PerformanceCondition (value : String)

Valor de propiedad

A String value that specifies the performance condition.

Notas

When setting the PerformanceCondition property, the value requires the following syntax:

ObjectName|CounterName|Instance|ComparisonOp|CompValue

Part

Description

ObjectName

Name of a monitored Microsoft SQL Server object

CounterName

Name of a counter exposed by the object

Instance

Name of an instance of the counter

ComparisonOp

One of the relational operators =, >, or <

CompValue

Numeric value compared

This namespace, class, or member is supported only in version 2.0 of the .NET Framework.

Ejemplo

For example, to create an alert raised when the average wait time for an extent lock rises above 1 second (1,000 milliseconds), set the PerformanceCondition property using the string:

SQLServer:Locks|Average Wait Time (ms)|Extent|>|1000

Many SQL Server Performance Monitor counters do not define instance parameters. When an instance parameter is not applicable, indicate that no instance is selected using an empty Instance part in the value string, as in:

SQLServer:Access Methods|Page Splits/sec||>|50

How to: Create an Alert in Visual Basic .NET

Seguridad para subprocesos

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

Alert Class
Alert Members
Microsoft.SqlServer.Management.Smo.Agent Namespace

Otros recursos

Scheduling Automatic Administrative Tasks in SQL Server Agent
Automatizar las tareas administrativas (Agente SQL Server)
sp_add_alert (Transact-SQL)