Udostępnij za pośrednictwem


How to: Configure Predefined Replication Alerts (SQL Server Management Studio)

Replication offers the following predefined alerts, which can be configured to respond to replication events:

  • Replication: agent success
  • Replication: agent failure
  • Replication: agent retry
  • Replication: expired subscription dropped
  • Replication: Subscription reinitialized after validation failure
  • Replication: Subscriber has failed data validation
  • Replication: Subscriber has passed data validation
  • Replication: agent custom shutdown

Configure these alerts from the Alerts folder in Microsoft SQL Server Management Studio or the Warnings and Agents tab in Replication Monitor (in SQL Server 2000, the tab is Agents). For more information about accessing this tab, see How to: View Information and Perform Tasks for a Subscription (Replication Monitor).

In addition to these alerts, Replication Monitor provides a set of warnings and alerts related to status and performance. For more information, see Setting Thresholds and Warnings in Replication Monitor. You can also define alerts for other replication events using the SQL Server alerts infrastructure. For more information, see Creating a User-Defined Event.

To configure a predefined replication alert in Management Studio

  1. Connect to the Distributor in Management Studio, and then expand the server node.

  2. Expand the SQL Server Agent folder, and then expand the Alerts folder.

  3. Right-click a replication alert, and then click Properties.

  4. Set options in the <AlertName> alert properties dialog box:

    • On the General page, click Enable; specify which database the alert should apply to.
    • On the Response page, specify whether an e-mail should be sent and/or a job should be executed.
      If the alert is Replication: Subscriber has failed data validation, you can specify the response job that replication provides for this alert: Select Execute job, and then click the browse button (). In the Locate Job dialog box, click Browse. In the Browse for Objects dialog box, select Reinitialize subscriptions having data validation failures. Click OK in both open dialog boxes. When the job executes, it uses a remote procedure call (RPC) to a stored procedure that reinitializes the subscription. If the Publisher uses a remote Distributor, you must define a remote server login at the Publisher, so that the RPC from the Distributor to the Publisher can be made. For more information about defining remote server logins, see Security for Remote Servers.
    • On the Options page, customize the text of the response.
  5. Click OK.

To configure an alert for a threshold in Replication Monitor

  1. On the Warnings and Agents tab click Configure Alerts.

  2. In the Configure Replication Alerts dialog box, select an alert, and then click Configure.

  3. Set options in the <AlertName> alert properties dialog box:

    • On the General page, click Enable; specify which database the alert should apply to.
    • On the Response page, specify whether an e-mail should be sent and/or a job should be executed.
      If the alert is Replication: Subscriber has failed data validation, you can specify the response job that replication provides for this alert: Select Execute job, and then click the browse button (). In the Locate Job dialog box, click Browse. In the Browse for Objects dialog box, select Reinitialize subscriptions having data validation failures. Click OK in both open dialog boxes. When the job executes, it uses a remote procedure call (RPC) to a stored procedure that reinitializes the subscription. If the Publisher uses a remote Distributor, you must define a remote server login at the Publisher, so that the RPC from the Distributor to the Publisher can be made. For more information about defining remote server logins, see Security for Remote Servers.
    • On the Options page, customize the text of the response.
  4. Click OK.

  5. Click Close.

See Also

Concepts

Using Alerts for Replication Agent Events

Help and Information

Getting SQL Server 2005 Assistance