The SQL Anywhere MIB

The SQL Anywhere MIB was created for the SQL Anywhere SNMP Extension Agent. It includes all database server statistics and properties, and all database statistics, properties, and options. The statistics and properties are all read-only (with a few exceptions), and the database options are all read-write.

By default, the SQL Anywhere MIB is located in install-dir\snmp\iAnywhere.mib.

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

For more information about setting values in the SQL Anywhere MIB, see Setting values using the SQL Anywhere SNMP Extension Agent.

The following hierarchy describes the SQL Anywhere MIB:

OID Name Description
1.3.6.1.4.897.2.1.1.n.db saServer.saSrvStat Returns the value of server statistic n on database db.
1.3.6.1.4.897.2.1.2.n.db saServer.saSrvProp Returns the value of server property n on database db.
1.3.6.1.4.897.2.2.1.n.db saDb.saDbStat Returns the value of database statistic n on database db.
1.3.6.1.4.897.2.2.2.n.db saDb.saDbProp Returns the value of database property n on database db.
1.3.6.1.4.897.2.2.3.n.db saDb.saDbOpt Returns the value of database option n on database db.
1.3.6.1.4.897.2.3.1 saAgent.saVersion Returns the version of the SQL Anywhere Extension Agent.
1.3.6.1.4.897.2.3.2.db saAgent.saDbConnStr Returns the connection string for database db.
1.3.6.1.4.897.2.3.3.db saAgent.saConnected Returns whether the SQL Anywhere Extension Agent is connected to database db. Setting this value to 0 causes the SQL Anywhere Extension Agent to disconnect from the database, while setting this value to 1 causes the SQL Anywhere Extension Agent to attempt to connect to the database.
1.3.6.1.4.897.2.3.4.db saAgent.saStarted Returns whether database db is running. Setting this value to 0 causes the SQL Anywhere Extension Agent to shut down the database1, while setting this value to 1 attempts to start the database2.
1.3.6.1.4.897.2.3.5.db saAgent.saProc

Setting this value to a string proc_name causes the SQL Anywhere Extension Agent to executed the procedure proc_name in the database.

Arguments can be supplied (for example, proc_name('string', 4)); if no arguments are supplied, parentheses () are appended to the name. Getting the value returns "".

1.3.6.1.4.897.2.3.6 saAgent.saRestart Setting the value of this variable to 1 causes the agent to restart itself (it disconnects from all databases and reloads the .ini file). Getting the value returns 0.
1.3.6.1.4.897.2.3.7 saAgent.saInifile Returns the full path of the sasnmp.ini file the SQL Anywhere Extension Agent is using.
1.3.6.1.4.897.2.4 saMetaData Several virtual tables; each row represents a variable supported by the SQL Anywhere MIB.

1 When stopping a database by setting this variable, the stop is unconditional, meaning that the database will be stopped even if it has active connections.

2 To be able to start a database by setting this variable, the DBF parameter must be specified in the connection string (including the DBN, and DBKEY if it is required), and either the UtilDbPwd field must be set in the sasnmp.ini file, or the start database permission on the server (specified with the -gd server option) must be set to all.

saMetaData tables

The SQL Anywhere MIB includes metadata tables that provide a way to query the SQL Anywhere Extension Agent to find out which variables are supported.

  • saSrvMetaData.saSrvStatMetaDataTable   Lists the database server statistics (variables under sa.saServer.saSrvStat).

  • saSrvMetaData.saSrvpropMetaDataTable   Lists the database server properties (variables under sa.saServer.saSrv.Prop).

  • saDbMetaData.saDbStatMetaDataTable   Lists the database statistics (variables under sa.saDb.saDbStat).

  • saDbMetaData.saDbpropMetaDataTable   Lists the database properties (variables under sa.saDb.saDbProp).

  • saDbMetaData.saDbOptMetaDataTable   Lists the database options (variables under sa.saDb.saDbOpt).

For more information about the information stored in the SQL Anywhere MIB metadata tables, see saMetaData tables.