By default the list of hosts is taken from (in order of search):
You can override this by:
If you are running DB2 Extended Enterprise Edition with multiple database partitions on one host machine, your db2nodes.cfg will contain multiple entries for the same host. In this case, the rah command needs to know whether you want the command to be executed once only on each distinct host or once for each entry in db2nodes.cfg (partitions). Use the rah shellscript to choose hosts. Use the db2_all shellscript to choose partitions.
If you specify hosts, then rah will normally eliminate duplicates from the host list, with the following exceptions:
export DB2NODE=nnnwhere nnn is the nodenumber taken from the first word of the corresponding line in db2nodes.cfg, so that the command will be routed to the desired partition.
When specifying partitions, you can restrict the list of partitions to either all nodes except one single partition or one single partition using the <<-nnn< and <<+nnn< prefix sequences. You may want to do this if you wish to run a command at the Catalog partition first, and when that has completed, run the same command at all other partitions possibly in parallel. This is usually required when running the db2 restart database command. You will need to know the partition number of the Catalog partition to do this.
If you execute this using the rah shellscript, duplicate entries are eliminated from the list of hosts. However if you specify the " prefix, then duplicates are not eliminated since it is assumed that use of the " prefix implies sending to each partition rather than each host.