A trap is an OID that is sent by an SNMP agent when a particular event occurs. Traps are initiated by the SNMP agent and can be detected by SNMP management software, which can then either deal with the event directly or query the SNMP agent for more information.
In order to receive traps, you must configure the SNMP service. The SNMP service will receive the trap information and then forward it on somewhere; however, by default, this is nowhere, so any trap listeners you have running will not detect anything. The following steps show how to configure your SNMP Service to send traps to your computer.
Right-click My Computer and choose Manage from the popup menu.
The Computer Management dialog appears.
In the left pane, double-click Services and Applications.
In the left pane, double-click Services.
Locate SNMP Service in the list of services in the right pane, right-click it and choose Properties from the popup menu.
The SNMP Service property sheet appears.
Click the Traps tab.
On the Traps tab, click Add.
The SNMP Service Configuration dialog appears.
In the SNMP Service Configuration dialog, type localhost in the text box and then click Add.
Click OK to close the Service property sheet.
The SQL Anywhere SNMP Extension Agent sends a trap whenever a connection is dropped by the database server. The OID of this trap is
If you are using database mirroring, and the SQL Anywhere SNMP Extension Agent connection to the database server drops, every 30 seconds the SQL Anywhere SNMP Extension Agent attempts to reconnect to the database server. When the agent reconnects, if it finds that it is connected to a different database server (as determined by the ServerName property), then it sends a trap with the OID 220.127.116.11.4.1.818.104.22.168, as well as the database ID from the sasnmp.ini file. In this case, the SQL Anywhere SNMP Extension Agent was connected to the primary database server, which went down, and now the mirror server is acting as the primary server. See Introduction to database mirroring.
The only other traps sent by the SQL Anywhere SNMP Extension Agent are dynamic traps. See Creating dynamic traps.
Creating dynamic traps