.. _transaction-archive-best-practice:

Transaction archiving
---------------------

.. index:: voss;voss transaction count
.. index:: voss;voss transaction delete
.. index:: voss;voss transaction export
.. index:: voss;voss transaction archive


The following are considerations when determining the frequency of the transaction archiving
schedule to set up on the system.  If a schedule is not set up for transaction archiving, 
system Alerts will be raised as well as a warning on the platform CLI login:

``TRANSACTION DATABASE MAINTENANCE NOT SCHEDULED``


.. The goal is to balance the number of transactions immediately available in the
   transaction log with the memory usage and performance of the system.

   It is recommended to setup the schedule frequency so that it maintains the number
   of transactions in the system below XXXX.  For a typical system, this would mean
   archiving on a schedule as often as every XX weeks (large system with heavy transaction load)
   to every XX weeks (smaller system/lighter transaction load).

   See below for more commands to help determine the transactions count over a period to time
   to help establish that duration.  The schedule should also be periodically reviewed as
   your usage changes or the system size grows to ensure the recommended maximum number
   of transactions is maintained.


* Run ``voss transaction count <days>`` on your system to inspect the number of transactions
  during a given period to determine your usage metrics.

  Refer to the *Database Commands for Transaction Management* topic in the Platform Guide
  for details on transaction archive command use and scheduling:
  
  * **voss transaction delete <days>**
  * **voss transaction export <days>**
  * **voss transaction archive <days>**

* Business policies - company policies may drive your choices:
  the immediate access to transaction logs for a period of time, security policy on
  data/audit retention, and so on.
 
  .. note::

     The transaction archive process does mean the logs are not lost, just that they are not 
     immediately accessible in the administrator graphical interface for searching.

* You can also set up system monitoring thresholds so that you receive alerts via the GUI and SNMP if the threshold
  is exceeded - which might indicate you need to review the archive schedule to increase how frequently is runs.  
  
  See the *SNMP* and *Automate System Monitoring Traps*  topics in the Platform Guide.
