Appendix A. Configuring Tmax

Table of Contents

A.1. Configuration File
A.1.1. DOMAIN Section
A.1.2. NODE Section
A.1.3. SVRGROUP Section
A.1.4. SERVER Section
A.1.5. SERVICE Section
A.2. Makefile

This appendix describes the Tmax configuration file.

A.1. Configuration File

The Tmax configuration file enables the user to configure Tmax. It is created by a Tmax administrator. This file is used to create a service table and to start Tmax.

The configuration file includes the following sections:

SectionDescriptionRequired
DOMAINConfigures the entire environment for a single independent Tmax system.Required
NODEConfigures the environment for each node that comprises the DOMAIN section.Required
SVRGROUPConfigures server groups and databases.Required
SERVERConfigures servers.Required
SERVICEConfigures services.Required
GATEWAYConfigures gateways between domains.Optional
ROUTINGConfigures data-dependent routings.Optional
RQConfigures reliable queues.Optional

The name of each section starts with an asterisk (*) (e.g., *DOMAIN, *NODE) and must start from the first space of a line. In a section, the definition of each item is separated by a comma (,), which indicates that the definition of items continues.

Note

For more information on the Tmax configuration file, refer to "Tmax Administration Guide".

The configuration file is created as a regular text file and compiled using the cfl command. The binary file, created after compilation, is referenced to create a service table and to start Tmax.

 cfl -i Tmax configuration file name

The following is an example of a Tmax configuration file (items inside angle brackets (< >) can be changed):

*DOMAIN
<resrc_name>        SHMKEY = <UNIQUE IPCKEY>,
                    MAXUSER = 256

*NODE
<uname>             TMAXDIR = "<TMAX installed directory>"
                    APPDIR = "<APPLICATION DIRECTORY>",
                    PATHDIR = "<path directory>"

*SVRGROUP
<svg_name>          NODENAME = <uname> ,
                    OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60"

*SERVER
<svr_name>          SVGNAME = <sgrpname> , MIN = 1, MAX = 3

*SERVICE
<svc_name>          SVRNAME = <svrname>

A.1.1. DOMAIN Section

Configures the Tmax system.

*DOMAIN
<resrc_name>        SHMKEY = <UNIQUE IPCKEY>,
                    MAXUSER = 256
ItemDescription
<resrc_name>Unique name for the Tmax system (Domain). The name must be 16 characters or less.
SHMKEYValue to internally allocate shared memory. The value must be unique to the entire system and fall within the range of 32,768 to 262,143.
MAXUSERMaximum number of users that are allowed to concurrently connect to Domain.

A.1.2. NODE Section

Configures the environment for each node that comprises DOMAIN.

*NODE
<uname>             TMAXDIR = "<TMAX installed directory>"
                    APPDIR = "<APPLICATION DIRECTORY>",
                    PATHDIR = "<path directory>"
ItemDescription
<uname>Name up to 16 characters in length. It uses the value returned by the uname –n command. The return values of hostname and "uname -n" must be the same.
TMAXDIRFull path of the Tmax installation directory.
APPDIRFull path of the Tmax application directory.
PATHDIRFull path of the directory for internal communication between Tmax processes.

A.1.3. SVRGROUP Section

Configures a group of servers logically related on another. A server group is the basic unit for database utilization, load balancing, and fault tolerance. At least one server group is defined for each server.

*SVRGROUP
<svg_name>        NODENAME = <uname> ,
                  OPENINFO = "Oracle_XA+Acc=P/scott/tiger+SesTm=60",
                  DBNAME = ORACLE,
                  TMSNAME = tms_ora
ItemDescription
<svg_name>Server group name up to 16 characters in length. It must be unique within the SVRGROUP section.
NODENAMEName of the node where a server group exists. Since a server group requires specification of a database, the following three items must be specified when a database is used: DBNAME, OPENINFO, and TMSNAME.
DBNAMEDatabase name (e.g., ORACLE).
OPENINFO

Registers information in Tmax to connect to a database. The information can be up to 256 characters in length and the registration varies depending on the database type.

  • Oracle: OPENINFO = "Oracle_XA+Acc = P/account/password+SesTm = 60"

  • Informix: OPENINFO = "database name"

CLOSEINFO

Registers information to disconnect the server group from a database. The information can be up to 256 characters in length. The registration process varies depending on the database type.

  • Oracle: CLOSEINFO = ""

  • Informix: CLOSEINFO = ""

TMSNAMETMS process name. The name can be up to 16 characters in length.

A.1.4. SERVER Section

Configures the application servers.

*SERVER
<svr_name>          SVGNAME = <sgrpname> , MIN = 1, MAX = 3
ItemDescription
<svr_name>Name of the executable file of the server that provides services. The name can be up to 16 characters in length.
SVGNAMEServer group name to which the server process belongs. SVGNAME must be defined in *SVRGROUP.
CLOPTParameter that processes the options of a command line. A hyphen (—) is used as a delimiter to separate system options from user options. This line is processed by the tpsvrinit() function.
MINNumber of servers that start by default when a user wants to start multiple servers.
MAXMaximum number of servers that can be dynamically started in addition to the default number.
CONVIndicates whether interactive servers are participating in interactive communication (Default value: N).

A.1.5. SERVICE Section

Configures services.

*SERVICE
<svc_name>          SVRNAME = <svrname>

ItemDescription
<svc_name>Name of the function called by a client when specified with a name. The name can be up to 16 characters in length and must be unique. Only services registered in the SERVICE section are supported.
SVRNAMEName of a server that provides specific services.

A.2. Makefile

This section describes TMS Makefile for Oracle and Informix.

TMS Makefile for Oracle

The following is an example of a TMS Makefile (Solaris 32 bit) for Oracle:

#
include $(ORACLE_HOME)/precomp/lib/env_precomp.mk
ORALIBDIR = $(LIBHOME)
ORALIB = $(PROLDLIBS) $(LIBCLNTSH)

TARGET  = tms_ora
APOBJ   = dumy.o

APPDIR  = $(TMAXDIR)/appbin
TMAXLIBD= $(TMAXDIR)/lib

TMAXLIBS  = -ltms –loras –lsocket -lnsl

all: $(TARGET)

$(TARGET): $(APOBJ)
        $(CC) -L$(TMAXLIBD) -o $(TARGET) -L$(ORALIBDIR) $(ORALIB) $(APOBJ) 
        $(TMAXLIBS)
        mv $(TARGET) $(APPDIR)

$(APOBJ):
        $(CC) -c dumy.c
#
clean:
        -rm -f *.o core $(TARGET)

TMS Makefile for Informix

The following is an example of a TMS Makefile (Solaris 32 bit) for Informix:

TARGET  = tms_info

INFOLIBDIR = ${INFORMIXDIR}/lib
INFOELIBDIR = ${INFORMIXDIR}/esql
INFOLIBD = ${INFORMIXDIR}/lib/esql
INFOLIBS = -lifsql -lifasf -lifgen -lifgls -lifos –lnsl –lsocket –laio –elf -lm –ldl 
           ${INFOLIBDIR}/esql/checkapi.o -lifglx -lifxa

TMAXLIBDIR = $(TMAXDIR)/lib
TMAXLIBS  = -ltms -linfs

$(TARGET):
    $(CC) -o $(TARGET)  -L$(TMAXLIBDIR) -L$(INFOLIBD) -L$(INFOLIBDIR) 
    –L$(INFOELIBDIR) $(TMAXLIBS) $(INFOLIBS)
    cp $(TARGET) $(TMAXDIR)/appbin

#
clean:
    -rm -f  core $(TARGET)