Unanswered: Difference between rah and db2_all with example
Could someone please explain the difference between rah and db2_all? I understand that db2_all works on all db partitions and rah works on hosts. However, could you please explain the difference with example? Can db2_all be used if i need to update a db cfg parameter across all db partitions across hosts? In which all scenarios rah command can be used? I couldnt find much info on internet for rah command.
Use rah when you want to run an AIX command on all hostnames (the command will run one time on each hostname).
Use db2_all when you want to run a command on all DB2 partitions.
Realise that a single hostname can run multple DB2-partitions of the same partitioned DB2-instance.
For example if a single hostname hosted 4 DB2-partitions on it, then the db2_all command will run the command four times (one per DB2-partition) on that hostname.
Another example, suppose I had 16 hostnames, each of which had 4 DB2-partitions of the same partitioned-DB2-instance running on them (so 64 DB2-partitions in total). The rah will run a command once on 16 hostnames. The db2_all will run the command 64 times (one per DB2-partition - four times per hostname).
Another example: if I have 8 hostnames , each of which only runs a single DB2-partition of the same partitioned DB2-instance (total 8 DB2-partitions). Then rah and db2_all will both run the command 8 times - once per hostname (and each host runs a single DB2-partition of the same partitioned-DB2-instance).
Thanks for the detailed reply. However, I still couldnt understand when rah should be used. Can you give example of when to use rah? I understand that db2_all can be used if i need to say update a db cfg parameter across all db partitions on all hosts.
Suppose you wanted to change an AIX setting (or a Unix setting) on all hosts - that is to say, alter or query a kernel parameter, or query an operating system log file or run a command that is not directly related to DB2 then you could run rah.