To control the ability of applications that are assigned
to a member subset to access the database, you can enable or disable
member subsets.
Before you begin
You must have an existing member subset.
About this task
By default, a member subset is enabled when created. When
a member subset is disabled, applications that are assigned to the
member subset are not allowed to establish new database connections.
Attempts to establish a new database connection are rejected with
an error.
Existing connections are not effected. If the application is using transaction-level workload
balancing, disabling the application's assigned member subset is a QUIESCE operation. Existing
transactions run to completion. When the Db2® Data Driver attempts
to refresh the connection for new transactions, the connection attempt is rejected with an
error.
Restrictions
DBADM
or WLMADM authority is required.
Procedure
- To block applications that are assigned to a member subset
from accessing the database, use the WLM_ALTER_MEMBER_SUBSET routine
to disable the member subset:
CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'subset-name', 'subset-attributes', '( add-or-drop-member-list )' )
where:
- subset-name is the member subset name.
- subset-attributes is set to '<enabled>no</enabled>'.
- add-or-drop-member-list is NULL.
For example, to disable member subset OLTP_SUBSET, enter:
CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'OLTP_SUBSET', '<enabled>no</enabled>, NULL )
- Validate that the member subset is disabled by attempting
to connect to the member subsets database alias. An error is expected.
- To re-enable the member subset, use the WLM_ALTER_MEMBER_SUBSET routine.
For example, to re-enable member subset OLTP_SUBSET enter:
CALL SYSPROC.WLM_ALTER_MEMBER_SUBSET( 'OLTP_SUBSET', '<enabled>yes</enabled>', NULL )
- Validate that the member subset is enabled by connecting
to the member subsets database alias. The connection succeeds.