Compiling TMS

Transaction Management Server (TMS) is a process of a Tmax system that is responsible for database management and distributed transaction processing. This appendix describes how to create a binary TMS for Tibero, Oracle, and Informix DBMSs.

The DBMS stub provided by Tmax is compatible with all versions of Tmax.

1. TMS for Tibero DBMS

Create a TMS binary for Tibero by compiling the tms_tbr.mk file provided by Tmax. The tms_tbr.mk file is located in the following path. TMAXDIR is the Tmax installation directory.

TMAXDIR/sample/server

Compilation steps for tms_tbr.mk are as follows.

  1. Log in to Tmax with a Tmax user account.

    $su – tmax
  2. Export Tibero environment variables. Copy them to a shell configuration file and apply them.

    The following is an example of Tibero environment variables.

    ## Tibero Environment ##
    export TB_HOME=/program/tibero4
    export TB_SID=tibero
    export TB_PROF_DIR=$TB_HOME/bin/prof
    export PATH=.:$TB_HOME/bin:$TB_HOME/client/bin:$PATH
    export LD_LIBRARY_PATH=$TB_HOME/lib:$TB_HOME/client/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH_64=$LD_LIBRARY_PATH_64:$TB_HOME/lib:$TB_HOME/client/lib
    export SHLIB_PATH=${SHLIB_PATH}:$TB_HOME/lib:$TB_HOME/client/lib
  3. Go to the $TMAXDIR/sample/server directory.

    cd $TMAXDIR/sample/server
  4. Compile using the TMS Makefile for Tibero (tms_tbr.mk).

    $make –f tms_tbr.mk all
  5. The compiled TMS binary is moved to the following directory. The file is loaded into memory during tmboot and supports two-phase commit (2PC) in the Tmax system, which supports global transaction processing using the XA interface.

    $TMAXDIR/appbin

For more information about the Tmax configuration file required to run TMS for Tibero, refer to $TMAXDIR/config/sample.m.

2. TMS for Oracle DBMS

Create a TMS binary for Oracle by compiling the tms_ora.mk file provided by Tmax. The tms_ora.mk file is located in the following path. TMAXDIR is the Tmax installation directory.

TMAXDIR/sample/server

Compilation steps for tms_ora.mk are as follows.

  1. Log in to Tmax with a Tmax user account.

    $su – tmax
  2. Export Oracle environment variables. Copy them to a shell configuration file and apply them.

    The following is an example of Oracle environment variables.

    ## Oracle Environment ## ORACLE_HOME=/oracle/app/oracle/product/8.0.5;
    export ORACLE_HOME PATH=$PATH:$ORACLE_HOME/bin; export PATH ORACLE_SID=ora805;
    export ORACLE_SID NLS_LANG=American_America.KO16KSC5601;
    export NLS_LANG ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data;
    export ORA_NLS33 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib;
    export LD_LIBRARY_PATH
  3. Go to $TMAXDIR/sample/server directory.

    cd $TMAXDIR/sample/server
  4. Compile using the TMS Makefile for Oracle (tms_ora.mk).

    $make –f tms_ora.mk all
  5. The compiled TMS binary is moved to the following directory. The file is loaded into memory during tmboot and supports two-phase commit (2PC) in the Tmax system, which supports global transaction processing using the XA interface.

    $TMAXDIR/appbin

For more information about the Tmax configuration file required to run TMS for Oracle, refer to $TMAXDIR/config/sample.m.

3. TMS for Informix DBMS

Create a TMS binary for Informix by compiling the tms_info.mk file provided by Tmax. The tms_info.mk file is located in the following path. TMAXDIR is the Tmax installation directory.

TMAXDIR/sample/server

Compilation steps for tms_info.mk are as follows.

  1. Log in to Tmax with a Tmax user account

    $su – tmax
  2. Export Informix environment variables. Copy them to a shell configuration file and apply them.

    The following is an example of Informix environment variables.

    ## Informix Environment ##
    export PATH=$PATH:/data2/informix/bin:$HOME/bin
    export INFORMIXDIR=/data2/informix
    export INFORMIXDIR=/data2/ids93fc
    export INFORMIXSERVER=ids93fc
    export LD_LIBRARY_PATH=$INFORMIXDIR/lib:$INFORMIXDIR/lib/esql
    export TERMCAP=$INFORMIXDIR/etc/termcap
  3. Go to the $TMAXDIR/sample/server directory.

    $cd $TMAXDIR/sample/server
  4. Compile using the TMS Makefile for Informix (tms_info.mk).

    $make –f tms_info.mk all
  5. The compiled TMS binary is moved to the following directory. The file is loaded into memory during tmboot and supports two-phase commit (2PC) in the Tmax system, which supports global transaction processing using the XA interface. (The -lifxa flag of INFOLIBS enables to use an XA interface that supports two-phase commit.)

    $TMAXDIR/appbin

For more information about the Tmax configuration file required to run TMS for Informix, refer to $TMAXDIR/config/sample.m.