Adding, altering, or removing members from a member subset

Members can be dynamically added or dropped from a member subset without requiring any application changes.

Before you begin

You must have an existing member subset.

About this task


Restrictions

DBADM or WLMADM authority is required. You cannot alter or drop the last primary member from a member subset.

Procedure

  1. To add, alter or remove a member to the member subset definition use the WLM_ALTER_MEMBER_SUBSET routine, enter:
    CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'subset-name',  subset-attributes, '( add-or-alter-or-drop-member-list )' )
    where:
    • subset-name is the member subset name
    • subset-attributes is NULL
    • add-or-alter-or-drop-member-list is a list of member IDs that exist in the instance, each prefixed with ADD or DROP
    For example, to add member 3 to subset OLTP_SUBSET, enter:
    CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'OLTP_SUBSET',  NULL, '( ADD 3 )' )
    WLM_ALTER_MEMBER_SUBSET is autonomous, so after invoking the routine, there is no need to issue a COMMIT or ROLLBACK command.
  2. Verify that the server list cache for the OLTP_SUBSET subset contains server addresses for each member included in the subset. If the member subset was created in a Db2® pureScale environment and is defined as inclusive then there should be a server address for each member in the cluster that is not in the OLTP_SUBSET subset; each of these addresses should have a reported PRIORITY of 0. The members in the subset with a failover priority greater than 0, should also report PRIORITY of 0.
    SELECT * FROM TABLE
     (MON_GET_SERVERLIST( 'OLTP_SUBSET', -1 ))
     AS SERVER_LIST

Example

Existing member subset OLTP_SUBSET has three existing members (M0, M1, M2). Additional resources are required to handle a higher than average transaction rate which is expected to last for one week. This additional resource requirement is met by providing the application with an additional member. To add more member M3 to subset-name OLTP_SUBSET, enter:
CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'OLTP_SUBSET',  NULL, '( ADD 3 )' )
Member subset OLTP_SUBSET now has four members (M0, M1, M2, M3).
One week later, when the additional member is no longer required, it can be removed from the member subset definition:
CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'OLTP_SUBSET',  NULL, '( DROP 3 )')
Member subset OLTP_SUBSET, once again, has three members (M0, M1, M2).