1 2 Previous Next 19 Replies Latest reply: May 17, 2012 9:14 PM by 784893 RSS

    Tuxedo ART DB Configuration with XA

    525013
      Hi,

      I am trying to get my tuxedo application to work. I am not so much experienced with Tuxedo as far as database connections.

      Basically when I start up the server. Do i need to have a TMSNAME set up? So far the sample_03 application works, but when I startup I do have an error about no TMS_ORA around.

      Can someone please let me know what do I need to do to remove this error? I found something like a buildtms utility but after I configured it, my transactoins were not happening.

      Please help.

      Thanks
        • 1. Re: Tuxedo ART DB Configuration with XA
          Todd Little-Oracle
          Hi,

          To use an XA resource manager such as Oracle Database with Tuxedo (including Tuxedo ART), you need to do several things. All of this is described in the documentation at: http://docs.oracle.com/cd/E26665_01/tuxedo/docs11gr1/ads/adtran.html

          Essentially you have to:

          <li>Add an entry into the RM file located in $TUXDIR/udataobj/RM for the resource manager you want to use This file basically tells Tuxedo where and how to access the RM's XA library.
          <li>Build an RM specific TMS using the buildtms command.
          <li>Add TMNSAME and TMSCOUNT entries to the Tuxedo group definition that contains the servers accessing the RM
          <li>Add the TLOGDEVICE and TLOGNAME parameters to the machine definition in the UBBCONFIG file
          <li>Create the transaction log using the crdrl subcommand of tmadmin
          <li>Add an appropriate OPENINFO (and CLOSEINFO if needed) entry to the group in the UBBCONFIG file

          and with that you should be ready to go.

          Regards,
          Todd Little
          Oracle Tuxedo Chief Architect
          • 2. Re: Tuxedo ART DB Configuration with XA
            525013
            Do i need to use the buildserver command? I am not sure, my server name is ARTSTRN
            • 3. Re: Tuxedo ART DB Configuration with XA
              525013
              Hi Todd,

              Thanks for the reply. The sample_03 one comes with a ubbconfig file that has a TMSNAME and TMSCOUNT in there.

              Does that mean that it was already configured as such? or do I need to configure that?

              Also, is it best practice to use XA as opposed to not use it.

              Thanks,
              • 4. Re: Tuxedo ART DB Configuration with XA
                525013
                Following is my ubbconfig file:

                I have used the buildtms to create a TMS_ORA using OracleXA
                but I am not sure if I need to use buildserver command.

                I aslo have an OPENINFO command

                If I dont use XA, then I dont have any new updates happening in the database.

                Currently my setup is one tuxedo server pointing to one oracle database. I dont have any need for XA, but it does not work when I dont use XA.



                ############################################

                *RESOURCES
                IPCKEY 34701

                DOMAINID KIXD # <REGION>
                MASTER KIXR # <SUBREGION>
                MODEL SHM
                MAXACCESSERS 100
                MAXSERVERS 50
                MAXSERVICES 10000
                LDBAL N
                BLOCKTIME 30

                #------------------------------------------------------------------------------
                *MACHINES
                "x9l"
                LMID=KIXR
                APPDIR="/opt/oracle/art11gR1/Cics_RT/sample/sample_03"
                TUXDIR="/opt/oracle/tuxedo11gR1"
                TUXCONFIG="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/config/tux/tuxconfig"
                ENVFILE="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/config/tux/envfile"
                ULOGPFX="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/log/ULOG"
                MAXWSCLIENTS=20
                TLOGDEVICE="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/sysfile/TLOG"

                #------------------------------------------------------------------------------
                *GROUPS
                DEFAULT: LMID=KIXR
                # Applicative groups
                TCP00 LMID=KIXR
                GRPNO=1

                GRP00
                GRPNO=10
                ENVFILE="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/config/tux/envfile"

                GRP01
                GRPNO=11
                ENVFILE="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/config/tux/envfile"

                GRP02
                GRPNO=12
                ENVFILE="/opt/oracle/art11gR1/Cics_RT/sample/sample_03/config/tux/envfile"
                TMSNAME="TMS_ORA"
                TMSCOUNT=2
                # OPENINFO="Oracle_XA:Oracle_XA+Acc=P/user/password+SesTm=600+LogDir=/opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/xa+DbgFl=0x20"
                OPENINFO="Oracle_XA:Oracle_XA+Acc=P/user/password+SqlNet=orcl+SesTm=600+LogDir=/opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/xa+DbgFl=0x20+MaxCur=5"

                #------------------------------------------------------------------------------
                *SERVERS
                ARTTCPL SRVGRP=TCP00
                SRVID=101
                CLOPT=" -- -M 4 -m 1 -L //192.168.1.2:702 -n //192.168.1.2:701 +H -1 -D"

                ARTADM SRVGRP=GRP01
                SRVID=10
                MIN=1 MAX=1
                SEQUENCE=1
                CLOPT="-o /opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/sysout/stdout_adm -e /opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/sysout/stderr_adm -r --"

                ARTCNX SRVGRP=GRP01
                SRVID=15
                CONV=Y
                MIN=1 MAX=1 RQADDR=QCNX015 REPLYQ=Y
                CLOPT="-o /opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/sysout/stdout_cnx -e /opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/sysout/stderr_cnx -r --"

                ARTSTRN SRVGRP=GRP02
                SRVID=20
                CONV=Y
                MIN=1 MAX=5 RQADDR=QKIX110 REPLYQ=Y
                CLOPT="-o /opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/sysout/stdout_strn -e /opt/oracle/art11gR1/Cics_RT/sample/sample_03/LOGS/sysout/stderr_strn -r -- -s KIXR -l SIMPAPP"

                *SERVICES
                DEFAULT: SVCTIMEOUT=0 TRANTIME=80
                *ROUTING

                Edited by: user522010 on May 1, 2012 11:33 AM
                • 5. Re: Tuxedo ART DB Configuration with XA
                  User734086-Oracle
                  If you are using ART* servers, they are already pre-built so you don't need to use buildserver. Your KIX_* environment variables and resource files must define the CICS programs and transactions.
                  • 6. Re: Tuxedo ART DB Configuration with XA
                    525013
                    What I have seen is that

                    Essentially you have to:

                    Add an entry into the RM file located in $TUXDIR/udataobj/RM for the resource manager you want to use This file basically tells Tuxedo where and how to access the RM's XA library.

                    I have done this

                    Build an RM specific TMS using the buildtms command.

                    I have done this and called it TMS_ORA as in the ubbconfig file

                    Add TMNSAME and TMSCOUNT entries to the Tuxedo group definition that contains the servers accessing the RM

                    That has been added to the ubbconfig file.

                    Add the TLOGDEVICE and TLOGNAME parameters to the machine definition in the UBBCONFIG file

                    I have a TLOGDEVICE name, but not TLOGNAME in my ubbconfig file, do I need that alos?

                    Create the transaction log using the crdrl subcommand of tmadmin

                    I have not created this This command was also issued successfully when the TLOG was created.

                    Add an appropriate OPENINFO (and CLOSEINFO if needed) entry to the group in the UBBCONFIG file

                    I have OPENINFO



                    **Update: I am pretty sure now that my DB config is working. My application can not only read but also write to the database using this OPENINFO param

                    Edited by: user522010 on May 1, 2012 12:34 PM

                    Edited by: user522010 on May 1, 2012 12:35 PM

                    Edited by: user522010 on May 1, 2012 12:35 PM

                    Edited by: user522010 on May 1, 2012 12:35 PM

                    Edited by: user522010 on May 3, 2012 5:54 AM
                    • 7. Re: Tuxedo ART DB Configuration with XA
                      525013
                      Hi,



                      I tried using tmadmin crdl, it did not work.

                      I was really hoping for some clear concise description to set up an XA RM for ART CICS as I got for the sample_03 documentation to get the server up and running.

                      From what I read, if its not a XA transaction, then Tuxedo cant really be the resource manager and there might be loss of transactions that Tuxedo will not know of.

                      Is this correct?

                      If you are using ART* servers, they are already pre-built so you don't need to use buildserver. Your KIX_* environment variables and resource files must define the CICS programs and transactions.
                      I have that part defined properly and the application works, but how do I know if its using XA or not?

                      Edited by: user522010 on May 2, 2012 5:45 AM
                      • 8. Re: Tuxedo ART DB Configuration with XA
                        Todd Little-Oracle
                        Hi,

                        OK, a couple of comments. It will help greatly if you can post whatever errors you are getting when you try something. These might be errors from a command such as crdl in tmadmin, or errors seen when you try to boot your application, etc. As well, posting the portion of the ULOG from the period of time when you're having a problem. These will help cut down the time to help you get this resolved.

                        When you say crdl did not work, what happened? You will not be able to use XA transactions until the transaction log is created.

                        You asked before about best practices and XA. It's not really so much a question of best practices, it's more a question of whether you need distributed transactions that guarantee consistency, i.e, the ACID properties of a distributed transaction. By using XA, you can ensure that updates to multiple resource managers either all occur or none occur, thus ensuring consistency of your application state. Without XA, if you modify multiple resource managers (multiple databases, a database and a queuing system, etc.) as in withdrawing money from an account in one database and depositing the money in an account in another database, there is no straightforward way to ensure that both updates occur or that neither occur.

                        Tuxedo is never a resource manager, it is always a transaction manager in XA terminology. Databases, queuing systems, and the like are resource managers.

                        The only real way to tell if XA is being used is to check with the resource managers and whatever logs they maintain. If XA is involved, then requests to the resource managers will be associated with a global transaction ID (GTRID). If you have TSAM installed, you can use its transaction monitoring category to monitor XA transactions.

                        Regards,
                        Todd Little
                        Oracle Tuxedo Chief Architect
                        • 9. Re: Tuxedo ART DB Configuration with XA
                          525013
                          Todd Little wrote:
                          Hi,

                          OK, a couple of comments. It will help greatly if you can post whatever errors you are getting when you try something. These might be errors from a command such as crdl in tmadmin, or errors seen when you try to boot your application, etc. As well, posting the portion of the ULOG from the period of time when you're having a problem. These will help cut down the time to help you get this resolved.

                          When you say crdl did not work, what happened? You will not be able to use XA transactions until the transaction log is created.

                          You asked before about best practices and XA. It's not really so much a question of best practices, it's more a question of whether you need distributed transactions that guarantee consistency, i.e, the ACID properties of a distributed transaction. By using XA, you can ensure that updates to multiple resource managers either all occur or none occur, thus ensuring consistency of your application state. Without XA, if you modify multiple resource managers (multiple databases, a database and a queuing system, etc.) as in withdrawing money from an account in one database and depositing the money in an account in another database, there is no straightforward way to ensure that both updates occur or that neither occur.

                          Tuxedo is never a resource manager, it is always a transaction manager in XA terminology. Databases, queuing systems, and the like are resource managers.

                          The only real way to tell if XA is being used is to check with the resource managers and whatever logs they maintain. If XA is involved, then requests to the resource managers will be associated with a global transaction ID (GTRID). If you have TSAM installed, you can use its transaction monitoring category to monitor XA transactions.

                          Regards,
                          Todd Little
                          Oracle Tuxedo Chief Architect
                          Hi Todd,

                          Thank your for your response. It turns out that I had all the steps covered as you outlined. There is a setup.sh file in the sample_03 directory which will run the crdrl command.

                          At this point, I am having some problems running my code, and I am getting an ABEND.

                          This is the output from my stdout_strn file:

                          (FLDID(63555132)) 2
                          (FLDID(63555133)) 2271560481
                          (FLDID(63555134)) 100
                          (FLDID(63555135)) 100
                          (FLDID(63555136)) 0
                          (FLDID(63555200)) 0
                          (FLDID(63555201)) 24
                          (FLDID(63555202)) 80
                          (FLDID(63555203)) 5
                          (FLDID(63555212)) 0
                          (FLDID(63555213)) 0
                          (FLDID(63555214)) 0
                          (FLDID(197772865)) TX
                          (FLDID(197772866))
                          (FLDID(197772869))
                          (FLDID(197772912)) 0001501161936009
                          (FLDID(197772914)) IBM-3279-3-E
                          (FLDID(197772938)) ibm-37
                          (FLDID(197772939)) ascii
                          (FLDID(231327299)) BCTL
                          (FLDID(231327300)) CIX1
                          (FLDID(231327315)) ' DBCTL
                          (FLDID(231327333)) BCTL
                          (FLDID(231327335)) 000A
                          (FLDID(231327345))
                          (FLDID(231327349))

                          KIX-IERROR - CICS ERROR
                          KIX-IETRACE - KIX__RECEIVE_MAP____________
                          EIBFN - '1802' 'RECEIVE MAP '
                          EIBRESP - '01' 'ERROR '
                          EIBRESP2 - '00'
                          EIBCALEN - '+00182'
                          EIBAID - '9'
                          EIBTRNID - 'BCTL'
                          EIBTRMID - '0028'
                          EIBTASKN - '0022070'
                          EIBRSRCE - '^@^@^@^@^@^@^@^@'
                          ---------------------------------------------------
                          KIX__USER_ABEND EIBFN =<^X^B>
                          KIX__USER_ABEND EIBRESP=<+0000000001>
                          01 : CTLB1 /opt/oracle/art11gR1/Cics_RT/sample/sample_03/CICS/CTLB1.gnt
                          02 : KIX__USER_ABEND KIX__USER_ABEND
                          03 : set_err_proc set_err_proc
                          -----> KixProgramAbort
                          -----> KixLevelStackFree


                          And this is the output form my stderr_strn file:

                          TCP__ReceiveMap : rc <1>
                          ERROR: receive map BmsTerm[1]
                          >> tcpstub >> TCP__ReceiveMap - Return length=<0>
                          tcpstub >> TCP_UpdateEib
                          tcpstub >> TCP_UpdateEib - EIBAID=<39/'9'>
                          tcpstub >> TCP_UpdateEib - EIBRESP=<1>
                          tcpstub >> TCP_UpdateEib - EIBRESP2=<0>
                          tcpstub >> TCP_UpdateEib - EIBRCODE=< >
                          tcpstub >> TCP_UpdateEib >> DONE
                          162459 @................ CTLB1 Fatal Cobol error in tpr 'BCTL ': #Load error : file '.ABEND'#error code: 173, pc=0, call=1, seg=0#173 error message text not found
                          -----> KixProgramReturn(longjump) - STATUS_ABORT
                          > cobcancel <CTLB1>
                          tcpstub >> TCP__SendText
                          FileSelectedRemove (directory:regexp '/tmp':'.*-\[.*]-\[6404]-.*')
                          FileSelectedRemove (directory:/tmp)
                          @BCTL 6242 1209673199 1796424903 1209673499 1796454912


                          I was only running 2 users at a time, and the program is hung.
                          • 10. Re: Tuxedo ART DB Configuration with XA
                            User734086-Oracle
                            Hi,
                            to help diagnose the reason for ABEND, can you provide the details on the versions of Tuxedo and Tuxedo ART for CICS that you are running, as well as details of the environment - OS version, COBOL compiler and its version, database version.

                            Just to check - have you run the data load jobs to prepare and load the data (files or Oracle tables) the sample relies on, and have those completed OK?

                            Mark Rakhmilevich
                            • 11. Re: Tuxedo ART DB Configuration with XA
                              784893
                              Hi,

                              From the error messages you posted, we can see the first error occurs during calling RECEIVE MAP. So could you please do following checks?

                              1. Check your COBOL program. Search the map name in "EXEC CICS RECEIVE MAP()" statement.
                              2. Make sure the map exists and be compiled to "*.mpdef".
                              3. Check "config/resources/mapsets.desc". Make sure that the mapset is defined correctly.

                              After that, please run again and let us know the new result.


                              Thanks,
                              Sophia
                              Tuxedo ART Dev
                              • 12. Re: Tuxedo ART DB Configuration with XA
                                525013
                                Sophia wrote:
                                Hi,

                                From the error messages you posted, we can see the first error occurs during calling RECEIVE MAP. So could you please do following checks?

                                1. Check your COBOL program. Search the map name in "EXEC CICS RECEIVE MAP()" statement.
                                2. Make sure the map exists and be compiled to "*.mpdef".
                                3. Check "config/resources/mapsets.desc". Make sure that the mapset is defined correctly.

                                After that, please run again and let us know the new result.


                                Thanks,
                                Sophia
                                Tuxedo ART Dev
                                Hi, the nature of my program was described in this forum link: Only one instance of my transaction works - CICS ART

                                I have one program in this case CTLB1 which does an EXEC CICS LINK to another pogram. Becasue of the Tuxedo architecture, and the ART dev told me in the prior link, if I want to have two concurrent requests running of this program, I have to run two ARTSTRN servers. So far, I did that and its workiing. My problem is happening when I do a concurrency test. I have been trying to nail down where the problem is. Is it the ARTSTRN server or the database. As of now, I am leaning more towards the ARTSTRN since I can run this program normally with one user fine.

                                Now can you describe to me what happens when two ARTSTRN servers try to access the same resource. In this case my CTLB1 program. Does two copies of the program get loaded in memory when the servers start?

                                As far as the map question. I followed the sample_03 program to create my map coding. In the RSSB00 program, it uses the line "IGNORE CONDITION MAPFAIL" I had to use this method to get my program to work because it was not working only with just a CICS RECEIVE MAP. This seems like a workaround and it should be fixed. I have used this method to work, and sometimes the error does show up, but I get a MAP back with the proper data.

                                I am running this on OEL 5 with the latest version of Tuxedo.

                                Thanks,

                                Edited by: user522010 on May 3, 2012 5:51 AM

                                Edited by: user522010 on May 3, 2012 5:52 AM
                                • 13. Re: Tuxedo ART DB Configuration with XA
                                  784893
                                  user522010 wrote:
                                  Sophia wrote:
                                  Hi,

                                  From the error messages you posted, we can see the first error occurs during calling RECEIVE MAP. So could you please do following checks?

                                  1. Check your COBOL program. Search the map name in "EXEC CICS RECEIVE MAP()" statement.
                                  2. Make sure the map exists and be compiled to "*.mpdef".
                                  3. Check "config/resources/mapsets.desc". Make sure that the mapset is defined correctly.

                                  After that, please run again and let us know the new result.


                                  Thanks,
                                  Sophia
                                  Tuxedo ART Dev
                                  Hi, the nature of my program was described in this forum link: Only one instance of my transaction works - CICS ART

                                  I have one program in this case CTLB1 which does an EXEC CICS LINK to another pogram. Becasue of the Tuxedo architecture, and the ART dev told me in the prior link, if I want to have two concurrent requests running of this program, I have to run two ARTSTRN servers. So far, I did that and its workiing. My problem is happening when I do a concurrency test. I have been trying to nail down where the problem is. Is it the ARTSTRN server or the database. As of now, I am leaning more towards the ARTSTRN since I can run this program normally with one user fine.

                                  Now can you describe to me what happens when two ARTSTRN servers try to access the same resource. In this case my CTLB1 program. Does two copies of the program get loaded in memory when the servers start?

                                  As far as the map question. I followed the sample_03 program to create my map coding. In the RSSB00 program, it uses the line "IGNORE CONDITION MAPFAIL" I had to use this method to get my program to work because it was not working only with just a CICS RECEIVE MAP. This seems like a workaround and it should be fixed. I have used this method to work, and sometimes the error does show up, but I get a MAP back with the proper data.

                                  I am running this on OEL 5 with the latest version of Tuxedo.

                                  Thanks,

                                  Edited by: user522010 on May 3, 2012 5:51 AM

                                  Edited by: user522010 on May 3, 2012 5:52 AM
                                  Hi,

                                  I can confirm that sample03 can successfully perform concurrent transactions. As you described, we run two ARTSTRN servers. Multiple concurrent clients can work correctly. To my understanding, when ARTSTRN starts, it will load all the configuration files, such as tranclasses.desc, transactions.desc, programs.desc, etc. I don't think customer programs are loaded when ARTSTRN starts. When multiple service needs to call the same program, they are in different system processes, which are controlled by COBOL. Only the configuration resources (*.desc) can decide whether and how the concurrent transactions can work.
                                  Thus, for your problem, I still feel it relates to some programming issue. Please reference http://docs.oracle.com/cd/E18050_01/artrt/docs11gr1/cicsref/Architecture.html#wp1098330 for the detail explanation of ARTSTRN. Hope it can help.

                                  Thanks,
                                  Sophia
                                  Tuxedo ART Dev
                                  • 14. Re: Tuxedo ART DB Configuration with XA
                                    525013
                                    Hi Sophia,

                                    Thank you for your test. My case here is described in the prior post. I am talking about one program doing a EXEC CICS LINK to another program. The sample_03 project does not have a case where one program is calling another using EXEC CICS LINK.

                                    I hope that helps.

                                    From what I read on the Tuning your ATMI application page at http://docs.oracle.com/cd/E13161_01/tuxedo/docs10gr3/ada/adtun.html, it talks about you you can use a MSSQ when you are dealing with multiple servers trying to access the same resource. In my case I have 2 ARTSTRN servers running against my program. I did turn on Load Balancing, but I am not sure what other parameters to tune.

                                    At this point I am still having problems with getting two ARTSTRN programs working on my CICS/KIX transaction properly/concurrently even with 2 or more ARTSTRN servers

                                    A bit more info.

                                    When I do a pt in tmadmin:

                                    this is what I get:


                                    index=0 gtrid=x0 x481bb4f1 x1b5a
                                    : Machine id: KIXR, Transaction status: TMGACTIVE
                                    Group count: 1
                                    index=1 gtrid=x0 x481bb4f1 x1b59
                                    : Machine id: KIXR, Transaction status: TMGACTIVE
                                    Group count: 1

                                    and when I do a pq in tmadmin:


                                    Prog Name Queue Name # Serve Wk Queued # Queued Ave. Len Machine

                                    ARTSTRN         QKIX110            4       100         2       1.0       KIXR <---- I have 4 ARTSTRN servers running, but I have never seen a number higher than 100 for Wk Queued, does that mean , I have a bottleneck somewhere, also the 2 Transactions are still waiting/hanging
                                    TMS_ORA GRP02_TMS 2 0 0 0.0 KIXR
                                    BBL 34701 1 0 0 0.0 KIXR
                                    ARTADM 00011.00010 1 0 0 0.0 KIXR
                                    ARTTCPL 00001.00101 1 0 0 0.0 KIXR
                                    ARTCNX QCNX015 1 0 0 0.0 KIXR


                                    So I am bit lost on what is there a transactions on hold even though the queue is quite empty




                                    Thanks,

                                    Edited by: user522010 on May 4, 2012 11:50 AM

                                    Edited by: user522010 on May 4, 2012 11:54 AM

                                    Edited by: user522010 on May 4, 2012 11:58 AM
                                    1 2 Previous Next