A clean log has a maximum size that depends on the version of Reality. On versions prior to Reality V14.0, this limit is 2 Gigabytes; on V14.0, an optional feature allows this to be increased to 200 Gigabytes. In order to prevent the system logging beyond this limit and hence losing transactions, Reality 8.0 and later support a Clean Log Autoswitch Mechanism.
The Clean Log Autoswitch Mechanism automatically switches to a new clean log when the current active clean log size reaches a predefined limit. The autoswitch script, if any, is then run.
The autoswitch script is a user-supplied script that on UNIX must be called .autoswitch and placed in the database owner's home directory; on Windows it must be called autoswitch.bat and placed in the database's configs folder. It can be used to notify the administrator that a switch has taken place by, for example, sending a message to the console or an Email message to the operator. The script is passed two parameters which can be included in the message: the clean log switched from and the new clean log switched to.
Caution
The autoswitch script is run using the database owner's environment, which may different from your environment.
If required, you can also create an autoswitchfail script in the same directory as the autoswitch script; this must be called .autoswitchfail (UNIX) or autoswitchfail.bat (Windows). The autoswitchfail script runs if the Clean Log autoswitch mechanism fails. If this occurs, the raw log could become full, leading to serious system problems – see Size of Raw Log for more details.
The clean log limit at which autoswitching is done is set in the host environment variable REALCIP_LOGLIMIT in units of one megabyte from 1 to 1999 (on Reality V14.0, with the large clean logs option, the limit is 199900). Unless you have the large clean logs option, values outside the range 1 to 1999 are ignored.
For example:
REALCIP_LOGLIMIT=500 (0.5Gbyte)
The default value of REALCIP_LOGLIMIT is 1500 (1.5 Gigabytes).
Caution
When using Shadow, FailSafe and Reality DR, all the databases concerned must use the same clean log size limit.
Note that the clean log will also be switched if the number of clean log images exceeds 4 billion (4,000,000,000). This limit is not configurable.
After an automatic clean log switch has occurred, the old clean log should be archived to tape using the tlmenu Archive Clean Log option.