Export (0) Print
Expand All

Defining Subscription Rules

SQL Server 2005

The primary purpose of subscription rules is to generate notifications: subscription rules join event data with subscription data to generate notification data. You can also use subscription rules to update event and subscription chronicles.

There are two types of subscription rules: event-driven and scheduled. Event-driven rules, referred to as event rules, generate notifications as soon as events arrive. Scheduled rules generate notifications according to the schedule defined in each scheduled subscription.

These rules can contain simple actions or the more complex condition actions. Simple actions allow subscribers to supply parameters to developer-defined queries. Condition actions allow subscribers to create the equivalent to WHERE clauses over the event fields.

ms171295.note(en-US,SQL.90).gifNote:
Do not use subscription rules to update the event or subscription tables. There are no guarantees about the order of processing for subscription rules, so the rules that update tables might be processed out of order. This creates system consistency implications. Also the subscription and event tables are likely to be among the largest in terms of number of records. Transact-SQL statements operating directly on these tables will take longer and require more system resources to process.

ms171295.note(en-US,SQL.90).gifNote:
For testing and troubleshooting rules, the Notification Services stored procedures are helpful. For more information, see NSPrepareRuleFiring (Transact-SQL) and NSExecuteRuleFiring (Transact-SQL).

Topic Description

Defining Event Rules

Describes rules that generate notifications when events arrive and how to define these rules.

Defining Scheduled Rules

Describes rules that generate notifications at scheduled times and how to define these rules.

Defining Actions

Describes simple, parameterized actions for rules and how to define these actions.

Defining Condition Actions

Describes condition actions that allow users to define the equivalent to a WHERE clause for a rule and how to define these actions.

Writing Efficient Subscription Rules

Provides guidelines for writing rules that perform well and consume fewer system resources.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft