다음을 통해 공유


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.

네임스페이스: Microsoft.SqlServer.Management.Nmo
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)

구문

‘선언
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

주의

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 이벤트 기록 규칙 정의.

For information about controlling the strict accuracy of event batch processing, see 이벤트 처리 순서 지정.

Inheritance Hierarchy

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

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

스레드 보안

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.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

EventChronicleRule Members
Microsoft.SqlServer.Management.Nmo Namespace

관련 자료

이벤트 기록 규칙 정의
이벤트 처리 순서 지정
ChronicleRule Element (ADF)