Re: Informix TP/XA and Encina
Posted in 1993
In article <20a8hiINNq1u@emory.mathcs.emory.edu> gatech!uunet.UU.NET!ge!dedes!dedes@emory.mathcs.emory.edu writes: >>Has anyone experienced the following problem using Informix TP/XA with Encina 1.0.3 >>on Hewlett Packard? I am getting an sqlcode of -349 when my server code accesses >>Informix for the first time. The server code properly initializes; it is an >>Encina monitor application so it registers itself as a server. The resource manager >>is defined and the open string is correct. On the first SQL call (which fails with >>-349), sqlturbo is started and tbstat -u shows the application user id as an Informix >>user. I have contacted both Transarc and Informix about the problem, but I was >>wondering if anyone else has experienced this problem. >> >>It is my understanding that a program that uses Informix TP/XA and Encina does not >>have to include code to open the database (EXEC SQL DATABASE db) or do commit/rollbacks. > >>Is this assumption correct? An sqlcode of -349 means the database is not selected >>so one would assume an EXEC SQL DATABASE is required. But in an Encina environment, >>one would assume this is unnecessary because the open string opens the database. >>Any ideas? > >Check in your tbconfig the value of GTRID_CMP_SZ. When I was working with >Tuxedo they suggested to set it to 12. I have no idea what Encina requires >but try it. > >-Toly Some versions of the TP/XA product contain bug#13032 which means TP/XA does not correctly handle environment variables being passed to it via the OPEN string. Therefore both $INFORMIXDIR and $TBCONFIG must be located in the default locations/values. 1. INFORMIXDIR must be set to "/usr/informix" A simple way to meet this restriction is to use a symbolic link from wherever the Informix products are installed as follows: ln -s $INFORMIXDIR /usr/informix 2. TBCONFIG must either not be set or it must be set to "tbconfig". In order to determine whether you have a buggy version, do the following: nm $INFORMIXDIR/lib/esql/libinfxxa.a | grep iqsend.o If this grep succeeds, then you have the buggy version. Also, GTRID_CMP_SZ is 12 for TUXEDO but is 32 for ENCINA. You are correct in that you do not need explicit open/close database stmts. mon_TxBegin()/mon_TxCommit()/mon_TxAbort() are used for tx demarcation. See the example server for how to use the mon_ServerRecoverable() and mon_InitResourceManager() functions. Hope this helps, Scott