Freigeben über


Chronicles Element for EventClass (ADF)

Provides a location for defining one or more Transact-SQL statements that determine the table structure for the chronicle tables used by the event class.

Syntax

<EventClasses>
    <EventClass>
        ...
        <Chronicles>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Optional once per EventClass element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

EventClass Element (ADF)

Child elements

Chronicle Element for EventClass/Chronicles (ADF)

Hinweise

Event chronicles are optional; use the Chronicles element and its child elements only if you need to maintain event information outside of the event tables used by event classes. For more information, see Definieren von Verläufen für eine Ereignisklasse.

ms145896.note(de-de,SQL.90).gifWichtig:
If you add or delete the Chronicles element, updating the application deletes and re-creates the event class to which it corresponds. This includes dropping and re-creating the SQL Server tables and indexes used by this event class. Any data in the existing event tables is permanently deleted.

Beispiel

The following example shows a Chronicles element (and its child elements) that deletes any existing table named StockEventChron and then creates the StockEventChron event chronicle table. This table consists of the StockSymbol and StockPrice fields.

<Chronicles>
    <Chronicle>
        <ChronicleName>StockEventChron</ChronicleName>
        <SqlSchema>
            <SqlStatement>
            -- Delete any existing table named StockEventChron
            IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES
            WHERE TABLE_NAME = &apos;StockEventChron&apos;)
            DROP TABLE StockEventChron
            </SqlStatement>
            <SqlStatement>
            -- Create the chronicle table
            CREATE TABLE StockEventChron
            (
            StockSymbol char(10),
            StockHighPrice money
            PRIMARY KEY (StockSymbol)
            )
            </SqlStatement>
        </SqlSchema>
    </Chronicle>
</Chronicles>

Siehe auch

Verweis

Application Definition File Reference

Andere Ressourcen

Definieren von Verläufen für eine Ereignisklasse
Aktualisieren von Instanzen und Anwendungen

Hilfe und Informationen

Informationsquellen für SQL Server 2005