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

SAP SQL Anywhere, on-demand edition 1.0 SP 6

Database billing metrics

The cloud allows you to view tenant database billing metrics, such as consumption of processing resources and online time during a given period.

These metrics can be used for billing purposes.

Tenant database billing metrics are determined by using either system-defined or user-defined counters. There are two types of counters:

  • Raw counters

    Raw counters record the number of times something happens. Raw counters start at zero when the database is started and are incremental. For example, a raw counter would be used to determine the number of requests received by a database during a certain period of time.

  • Rate counters

    Rate counters record how much of something is being used at a given time. An average is then computed, and can be used for billing purposes. For example, a rate counter would be used to determine, on average, how many active connections there are to a database during a certain period of time.

System-defined counters

The cloud tracks the following system-defined counters:

  • totalRequestsReceived (raw)

    The total number of requests received within a specified billing period.

  • averageNumConnections (rate)

    The average number of active connections to a database within a specified billing period.

  • averageTotalFileSize (rate)

    The average size of all dbspaces, in MB, within a specified billing period.

User-defined counters

In addition to system-defined counters, the cloud tracks the SQL Anywhere user-defined counters. You can give these counters meaningful names and set them from within your application to monitor relevant billing statistics. For user-defined raw counters, the cloud calculates how much the counter increased within a specified billing period. For user-defined rate counters, the cloud calculates the average value of the counter within the specified billing period. This information is included in a billing summary report that can be downloaded using the Cloud Command utility (dbcloudcmd).

For example, if your application processes orders, you can give the name OrdersProcessed to the UserDefinedCounterRaw01 counter and you can increment the counter every time an order is processed. You can then use this value to bill your tenants based on the number of orders processed within each billing period. Track the number of unfilled orders open during a given time by incrementing the OrdersProcessed counter each time an order is opened, and decrementing the counter every time an order is filled. The cloud computes the average rate of the counter for the billing period. This value can then be used to bill your tenants based on the average number of open or unfilled orders within each billing period.

The billing summary report includes values for all UserDefinedCounters. If UserDefinedCounters have not been set in your application, their values for each billing period are set to zero.

Note Never reset a raw counter for a database to zero except at database start time.