EventChronicleRule Class

Represents a event chronicle maintenance query to run for each generator quantum in which an event batch arrives into the parent event class.

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

Sintaxis

'Declaración
Public NotInheritable Class EventChronicleRule
    Inherits NamedSmoObject
public sealed class EventChronicleRule : NamedSmoObject
public ref class EventChronicleRule sealed : public NamedSmoObject
public final class EventChronicleRule extends NamedSmoObject
public final class EventChronicleRule extends NamedSmoObject

Notas

Event chronicle rules maintain the data in event chronicle tables. Each event chronicle has a name, an action, and an action time-out, and a parent event class.

For more information about event chronicle rules, see Definir reglas de crónica de eventos.

For information about controlling the strict accuracy of event batch processing, see Especificar el orden de procesamiento de eventos.

Inheritance Hierarchy

System.Object
   Microsoft.SqlServer.Management.Smo.SmoObjectBase
     Microsoft.SqlServer.Management.Smo.SqlSmoObject
       Microsoft.SqlServer.Management.Smo.NamedSmoObject
        Microsoft.SqlServer.Management.Nmo.EventChronicleRule

Ejemplo

The following example shows how to create an event chronicle rule that simply copies all events to a chronicle:

// Define the event chronicle rule
EventChronicleRule ec1Rule = 
    new EventChronicleRule(flightEvents, 
    "FlightEventChronicleRule");
ec1Rule.Action = "INSERT MyAppSchema.FlightEventChronicle " + 
    " (LeavingFrom, GoingTo, Price) " + 
    " SELECT LeavingFrom, GoingTo, Price " + 
    " FROM MyAppSchema.FlightEvents;";
ec1Rule.ActionTimeout = new TimeSpan(0, 1, 20);
flightEvents.EventChronicleRule = ec1Rule;
' Define the event chronicle rule
Dim ec1Rule As EventChronicleRule = _
    New EventChronicleRule(flightEvents, _
        "FlightEventChronicleRule")
ec1Rule.Action = _
    "INSERT MyAppSchema.FlightEventChronicle " + _
    " (LeavingFrom, GoingTo, Price) " + _
    " SELECT LeavingFrom, GoingTo, Price " + _
    " FROM MyAppSchema.FlightEvents;"
ec1Rule.ActionTimeout = New TimeSpan(0, 1, 20)
flightEvents.EventChronicleRule = ec1Rule

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

EventChronicleRule Members
Microsoft.SqlServer.Management.Nmo Namespace

Otros recursos

Definir reglas de crónica de eventos
Especificar el orden de procesamiento de eventos
ChronicleRule Element (ADF)