Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.1 » SQL Anywhere Server - Database Administration » Database monitoring » The SQL Anywhere SNMP Extension Agent » SQL Anywhere SNMP Extension Agent » Traps


Dynamic traps

A dynamic trap is a trap that is sent by the SQL Anywhere Extension Agent when a simple expression involving the value of a particular property, statistic, or option is true. Dynamic traps are created in the sasnmp.ini file. The format of the trap information in the sasnmp.ini file entry is as follows:

Traptrapnum=[]oid[.dbnum] op value
  • trapnum   is the dynamic trap number. It must start at 1 and be sequential.

  • oid   is the OID of the property, statistic, or option. OIDs in either the SQL Anywhere MIB or the RDBMS MIB are supported. If the OID given is an invalid SQL Anywhere or RDBMS OID, the SQL Anywhere MIB prefix ( is prepended.

    For information about the OIDs in the SQL Anywhere MIB, see SQL Anywhere MIB reference.

    For information about the OIDs in the RDBMS MIB, see RDBMS MIB reference.


    You can only use OIDs corresponding to database server or database properties, statistics, or options in dynamic traps.

  • dbnum   is the database number. This field is optional, but if specified, it must match the database number of the [DBn] section of the sasnmp.ini file.

    must have one of the following values:

    • = or == (equality)

    • !=, <>, or >< (inequality)

    • <= or =< (less than or equal)

    • >= or => (greater than or equal)

    • < (less than)

    • > (greater than)

  • op  


    Only equality or inequality is supported for string values.

  • value   is the value to use in the expression. String values may be enclosed in single or double quotes; these quotes are not included in the value. If you want the beginning or closing quotation marks to be included in the string, you must double them. Single quotes occurring within the string should not be doubled.

    When setting dynamic traps, use k, m, g, or t to specify units of kilobytes, megabytes, gigabytes, or terabytes. For example, you can set a dynamic trap to fire if the current cache size exceeds 200 MB by using:

    Trap1= > 200M

    You can specify as many Trap fields as you want in the sasnmp.ini file. The OID used for the trap is, and the data sent with the trap includes the following:

    • the trap number (starts at 1 for the first dynamic trap sent by the SQL Anywhere SNMP agent)

    • the database index

    • the database name trap index (from the sasnmp.ini file)

    • the variable name

    • the variable value (this is the current value of the variable, not necessarily the threshold value)

 Dynamic trap behavior
 Trap examples