Adaxes Web Interface HelpShow AllHide All

Database for Logging

Local Database

By default, Adaxes stores log records in a local SQLite database located on the computer where your Adaxes service is installed. The local database holds log records only for the operations performed via the Adaxes service located on the same computer.

The local database is stored in the AdaxesLog.db3 file located in the LogDB subfolder of the folder where the Adaxes service is installed, which is C:\Program Files\Softerra\Adaxes 3\Service by default. To view the database, you can use any SQLite management tool.

To avoid growing of the database file size, the built-in database stores log records only for a limited number of days.

External Database

Apart from the local database, Adaxes can also use an external Microsoft SQL Server database for log records. Unlike the local database, the external database is not bound to a particular Adaxes service and can be used to collate events from multiple Adaxes services.

When an external MS SQL database is used, Adaxes continues storing log records in the local database, synchronizing data with the external one. This means that if you switch back to the local database, no logging information will be lost. Log records already contained in the local database by the time when you enable an external database will also be synchronized to the external log database.

If multiple Adaxes services share common configuration, log settings are also shared. This means that if you configure one of the services to use an external database for logging, the other services sharing configuration with it will also use the same database. If the external database replicates data with other MS SQL databases, Adaxes service will connect to the nearest available database.

What Happens if Adaxes Cannot Synchronize to External Database?

If an external MS SQL database is unavailable, a record with a detailed error description is added to the Service Event Log. In such a case, synchronization of log records will be postponed until the database becomes available again. However, the time during which the local database stores log records is limited. If the time during which a log record is stored in the local database expires before it is synchronized, the record will be lost.

Database Replication for High Availability

To achieve high availability and load balancing, you can use multiple replicated MS SQL databases for logging. Adaxes supports the Merge Replication* mechanism. In such a configuration, Adaxes service connects to the nearest available database.

Database Layout

Both local and external log databases have almost identical layout. Each database has a table called Operations to store all events logged to the database. The TargetObjects and Initiators tables hold additional information on the objects involved in the operation. Since the external logging database can be used by multiple Adaxes services, the database maintains an additional table to store hostnames of such services. The table name is Services.

The structure of the log databases is represented on the below diagram.

Log database diagram

Figure 1: Log database diagram

TableDescription
Operations Holds log records of all operations.
OperationTypes Contains operation types for all log records in the database. An Operation Type defines what changes the Target Object has undergone. For example, when an object is created, the operation type is create. Some log records represent multiple operation types. For instance, when an object is renamed, the operation types will be rename and set properties.
Operations2OperationTypes An intermediate table that links a log record to the type(s) of operations that the record represents.
Initiators Contains all Initiators of all operations in the database.
TargetObjects Contains all Target Objects of all operations in the database.
Services

Contains all Adaxes services that use the database to store log records.

This table is used for MS SQL databases only.