Data sharing is the DB2 for z/OS feature that lets several Db2 subsystems — members of one group — read and write the same data with cache coherency and global locking. This page is the vocabulary: member, group, Coupling Facility, SCA, group buffer pools and their duplexing, SCA duplexing, member and group recovery, XES, XCF, CFLEVEL, and the CFRM policy.
Start from a standalone subsystem: one catalog, one set of logs, one IRLM, local buffer pools. Enable data sharing and that subsystem becomes member DB2A in group DSNDB2P (names vary). You add member DB2B on another LPAR. Both open the same table spaces. When they both care about the same page set for update, Db2 uses the Coupling Facility so their local buffers do not lie to them.
1234567Group DSNDB2P group attach DB2P Member DB2A on ZOS1 (MSTR, DBM1, IRLM, DIST, …) Member DB2B on ZOS2 CF structures: DSNDB2P_SCA DSNDB2P_LOCK1 DSNDB2P_GBP0, DSNDB2P_GBP1, …
A member is a full Db2 subsystem: it has a four-character SSID, its own address spaces, its own BSDS and logs, and its own local buffer pool sizes. You START and STOP it independently. DISPLAY GROUP shows ACTIVE, FAILED, or QUIESCED. You can add members for incremental capacity and quiesce them in the off-season. Up to 32 members can belong to one group.
Work can run on any member. CICS, batch, and JDBC usually use the group attach name so they do not care which member is up. Member-unique attach is still used for utilities that must run on a specific member.
The group is the shared identity: one catalog and directory, one set of user databases, one set of CF structure names prefixed by the group name. Commands and binds that have group scope (many DSN BIND subcommands, BACKUP SYSTEM) take effect for every member. Operator commands like START DB2 are still member-scoped — you start DB2A, not “the group” as a single address space.
| Object | Shared? |
|---|---|
| SSID / member name | No — unique per member |
| BSDS and logs | No — each member has its own |
| Catalog and directory | Yes — one set for the group |
| User table spaces | Yes — shared DASD |
| Local buffer pools | No — each DBM1 has its own BPn |
| Group buffer pools | Yes — in the CF |
| SCA and LOCK1 | Yes — one of each per group |
A Coupling Facility is a z/OS CF LPAR (external or integrated) that holds structures. Db2 does not store table spaces in the CF. It stores coherence and locking state and a cache of changed pages. At least two CFs are the HA baseline. CF storage is carved by the CFRM policy, not by CREATE TABLESPACE.
The shared communications area (groupname_SCA) is allocated by ssnmMSTR. It holds member and BSDS names, exception statuses, and recovery information (including indoubt lists) and helps coordinate startup. Without an SCA the group cannot run.
SCA duplexing is system-managed: XES keeps a secondary structure on another CF; Db2 talks to one logical SCA. Use it when the SCA is not failure-isolated from the members (typical ICF-on-same-CEC layouts). If the SCA is on a failure-isolated external CF and rebuild to a second CF works, some shops run SCA simplex. Under-allocate the SCA and exception-state information will not fit — that is an availability bug.
A group buffer pool maps one-for-one to a local buffer pool name: GBP0 for BP0, GBP1 for BP1, and so on. When a page set is GBP-dependent, changed pages go to the GBP and directory entries drive cross-invalidation of local buffers. DBM1 allocates the GBP.
Group buffer pool duplexing is user-managed: Db2 knows there is a primary and a secondary and writes changed pages to both. IBM strongly recommends it. If the primary CF fails, the secondary already has the changed pages. You do not duplex “the catalog” this way — you duplex GBP0, which happens to cache catalog pages when they are GBP-dependent.
One member abends or you STOP it. Others keep running. Restart that member from its BSDS and logs (normal restart recovery). Retained locks in LOCK1 protect its uncommitted changes until restart (or LIGHT restart) completes. This is everyday operations.
SCA and/or LOCK1 are lost and cannot be rebuilt. All members come down. Group restart rebuilds those structures from every member’s log. Started members can peer-restart inactive members by reading their logs, but you should start all non-quiesced members for availability. Group recovery is not RECOVER TABLESPACE and not remote DR.
XCF (cross-system coupling facility) is the z/OS signalling and group membership layer. Sysplex members join XCF groups; D XCF,GROUP shows them. Db2 data sharing sits on that membership.
XES (cross-system extended services) is the programming interface to CF structures: connect, read, write, rebuild, duplex. IRLM uses XES for LOCK1; Db2 uses XES for SCA and GBPs. When people say “XES lock” they mean the CF lock structure path, not a COBOL LOCK TABLE statement.
1234D XCF,GROUP D XCF,STR D XCF,STR,STRNAME=DSNDB2P_SCA -DIS GROUP
CFLEVEL is the CFCC (Coupling Facility Control Code) level. Structure functions — including flavors of duplexing and Auto Alter behavior — require a minimum CFLEVEL. Both CFs in a duplex pair must support the functions you encoded in the policy. After a CF upgrade, confirm CFLEVEL before you assume asynchronous lock duplexing or a new structure option is actually available.
The CFRM policy is the z/OS definition of every structure:
Activate the policy with SETXCF. Db2 cannot invent a GBP that is missing from CFRM. Rebuild uses the current SIZE on the alternate CF; if that CF cannot allocate enough, rebuild fails. Changing SIZE for LOCK1’s lock table may require a rebuild, not just Auto Alter.
Operators also use SETXCF FORCE,STRUCTURE in recovery situations — that is a sharp tool. DISPLAY XCF,STR is the safe everyday view.
A data sharing group is several teachers sharing one classroom library. Each teacher (member) has their own desk and notebook (logs). The hallway whiteboard (SCA) lists who is in today. The lock box (LOCK1) stops two teachers grabbing the same book. The shared fridge (GBP) keeps the latest leftovers. XCF is the school intercom; XES is the rulebook for using the hallway fridge. The CFRM policy is the principal’s poster that says how big the fridge is and which building it lives in. CFLEVEL is the model year of the fridge. If one teacher goes home sick, class continues. If the whiteboard is destroyed and there is no spare, school stops until you rebuild it from everyone’s notebooks.
1. What is a Db2 data sharing member?
2. What does the group attach name do?
3. What is a CFRM policy?
4. XCF versus XES:
5. What is duplexed for GBPs versus SCA?