CDR_LOG_LAG_ACTION configuration parameter
Specifies how Enterprise Replication responds to a potential log wrap situation.
- onconfig.std value
- CDR_LOG_LAG_ACTION ddrblock
- separators
- +
- range of values
- See the Usage section.
- takes effect
- After you edit your onconfig file and restart the database server.
Usage
Use the CDR_LOG_LAG_ACTION configuration parameter to specify one or more actions, in priority order, that Enterprise Replication takes during a potential log wrap situation.
Option | Description |
---|---|
logstage | Enables compressed logical log staging. The following configuration parameters must also be set:
Log files are staged in the directory specified by the LOG_STAGING_DIR configuration parameter, until the maximum size specified by the CDR_LOG_STAGING_MAXSIZE configuration parameter is reached. The staged log files are deleted after advancing the log replay position. If the amount of disk space specified by the CDR_LOG_STAGING_MAXSIZE configuration parameter is exceeded, event alarm 30005 is raised. If log staging is configured, Enterprise Replication monitors the log lag state and stages log files even when Enterprise Replication is inactive. |
dlog | Enables the dynamic addition of logical logs.
The following configuration parameters must be set:
|
ignore | Ignore the potential for log wrapping. The Enterprise
Replication replay position might be overrun. If the replay position
is overrun, event alarm 30 is raised. Restart Enterprise Replication
using the cdr cleanstart command and synchronize
the data. The ignore option must be the only or the last option. If the snoopy log position overrun is detected, Enterprise Replication shuts down with event alarm 47005. |
ddrblock | Default. Block client applications update activity. The ddrblock option must be the only or the last option. |
shutdown | Shut down Enterprise Replication on the affected server. If replay position overrun is detected, restart Enterprise Replication using the cdr cleanstart command and synchronize the data. If the replay position was not overrun, restart Enterprise Replication using the cdr start command; there is no need to synchronize the data. If replay position overrun is detected and the cdr start command fails with error code 214 and raises event alarm class 75, restart Enterprise Replication using the cdr cleanstart command and synchronize the data. The shutdown option must be the only or the last option. If a log lag state is detected, Enterprise Replication is shut down and event alarm ID 47006 is raised. |
Staged log file format
ifmxERDDRBLOCKUniqueLog_lf_used_loguniqueid.dat
Enterprise Replication also
creates an empty token file for each staged log file. The token file
is used to detect log files that are only partially written. If a
token file is not found then Enterprise Replication treats
the staged log file as partially written log file and deletes it.
The token log file format is:ifmxERDDRBLOCKUniqueLog_lf_used_loguniqueid
Transferring log files to a high-availability cluster secondary server when using ER
If your configuration consists of an HDR, RSS, or SDS secondary server configured as an Enterprise Replication node, transfer staged log files to the secondary server using the alarm program script. The staged log files are required by Enterprise Replication in case the primary server in a high-availability cluster fails and a secondary server takes over the role of the primary server.
Enterprise Replication raises alarm class ID 30 and unique ID 30006 when a log is staged to the log staging directory. Enterprise Replication raises alarm class ID 30 and unique ID 30007 after deleting a staged log file. Using these alarms, you can automate the transfer of staged log files to the high-availability cluster secondary server using the alarm program script.
Ensure that the directory under the directory specified the LOG_STAGING_DIR configuration parameter exists and is named using the format ifmxddrlog_SERVERNUM. The script copies the staged log files to ifmxddrlog_SERVERNUM and creates a token log file after copying the staged log file.
Example
Suppose that you want Enterprise Replication to handle potential log wrap situations by first staging compressed logs until they reach 1 MB in size, then dynamically add up to two logical logs, and then block user transactions. Set the following configuration parameters:
CDR_LOG_LAG_ACTION logstage+dlog+ddrblock
LOG_STAGING_DIR $INFORMIXDIR/tmp
CDR_LOG_STAGING_MAXSIZE 1MB
CDR_MAX_DYNAMIC_LOGS 2
DYNAMIC_LOGS 2