cttrnmod allows an advanced user to change the transaction status of a FairCom DB data file and its associated index files. The utility can also be used to display the transaction status of a c-tree data file and its associated indexes.
It is expected only advanced database administrators will run this utility.
Operational Model:
Usage
cttrnmod (set <tranmode>|get) (-d <database>|-f <filelist>)
[-u <userid>] [-p <password>] [-s <servername>] [-n <sect>]
Where
repl=on - Enable replication (requires full transaction control)
repl=off - Disable replication
The following extended header attributes may also be set:
The files to change are specified by either the -d <database> option or the -f <filelist> option. The -d <database> option specifies the name of a c-tree database -- when this option is specified, the utility operates on all files referenced in that database (excluding SQL system data and index files). The -f <filelist> option specifies the name of a text file containing names of c-tree data files, one per line -- when this option is specified, the utility operates on all files specified in that text file.
Note: Indexes created with ctPREIMG or ctTRNLOG are physically structured differently than indexes that do not support transactions. Thus a non-tran index cannot be converted to transaction control, and must be rebuilt after the conversion. If an index file is created ctPREIMG or ctTRNLOG, it can be accessed in all transaction and non-transaction access modes.
Important Performance Considerations
When turning transaction processing off for a file, it is possible to take an even larger performance hit under specific FairCom Server configurations. Be sure to remove or comment out the line COMPATIBILITY FORCE_WRITETHRU from your FairCom Server configuration file ctsrvr.cfg. While this option provides only the safest of data integrity for your non-transaction processing controlled files, it forces an enormous performance penalty for doing so. This keyword has historically been included by default with most FairCom Server installations.
Examples
The following example demonstrates turning off transaction control for all c-tree data files and their associated index files in the rdsdb database:
# cttrnmod set N -d rdsdb
Setting transaction mode to NON_TRAN for files in database rdsdb...
Tranmode Filemode Filename
-------- -------- --------
NON-TRAN 0x0000 .\rdsdb.dbs\admin_deptbl.dat
NON-TRAN 0x0000 .\rdsdb.dbs\admin_deptbl.idx
NON-TRAN 0x0000 .\rdsdb.dbs\admin_dept_multi_ndx.idx
NON-TRAN 0x0000 .\rdsdb.dbs\admin_dept_ndx.idx
NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl.dat
NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl.idx
NON-TRAN 0x0000 .\rdsdb.dbs\admin_emp_no_ndx.idx
NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl1.dat
NON-TRAN 0x0000 .\rdsdb.dbs\admin_emptbl1.idx
NON-TRAN 0x0000 .\rdsdb.dbs\admin_emp_no_ndx1.idx
VERIFYING No Transaction Control...
VERIFY succeeded
3 Data Files Updated
0 Errors
The following example demonstrates reading the transaction status of the data and index files in the rdsdb database:
# cttrnmod get -d rdsdb
Reading transaction mode for files in database rdsdb...
Tranmode Filemode Filename
-------- -------- --------
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_deptbl.dat
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_deptbl.idx
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_dept_multi_ndx.idx
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_dept_ndx.idx
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl.dat
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl.idx
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emp_no_ndx.idx
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl1.dat
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emptbl1.idx
ctTRNLOG 0x0031 .\rdsdb.dbs\admin_emp_no_ndx1.idx
ctTRANMODE Control (FairCom Database Engine V11 and later)
When using the Transaction Control utility, cttrnmod, to disable transaction support on a file with extended file mode ctTRANMODE, the utility could report that after successfully disabling ctTRNLOG, the file still has ctTRNLOG set. This is expected for a file with the ctTRANMODE bit set when using a TRANPROC c-tree application.
cttrnmod has been updated to disable ctTRANMODE and ctPIMGMODE bits when it sets a file to no-transaction support. It was also modified to support explicitly enabling or disabling one of these bits (depending on the file mode that is in effect at the time).
Replication
New replication actions have been added to the cttrnmod utility for flexible control of replication attributes.
Note: Replication requires that the data file has a unique index and that the data and index files are using full (ctTRNLOG) transaction control.
Examples
# cttrnmod set T -f files.txt -u ADMIN -p ADMIN -s FAIRCOMS
Setting transaction mode to ctTRNLOG for files listed in file files.txt...
Replicate Tranmode Filemode Filename
--------- -------- -------- --------
NO ctTRNLOG 0x0032 ctreeSQL.dbs\admin_t.dat
ctTRNLOG 0x0032 ctreeSQL.dbs\admin_t.idx
ctTRNLOG 0x0032 ctreeSQL.dbs\admin_t_ti.idx
Note the "Replicate" column for current replication state information.
# cttrnmod set repl=on -f files.txt -u ADMIN -p ADMIN -s FAIRCOMS
Enabling replication for files listed in file files.txt...
Replicate Tranmode Filemode Filename
--------- -------- -------- --------
YES ctTRNLOG 0x0032 ctreeSQL.dbs\admin_t.dat
ctTRNLOG 0x8032 ctreeSQL.dbs\admin_t.idx
ctTRNLOG 0x8032 ctreeSQL.dbs\admin_t_ti.idx
Note: If cttrnmod is used to disable full transaction logging for a file, it also disables replication for that file.