Raising SNMP Traps in Alert Responses

The extension agent, SQLSNMP.DLL, is a process that coordinates SQL Server and the Windows NT-based SNMP service. When the SNMP service is started, SQLSNMP.DLL is loaded and becomes accessible from management workstations via SNMP. The extension agent contains a trap mechanism that can be used to raise alerts from SQL Server. Traps are raised by defining alerts in SQL Enterprise Manager and by specifying that the alert raise an SNMP trap.

    To configure an alert to raise an SNMP trap
  1. In SQL Enterprise Manager, from the Server menu choose Alerts.

    The Manage Alerts dialog box appears.

  2. Choose the New Alert icon or the Edit Alert icon.

    The New Alert or Edit Alert dialog box appears.

  3. Complete the dialog box. Select the Raise an SNMP Trap When the Alert Occurs option.

For more information about configuring alerts, see the online Help for SQL Enterprise Manager.

Two extended stored procedures can also be used to raise SNMP traps: xp_snmp_getstate and xp_snmp_raisetrap. For information about these extended stored procedures, see What's New for Transact-SQL.