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

SQL Anywhere 17 » SQL Anywhere Server - Database Administration » Database configuration » Connection, database, and database server properties

User-defined properties

User-defined properties are available for each connection to a database.

A set of user-defined properties is supported. Your application must define the semantics for each user-defined property and set the values that are returned. The property values can be set to an absolute 32-bit UNSIGNED INTEGER value using the sa_user_defined_counter_set system procedure or incremented using the sa_user_defined_counter_add system procedure. The sa_user_defined_counter_add system procedure can also be used to decrement the property by adding a negative value. The user-defined counters are:

  • UserDefinedCounterRaw01
  • UserDefinedCounterRaw02
  • UserDefinedCounterRaw03
  • UserDefinedCounterRaw04
  • UserDefinedCounterRaw05
  • UserDefinedCounterRate01
  • UserDefinedCounterRate02
  • UserDefinedCounterRate03
  • UserDefinedCounterRate04
  • UserDefinedCounterRate05

The values for user-defined properties are maintained separately for each connection, database, and server. The current value of the properties can be retrieved using the CONNECTION_PROPERTY, DB_PROPERTY, and PROPERTY functions, respectively.

One of example of using these properties is to have a raw property that shows the current number of keys remaining in a key pool. The value of the property would fluctuate up and down over time. At the same time, a rate property could show how quickly keys were being used from the key pool.