Using TSA/db2haicu to automate failover – Part 1: The Preparation

You may also like...

32 Responses

  1. teksyst says:

    How do we configure TSA for multiple instances on a server??

    can you provide sample xml file to configure multiple instances

    • Ember Crooks says:

      Unfortunately, I don’t have any experience to share here. My best guess is that you would run db2haicu as each instance owner. (after doing all your prep work) I have done multiple databases on one instance. I haven’t been using the xml method, though I’ve been thinking lately that I should try it.
      We try very hard to stick to a one database one instance one server setup for our production environments, and while I’ve been also doing HADR/TSA in test environments now and then, usually that is a client that is willing to have separate servers even for test to better mimic prod.

  2. Vijay says:

    I had also run into the similar installation problem on Red Hat 6.3 while installing the version of TSA that is part of the 9.7 FP5, base code cannot be installed because it does not work with Red Hat 6. The TSA team suggested me to install “3.2.1-TIV-ITSAMP-FP0003, Tivoli System Automation for Multiplatforms”. That worked perfectly for me and I was able to install the TSA sucessfully. One more thing, I had to use the license file, sam32.lic , that comes with the DB2 9.7 install media, since the link provided was a fixpack ( no license included ).

    Hope this information would be useful to someone.

  3. Andrej says:

    Hello, I ended with a partial TSA installation , neither ./installSAM nor ./uninstallSAM finish succesfully. The version is bundled with v97fp7 .Can you propose a solution, this is the uninstall log :

    ./uninstallSAM
    /usr/sbin/rsct/bin/lsrsrc-api: 2612-022 A session could not be established with the RMC daemon on “local_node”.
    uninstallSAM: Uninstalling System Automation on platform x86_64
    uninstallSAM: Uninstallin
    sam-3.1.0.6-10046
    uninstallSAM: Error: Failed with return-code 255 : sam-3.1.0.6-10046
    uninstallSAM: Any packages failed uninstallation. See details below
    uninstallSAM: Error: Failed with return-code 255 : sam-3.1.0.6-10046
    error: %postun(sam-3.1.0.6-10046.i386) scriptlet failed, exit status 1

    Uninstalling IBM Tivoli System Automation for Multiplatforms (SA MP) …
    0513-084 There were no records that matched your request.
    0513-084 There were no records that matched your request.
    0513-084 There were no records that matched your request.
    0513-071 The ctrmc Subsystem has been added.
    Cannot add ctrmc to init script structure
    Warning: An error was returned by rmcctrl while attempting to restart the rmc subsystem, exit code=0

    uninstallSAM: No uninstallation was performed

    • Ember Crooks says:

      My first thoughts are to go find a good Linux admin or to open a PMR. I’m sorry I don’t have any good answers on that for you – I have never seen it. If it was AIX, I’d be trying smit to remove it.

    • Kishore says:

      I know my response is too late 🙂 .. But if it can help someone thats great

      I had same issue. I removed /opt/rsct and ran uninstallSAM.. it worked fine

  4. Ben says:

    Benefits of using this over setting up ACR(automatic client reroute)?

    • Ember Crooks says:

      ACR and TSA serve different purposes. ACR does not automate failover in any way – with ACR, you have to have someone manually issue the takeover commands for HADR to failover. The only place you really choose between ACR and TSA is when you choose whether to use a virtual IP or not. Using the virtual IP is easier because not all applications do well with caching an alternate server.

  5. Hi Ember,
    Thanks for this detailed blog. I faced the below issue while installing TSAMP and the prereqSAM failed with this error:

    prereqSAM: Using default prerequisite checking on the following rpm package ‘libstdc++4.-32bit’ ‘x86_64’
    prereqSAM: Error: The rpm package is installed, but the following part was not found ‘libstdc++46-32bit-4.6.9-0.11.38.x86_64
    libstdc++43-32bit-4.6.9-0.11.38.x86_64’ ‘/usr/lib/libstdc++.so.6’

    prereqSAM: Using default prerequisite checking on the following rpm package ‘pam-32bit’
    prereqSAM: rpm package and version installed ‘pam-32bit’

    1 missing package: libstdc++46-32bit

    I struggled for 2 days with it and found the following PMR with IBM:
    https://www.ibm.com/developerworks/community/forums/html/topic?id=e90040ce-2b74-4d80-9b8e-c8d5858adcf3

    So the fix is, install TSAMP with this command and it works fine:
    ./installSAM –noprereqcheck

  6. Rafa says:

    Hi,
    I’ve tried to startup de Cluster on DB2 10.1 with a couple of VM on SUSE 10
    Everthing works fins untl I run db2haicu on the Principal server. The last step

    I receive this error:
    2014-07-23-00.18.24.544869-240 E1380534G352 LEVEL: Error
    PID : 32289 TID : 2858981072 PROC : db2haicu
    INSTANCE: db2inst1 NODE : 000
    HOSTNAME: hadrprin
    FUNCTION: DB2 UDB, high avail services, sqlhaUIMain, probe:900
    MESSAGE : ECF=0x90000530=-1879046864=ECF_SQLHA_NOTINITED
    Library uninitialized error

    The only weird thing I found is that cluster finds 4 NICs when I only have 1 eth0 on each one and the lo.
    I also tried to do it with xml file and I get the same error

    Could be a kind of multipath on Linux?

    Best regards

  7. Kacper says:

    Hi,
    I have a question regarding the usage of Virtual IP. Concerning I have a HADR nodes in different subnets, I am unable to use the Virtual IP. Nevertheless, I need to connect to my HADR database from withing e.g. a script. Shall I for example catalog the DB2 HADR database on a machine running a script? If not, how shall I use the hadr database? thanks

    • Ember Crooks says:

      ACR(automatic client reroute) still works, and can be used in those situations. It is easy to use if you’re using JDBC type 2 or traditional db2 clients. In those situations, all you have to do is to define an alternate server at the DB2 server, and the clients will pick it up on their next database connection. Functionality should be built in to handle failovers. In fact, we still define an alternate server (of the virtual IP) even when using a virtual IP to get that retry functionality.

      If your application is using type 4 JDBC drivers or some other connection methodology, your app may have a place to specify the alternate server manually.

  8. djkapi says:

    I have a problem with additng virutal IP:
    “Cannot create a virtual IP because there are no networks defined for this cluster. Configure the networks before adding virtual IPs.”
    Do you happen to see that error?

    • Ember Crooks says:

      I have not seen that error. When you get it, have you defined at least one network card on each of the primary and the standby through db2haicu?

  9. johnf says:

    Thanks Ember for another informative post.
    How do the resource groups get created/defined ?
    I am troubleshooting current TSA setup but when I run “lsrg” or “lssam” it says
    lsrg: There are no resource groups defined.
    lssam: No resource groups defined or cluster is offline!

    The lsrpdomain and lsrpnode comamnds return valid info.
    Or when I run $ lsrsrc -Ab IBM.ResourceGroup —all I get is..
    Resource Persistent and Dynamic Attributes for IBM.ResourceGroup

    • Ember Crooks says:

      db2haicu defines them when you run db2haicu.

      • johnf says:

        Maybe someone else may find this useful.
        After going down some rabbit holes, we finally got TSA working, the problem we were having stemmed from an invalid license

        /tmp $ samlicm -s
        Error: Product license is invalid and needs to be upgraded.

        Once we added a valid license and followed the setup steps again it worked.

        • jayakrishna says:

          Hi Johnf,
          I am in the same situation.How did you added the license ?let me know on the steps that you followed plese

          • johnf says:

            Hi jayakrishna,

            samlicm -s …to check if you have a valid license
            samlicm -i …to add or install a new license file
            license files were stored in /var/opt/sam/lic

            Hope that helps.

  10. Harsha says:

    Hello, In one of the replies above you have mentioned building TSA on multiple databases under a single instance.
    Did you achieve it using a Single VIP on all DB’s?

    I was wondering how this scenario works?
    Link: http://www-01.ibm.com/support/docview.wss?uid=swg21619478

    • Ember Crooks says:

      I have not. I have gone for separate is for separate databases since that is what is stated as supported, though I do not like it, and would generally prefer the other configuration from a usability standpoint.

  11. Roulet says:

    Hello
    II have configured TSA with multiple instances. The right way is to create one XML file for each instance, and execute db2haicu -d filename.xml with the right instance user.

  12. venkat paga says:

    Hi I am gettting command not found when run preprpnode server1 server2.
    how to resolve this issue.

    • Ember Crooks says:

      You’re running that as root, right? Make sure that TSAMP installed properly when you installed DB2.

  13. Saj says:

    Hello Ember,

    I have to setup TSA for single instance with 3 databases. Please let me me how many VIPs required and which IP whould be given as alternate server details ?

  14. sajna says:

    samlicm -s
    Error: Product license is invalid and needs to be upgraded.
    I have nodelock file inside /var/opt/sam/lic:
    How do I update the license please

  1. April 17, 2012

    […] is my second post in my TSA/db2haicu series. The first porst, Using TSA/db2haicu to automate failover – Part 1: The Preparation, is a must-read before trying anything lined out in this […]

  2. September 4, 2012

    […] area where that’s certainly true. If you’re having problems, literally go through the preparation post line by line on each server and see if you missed anything. Seriously, for any failure prior to […]

  3. January 30, 2013

    […] what you’ll need to set up and test TSA using db2haicu is in my first few posts on the topic: Using TSA/db2haicu to automate failover – Part 1: The Preparation Using TSA/db2haicu to automate failover – Part 2: How it looks if it goes smoothly Using […]

Leave a Reply

Your email address will not be published. Required fields are marked *