Long transactions and overflow file

The audit server buffers audit-data in its memory buffers until the end of the transaction. For example, if during a transaction, 100 rows are inserted in a table and then a commit is carried out, all the audit rows for the insert are buffered by the audit server. This data is written to the audit files only at the time of commit.

The audit server uses individual memory buffers for each table. The size of the buffers is set to enable them to hold large amounts of data. But, the memory buffers might not be able to contain the results of a large transaction. In this case, the audit server uses an overflow file to buffer the remaining data.

The overflow file is created in $BSE/tmp. One overflow file exists for each session and for each server. The overflow file’s name consists of the session ID and process ID (pid) of the audit server, as follows:

ao.<Session Id>.<Process Id of the Audit Server>

A single overflow file is used to buffer data for all the tables in the session for which the memory buffers were insufficient. At the end of the transaction, if any table has data in the overflow file, the overflow file is read and placed in the corresponding sequence file. After all data has been read and copied from the overflow file, the overflow file is deleted.

If a transaction is canceled, the overflow file is deleted.

Note: The memory buffers of the audit server can hold a large amount of data. If the audit server still must use the overflow file, the transaction is too large. This can be a flaw in application design or coding. Avoid such transactions whenever possible.