Example of configuring Db2 Connect to access a subset of a data sharing group
When you need to configure Db2 Connect to access a subset of a data sharing group, looking at an example configuration can be helpful.
For this example, three aliases are defined, each of which specifies a subset of the data sharing group.
- Group Location: DB2GROUP1, port: 446
- Location ALIAS 1: ALIAS1, port 5031
- Location ALIAS 2: ALIAS2, port 5032
- Location ALIAS 3: ALIAS3, port 5033
- Each member of the data sharing group with its own member-specific DVIPA
- The group itself with a distributing DVIPA
The sysplex distributor capability of z/OS® Communications Server in a sysplex environment can instantiate a group distributing DVIPA. Also, the group-distributing DVIPA is configured within the sysplex to distribute requests to all servers that are listening on ports 446, 5031, 5032, and 5033. For this example, assume that the group distributing DVIPA has a value of Vgrp, which is a character string that represent an IPv4 or IPv6 address. When using the group distributing DVIPA, you do not need to know the member-specific DVIPAs.
The following configuration statements configure Db2 Connect to connect to any member of the group:
db2 catalog tcpip node grp1node remote Vgrp server 446
db2 catalog dcs db db2grp1 as db2group1 parms ',,,,,sysplex'
db2 catalog db db2grp1 as db2grp1 at node grp1node authentication server
In the preceding configuration statements, a node profile is defined with the group distributing DVIPA, and that node profile is also defined with the group TCP/IP port. You should create additional Db2 Connect node profiles that are configured with the group distributing DVIPA and with each of the locations aliases port values.
The following Db2 Connect configuration statements are required to connect to members of the location aliases:
db2 catalog tcpip node alias1 remote Vgrp server 5031
db2 catalog dcs db alias1 as alias1 parms ',,,,,sysplex'
db2 catalog db alias1 as alias1 at node alias1 authentication server
db2 catalog tcpip node alias2 remote Vgrp server 5032
db2 catalog dcs db alias2 as alias2 parms ',,,,,sysplex'
db2 catalog db alias2 as alias2 at node alias2 authentication server
db2 catalog tcpip node alias3 remote Vgrp server 5033
db2 catalog dcs db alias3 as alias3 parms ',,,,,sysplex'
db2 catalog db alias3 as alias3 at node alias3 authentication server
When the initial connection is successful to a member of the location or the location alias, a list of available member-specific IP addresses is returned to the Db2 Connect server. When the initial connection is made to a location alias, the IP addresses returned are the member-specific alias IP addresses, if they exist. Because the sysplex parameter is specified on each of the dcs db profiles, subsequent connection attempts are made to the servers by using the member-specific DVIPAs that are returned.
If you choose not to use the sysplex distributor but have configured each member of the data sharing group with a member-specific DVIPA, a group-distributing DVIPA is not available to connect to the various members of the data sharing group. If this is how the group was originally configured, you need to create separate domain names in a DNS that represent the entire group (meaning that DVIPAs of the members must be defined in this domain name). Also, each of the aliases that specifies a subset of data sharing member (DVIPAs for only the members that are defined to part of a subsetting location alias can be defined in a particular domain name). Using this configuration, you can substitute Vgrp in the tcpip node profile named grp1node with the domain name that represents the entire group. For each tcpip node profile that is named ALIAS1, ALIAS2, and ALIAS3, you can substitute Vgrp with the domain name that represents each location alias respectively. If you do not use a group distributing DVIPA, Db2 Connect might attempt to connect to an unavailable member of the group or location alias, which will result in a TCP/IP connection failure. A connection failure is not returned to the requesting client until connection attempts to each IP address that is defined in the specified domain name have failed.
You might also choose not to use DVIPAs. This choice causes the domain name entries in the DNS to be populated with an IP address of each system that has a member running on it. If a member moves to another system, you need to manually update the DNS entries.