Automatic Switching of Clean Logs
A clean log has a maximum size of 200 Gigabytes. In order to prevent the system logging beyond this limit and hence losing transactions, Reality includes a Clean Log Autoswitch Mechanism.
The 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.
Defining Clean Log Size Limit
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 199900. Values outside this range 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.
Archiving Clean Logs
After an automatic clean log switch has occurred, the old clean log should be archived to tape using the tlmenu Archive Clean Log option.