Nota:
El acceso a esta página requiere autorización. Puede intentar iniciar sesión o cambiar directorios.
El acceso a esta página requiere autorización. Puede intentar cambiar los directorios.
Initializes a new instance of the EventChronicleRule class with an EventClass and a name.
Espacio de nombres: Microsoft.SqlServer.Management.Nmo
Ensamblado: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Sintaxis
'Declaración
Public Sub New ( _
ecParent As EventClass, _
name As String _
)
public EventChronicleRule (
EventClass ecParent,
string name
)
public:
EventChronicleRule (
EventClass^ ecParent,
String^ name
)
public EventChronicleRule (
EventClass ecParent,
String name
)
public function EventChronicleRule (
ecParent : EventClass,
name : String
)
Parámetros
- ecParent
The parent EventClass for the EventChronicleRule. This parameter sets the Parent property.
name
The String of up to 256 characters that specifies the name of the EventChronicleRule.You cannot change the name. To rename an event chronicle rule, you must remove the rule and then add a new rule.
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
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 Class
EventChronicleRule Members
Microsoft.SqlServer.Management.Nmo Namespace
Otros recursos
Definir reglas de crónica de eventos
RuleName Element for ChronicleRule (ADF)
ChronicleRule Element (ADF)