共用方式為


NotificationClass Element (ADF)

Provides a location for defining one notification class.

語法

<NotificationClasses>
    <NotificationClass>

Element Characteristics

Characteristic Description

Data type

None.

Default value

None.

Occurrence

Optional once or more per NotificationClasses element.

Updates

Can be added and deleted when updating the application.

Element Relationships

Relationship Elements

Parent element

NotificationClasses Element (ADF)

Child elements

NotificationClassName Element (ADF)

Schema Element for NotificationClass (ADF)

FileGroup Element for NotificationClass (ADF)

ContentFormatter Element (ADF)

DigestDelivery Element (ADF)

MulticastDelivery Element (ADF)

NotificationBatchSize Element (ADF)

Protocols Element (ADF)

ExpirationAge Element (ADF)

備註

If you delete a notification class, Microsoft SQL Server 2005 Notification Services drops the table for the notification class when you update the application. This deletes any data the table might contain.

If you rename a notification class, Notification Services creates a new notification class and deletes the old notification class.

範例

The following example shows a complete definition for a notification class. The notification class provides stock information to subscribers via email over the SMTP protocol.

<NotificationClass>
    <NotificationClassName>StockNotifications</NotificationClassName>
    <Schema>
        <Fields>
            <Field>
                <FieldName>StockSymbol</FieldName>
                <FieldType>char(10)</FieldType>
            </Field>
            <Field>
                <FieldName>StockPrice</FieldName>
                <FieldType>money</FieldType>
            </Field>
        </Fields>
    </Schema>
    <FileGroup>Secondary</FileGroup>
    <ContentFormatter>
        <ClassName>Stock.StockFormatter</ClassName>
        <AssemblyName>C:\CustomCFs\StockFormatter.dll</AssemblyName>
        <Arguments>
            <Argument>
                <Name>OutputHTML</Name>
                <Value>true</Value>
            </Argument>
        </Arguments>
    </ContentFormatter>
    <DigestDelivery>true</DigestDelivery>
    <NotificationBatchSize>100</NotificationBatchSize>
    <Protocols>
        <Protocol>
            <ProtocolName>SMTP</ProtocolName>
            <Fields>
                <Field>
                    <FieldName>Subject</FieldName>
                    <SqlExpression>%SubjectLine%</SqlExpression>
                </Field>
                <Field>
                    <FieldName>From</FieldName>
                    <SqlExpression>%fromAddress%</SqlExpression>
                </Field>
                <Field>
                    <FieldName>To</FieldName>
                    <FieldReference>DeviceAddress</FieldReference>
                </Field>
                <Field>
                    <FieldName>Priority</FieldName>
                    <SqlExpression>%mailPriority%</SqlExpression>
                </Field>
                <Field>
                    <FieldName>BodyFormat</FieldName>
                    <SqlExpression>&quot;html&quot;</SqlExpression>
                </Field>
            </Fields>
            <ProtocolExecutionSettings>
                <RetrySchedule>
                    <RetryDelay>P0DT00H15M00S</RetryDelay>
                    <RetryDelay>P0DT00H30M00S</RetryDelay>
                    <RetryDelay>P0DT01H00M00S</RetryDelay>
                </RetrySchedule>
                <FailuresBeforeAbort>20</FailuresBeforeAbort>
                <MulticastRecipientLimit>10</MulticastRecipientLimit>
                <WorkItemTimeout>P0DT00H30M00S</WorkItemTimeout>
            </ProtocolExecutionSettings>
        </Protocol>
    </Protocols>
    <ExpirationAge>P0DT02H30M00S</ExpirationAge>
</NotificationClass>

請參閱

參考

Application Definition File Reference

其他資源

定義通知類別
更新執行個體及應用程式

說明及資訊

取得 SQL Server 2005 協助