To create member subsets, use the WLM_CREATE_MEMBER_SUBSET
system routine.
About this task
Restrictions
DBADM
or WLMADM authority is required.
Procedure
To create the member subset:
- Connect to the database. For example:
db2 CONNECT TO BANKDB
- Create the member subset. For example:
CALL SYSPROC.WLM_CREATE_MEMBER_SUBSET('OLTP_SUBSET', '<databaseAlias>OLTP_DB</databaseAlias>', '( 0, 1, 2 )')
where:
- M0, M1, and M2 are members in the DB2® data
server environment.
- OLTP_SUBSET is the name of the member subset.
- OLTP_DB is a database alias name that is not currently cataloged
in the DB2 data server system
database directory.
WLM_CREATE_MEMBER_SUBSET is autonomous, so after invoking the
routine there is no need to issue a COMMIT or ROLLBACK command.
- Validate that the database alias is cataloged in the DB2 data servers system database
directory.
db2 LIST DATABASE DIRECTORY
Verify
that the database alias is listed. For example:
Database alias = OLTP_DB
Database name = BANKDB
- For applications that you want to be assigned to this member
subset, ensure that they are configured to connect to the database
alias OLTP_DB. Ensure that the applications are configured to connect
to the database alias OLTP_DB instead of the database name BANKDB.
- Verify the connection by querying the member subset. This
command must be run from an application that is connected over TCP/IP
to OLTP_DB.
SELECT M.SUBSETNAME
FROM SYSCAT.MEMBERSUBSETS AS M,
TABLE(MON_GET_CONNECTION
(MON_GET_APPLICATION_HANDLE(), -1 ))
AS CONN WHERE M.SUBSETID = CONN.MEMBER_SUBSET_ID
- Verify that the server list cache for the OLTP_SUBSET subset
contains server addresses for each member that is included in the
subset. If the member subset was created in a DB2 pureScale® environment
and is defined as inclusive, 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.
SELECT * FROM TABLE
(MON_GET_SERVERLIST(2))
AS SERVERLIST