The WLM_CREATE_MEMBER_SUBSET procedure creates a member
subset database object.
Authorization
One of the following authorizations
is required:
- DBADM authority
- WLMADM authority
Default PUBLIC privilege
None
Syntax
>>-WLM_CREATE_MEMBER_SUBSET--(--subset_name--,--subset_attributes--,--member_list--)-><
The schema is SYSPROC.
Routine parameters
- subset_name
- An input argument of type VARCHAR(128) that specifies the name
of the member subset object to be created. This is a one-part name.
It is an SQL identifier (ordinary or delimited). The name must not
identify a member subset which already exists in the current database
(SQLSTATE 42710). The name must not begin with the characters 'SYS'
(SQLSTATE 42939). This argument cannot be NULL (SQLSTATE 42815).
- subset_attributes
- An input argument of type CLOB(8K) that enables you to specify
one or more member subset attributes. This parameter cannot be NULL
(SQLSTATE 42815). Subset attributes are specified as name value pairs
using the format:
<subset attribute name tag>value</subset attribute name tag>
Each
subset attribute can be specified a maximum of one time (SQLSTATE
42613). Subset attribute names are case sensitive. The subset attribute
values are case insensitive unless otherwise noted. The available
subset attribute name tags are as follows:- '<enabled>value</enabled>'
- Specifies whether this member subset will be considered when a
connection request is assigned to a member subset. This value can
be either "yes" or "no". If not specified it defaults to "yes".
- '<databaseAlias>value</databaseAlias>'
- Specifies a database alias name that a client connection must
connect to in order to be assigned to this member subset. The name
must conform to naming conventions for local database aliases (SQLSTATE
2E000). This attribute is required (SQLSTATE 42815).
- '<catalogDatabaseAlias>value</catalogDatabaseAlias>'
- Specifies whether the procedure should catalog a database alias
if that is one of the specified subset attributes. This value can
be either "yes" or "no". If not specified it defaults to "yes".
If
the value of this attribute is "yes" the database alias specified
in the databaseAlias attribute must not already be cataloged (SQL1005N).
If the value of this attribute is "no" the database alias specified
in the databaseAlias attribute must already be cataloged (SQLSTATE
42705).
- '<memberPriorityBasis>value</memberPriorityBasis>'
- Specifies what information should be used when calculating the
relative member priorities in the member subsets server list. This
value can be either "load" or "equalPriority". If not specified,
it defaults to "load" in a DB2® pureScale®instance
and "equalPriority" in a partitioned database or single member environment.
The
value "load" indicates that the member priorities in the member subsets
server list will be based on the relative load of each member. The
relative load is calculated based on the average CPU load and average
page swap rate. This value can be specified only in a DB2 pureScale instance
(SQLSTATE 530AA).
The value "equalPriority" indicates that the
member priority in the member subsets server list for each active
member will be 100.
- '<inclusiveSubset>value</inclusiveSubset>'
- Specifies whether all members in the instance will be included
in the member subset's server list for high availability (HA) purposes
when no other member of the subset is online. When specified the
value can be either "yes" or "no". If not specified, it defaults
to "yes" in a DB2 pureScale instance
and "no" in a partitioned database or single member environment.
This value can be specified only in a DB2 pureScale instance
(SQLSTATE 530AA).
- '<alternateServer>value</alternateServer>'
- Specifies whether the host name and port cataloged by the UPDATE
ALTERNATE SERVER statement will be included in the member subset's
server list for HA purposes when no other member of the subset is
online. This value can be either "yes" or "no". If not specified,
it defaults to "no".
- member_list
- An
input argument of type VARCHAR(32000) that enables you to specify
a list of members to include in the member subset. This parameter
cannot be NULL (SQLSTATE 42815). The list of members are specified
as comma separated numerical values using the following syntax:
.-,-------------.
V |
>>-(----member-number-+--)-------------------------------------><
Each member number can be specified a maximum of one
time (SQLSTATE 42613). The member number must be defined in the instance
(SQLSTATE 42729).
Usage notes
- As an autonomous procedure, WLM_CREATE_MEMBER_SUBSET executes
in its own transaction scope.
- When WLM_CREATE_MEMBER_SUBSET successfully completes, it will
commit the work performed within the procedure, but if it is unsuccessful,
the procedure rolls back any work performed.
- When a database connection is established, the database manager
looks for a matching member subset based on the database alias subset
attribute. If a matching member subset is found, the connection
is associated with the member subset.
Examples
- Create a member subset in a DB2 pureScale instance
for connections to the database alias PSALIAS. The PSALIAS database
alias does not exist and will be cataloged by the WLM_CREATE_MEMBER_SUBSET
procedure.
CALL SYSPROC.WLM_CREATE_MEMBER_SUBSET(
'PURESCALE_SUBSET',
'<databaseAlias>PSALIAS</databaseAlias>',
'(0, 1)' )
- Create a member subset in a partitioned database environment for
connections to the database alias DPFALIAS. The DPFALIAS database
alias does not exist and will be cataloged by the WLM_CREATE_MEMBER_SUBSET
procedure.
The server list for the member subset is to include
members 100 and 200 only.
CALL SYSPROC.WLM_CREATE_MEMBER_SUBSET(
'DPF_SUBSET',
'<databaseAlias>DPFALIAS</databaseAlias>',
'(100, 200)' )
- Create a member subset in a DB2 pureScale instance
for connections to the database alias OLTPDB. The OLTPDB database
alias exists prior to executing the WLM_CREATE_MEMBER_SUBSET procedure.
The
server list for the member subset is to include members 1 and 2 for
workload balancing usage and all other members for automatic client
rerouting purposes.
CALL SYSPROC.WLM_CREATE_MEMBER_SUBSET(
'OLTP_SUBSET',
'<catalogDatabaseAlias>no</catalogDatabaseAlias>
<databaseAlias>OLTPDB</databaseAlias>',
'(1, 2)' )
- Create a member subset in a DB2 pureScale instance
for connections to the database alias EQUALDB. The EQUALDB database
alias does not exist and will be cataloged by the WLM_CREATE_MEMBER_SUBSET
procedure.
The server list for the member subset is to include members
0 and 1 only. The member priority in the server list are to be equivalent
for all active members.
CALL SYSPROC.WLM_CREATE_MEMBER_SUBSET(
'EQUAL_SUBSET',
'<memberPriorityBasis>equalPriority</memberPriorityBasis>
<inclusiveSubset>no</inclusiveSubset>
<databaseAlias>EQUALDB</databaseAlias>',
'(0, 1)' )