There are a number of reasons to reset the transaction logs: Impending transaction limits, Database upgrades, and more.
NOTE: Resetting the transaction logs may impact several subsystems that require transaction log continuity. Special consideration is needed if you use dynamic dump backups, replication, deferred Indexing, full-text indexing, or record update callbacks. Review those sections for additional information before executing the log reset procedure.
Once you can safely shut down the system, be sure to shut it down cleanly. Follow these steps to reset the transaction logs for a FairCom server.
This can be done using any of the following methods:
This can be done by disabling any PLUGIN in ctsrvr.cfg and changing the port (add "CONNECTIONS 0" to ctsrvr.cfg), disrupting the network, or at the application level.
This can be verified by checking that the CTSTATUS.FCS file does not contain any comments like "auto recover" or "server was not shutdown properly" since the previous startup
You may now safely move the existing transaction logs to a backup location.
L*.FCS
S*.FCS
L*.FCT
L*.FCA
L*.FCQ
NOTE: Check the "LOG_EVEN" and "LOG_ODD" lines in ctsrvr.cfg to verify the server transaction log folder location..
DFRKSTATEDT.FCS
DFRKSTATEIX.FCS
NOTE: Check the "LOCAL_DIRECTORY" line in ctsrvr.cfg to verify the server working directory location .
If your dynamic dump backup restore procedure uses Forward Roll (ctfdmp utility), backups taken before the transaction log reset cannot apply database changes after the log reset. New backups should be created immediately after the log reset to be usable with the new transaction logs.
Replication uses a transaction log reader to apply database changes to another database server. Typically, the log reset procedure needs to be completed on each server involved in replication. The following instructions are appropriate for simple replication configurations but may need to be modified for complex scenarios. Contact FairCom if you have any questions.
Run ./repadm -c getoldestuncommitedtran for each replication agent, it should report the "uncommitted tran count" as zero when caught up.
1 0
1 0
Then restart the agent, which should delete the ctreplagent.ini and reset its log read position. (Legacy ctreplagent users should instead place the ctreplagent.ini in that process's working directory).
This assumes an initial configuration with server (A) acting in Primary role and server (B) acting as Secondary.
These features might use the transaction logs and DFRKSTATE*.FCS to take asynchronous actions. If this processing is lagging behind when the logs are reset, these actions will not occur for the unprocessed log interval. Before executing the log reset procedure, stop all external server activity and allow for the deferred indexing to reach the current log position. Use the following commands to check this.
Get current server log# and position:
ctstat -var -h 1 -u ADMIN -p ADMIN -s FAIRCOMS
Get current agent log# and position:
dfkctl -getstate -u ADMIN -p ADMIN -s FAIRCOMS -h 1
When the returned log numbers and positions are equal the deferred indexer should be caught up.