Share via


Alerts Collection

Cette fonctionnalité sera supprimée dans une prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement, et prévoyez de modifier les applications qui utilisent actuellement cette fonctionnalité.

The Alerts collection contains Alert objects that reference SQL Server Agent alerts.

Modèle d'objet SQL-DMO qui affiche l'objet en cours

Methods

Add Method

Remove Method (Collections)

ItemByID Method

Script Method

Refresh Method

 

Notes

With the Alerts collection, you can:

  • Create a Microsoft SQL Server alert.
  • Completely remove a SQL Server alert.

For information about creating SQL Server alerts, see Alert Object.

To remove an alert

  • Use the Remove method of the Alerts collection of a connected JobServer object. Indicate the targeted alert using the alert name or the ordinal location in the collection, as in:

    oJobServer.Alerts.Remove("Full Northwind")