DB2 UDB For ZOS - Data Sharing - Planning and Administration
DB2 UDB For ZOS - Data Sharing - Planning and Administration
Version 7
Data Sharing:
Planning and Administration
SC26-9935-06
DB2 DB2 Universal Database for OS/390 and z/OS
®
Version 7
Data Sharing:
Planning and Administration
SC26-9935-06
Note
Before using this information and the product it supports, be sure to read the general
information under “Notices” on page 267.
Contents v
Running utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Using the resource limit facility (governor) . . . . . . . . . . . . . . . . . . . . . . . 183
Improving the response time for read-only queries . . . . . . . . . . . . . . . . . . . . . . 184
Planning for Sysplex query parallelism . . . . . . . . . . . . . . . . . . . . . . . . . 184
Enabling Sysplex query parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Monitoring and tuning parallel queries . . . . . . . . . . . . . . . . . . . . . . . . . 192
Disabling Sysplex query parallelism . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Improving concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Global transaction locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Tuning your use of locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Tuning deadlock and timeout processing . . . . . . . . . . . . . . . . . . . . . . . . 208
Monitoring DB2 locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Changing the size of the lock structure . . . . . . . . . . . . . . . . . . . . . . . . . 216
Tuning group buffer pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Assigning page sets to group buffer pools . . . . . . . . . . . . . . . . . . . . . . . . 219
Inter-DB2 interest and GBP-dependency . . . . . . . . . . . . . . . . . . . . . . . . 221
P-locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Read operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Write operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Group buffer pool thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Monitoring group buffer pools . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Determining the correct size and ratio . . . . . . . . . . . . . . . . . . . . . . . . . 244
Changing group buffer pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Access path selection in a data sharing group . . . . . . . . . . . . . . . . . . . . . . . 254
Effect of member configuration on access path selection . . . . . . . . . . . . . . . . . . . 254
Using EXPLAIN in a data sharing group . . . . . . . . . . . . . . . . . . . . . . . . 255
Appendix B. Summary of changes to DB2 for OS/390 and z/OS Version 7 . . . . . . 261
Enhancements for managing data . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Enhancements for reliability, scalability, and availability . . . . . . . . . . . . . . . . . . . . 261
Easier development and integration of e-business applications . . . . . . . . . . . . . . . . . . 263
Improved connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Features of DB2 for OS/390 and z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Migration considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Programming interface information . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
However, there are many tasks associated with data sharing, especially those of
setting up the hardware and software environment for the Parallel Sysplex®, that
require the use of other product libraries, such as MVS.
For installing DB2, use this book with DB2 Installation Guide to do initial planning
and to develop your installation strategy. Detailed installation procedures are in
DB2 Installation Guide. Exceptions and deviations from those procedures are noted
in this book.
Important
In this version of DB2 for OS/390® and z/OS®, some utility functions are
available as optional products. You must separately order and purchase a
license to such utilities, and discussion of those utility functions in this
publication is not intended to otherwise imply that you have a license to
them.
When referring to a DB2 product other than DB2 for OS/390 and z/OS, this book
uses the product’s full name to avoid ambiguity.
www.ibm.com/software/db2zos/library.html
This Web site has a link to an online reader comment form that you can use to
send comments.
v You can also send comments by using the feedback link at the footer of each
page in the Information Management Software for z/OS Solutions Information
Center at http://publib.boulder.ibm.com/infocenter/db2zhelp.
| For information about the changes to the Version 7 product, see Appendix B,
| “Summary of changes to DB2 for OS/390 and z/OS Version 7,” on page 261.
DB2 subsystems that share data must belong to a DB2 data sharing group, which
runs on a Parallel Sysplex. A Parallel Sysplex is a collection of MVS systems that
communicate and exchange with each other.
Each DB2 subsystem that belongs to a particular data sharing group is a member of
that group. All members of a data sharing group use the same shared DB2 catalog
and directory. Currently, the maximum number of members in a data sharing
group is 32.
Some capabilities described in this book can be used for data sharing or non–data
sharing environments. We use the term data sharing environment to mean a situation
in which a data sharing group has been defined with at least one member. In a
non–data sharing environment, no group is defined.
As Figure 1 on page 2 illustrates, if one subsystem comes down, users can access
their DB2 data from another subsystem. Transaction managers are informed that
DB2 is down and can switch new user work to another DB2 subsystem in the
group.
For unplanned outages, MVS automatic restart manager can automate restart and
recovery.
Data
Figure 1. Data sharing improves availability during outages. If a DB2 or the entire central
processor complex (CPC) comes down, work can be routed to another system.
While DB2’s increased availability has some performance cost, the overhead for
interprocessor communication and caching changed data is minimized. DB2
provides efficient locking and caching mechanisms and uses coupling facility
hardware. A coupling facility is a special logical partition that runs the coupling
facility control program. It provides high-speed caching, list processing, and
locking functions in a Sysplex. The DB2 structures in the coupling facility benefit
from high availability.
Enables scalability
As you move more data processing onto DB2, your processing needs can exceed
the capacity of a single system. This section describes how data sharing relieves
that contraint:
Workload balancing: DB2 data sharing provides flexibility for growth and
workload balancing. Unlike the partitioned data approach to parallelism
(sometimes called the shared-nothing architecture), a one-to-one relationship exists
between a particular database management system (DBMS) and a segment of data.
By contrast, data in a DB2 data sharing environment does not have to be
redistributed when a new subsystem is added or if the workload becomes
unbalanced. The new DB2 member has the same direct access to the data as all
other existing members of the data sharing group.
DB2 works closely with the OS/390 component Workload Manager (WLM) to
ensure that incoming work is optimally balanced across the systems in the cluster.
WLM manages workloads that share system resources and have different priorities
and resource usage characteristics.
Capacity when you need it: A data sharing configuration can handle your peak
loads. You can start data sharing members to handle peak loads (such as end-of-
quarter processing), and then stop them when the peak passes.
CPC 1 CPC 2
DB2A DB2B
Data
Figure 2. Data Sharing Enables Growth. You can move some of your existing DB2 workload
onto another central processor complex (CPC).
Figure 3 on page 5 shows that all members of a data sharing group can participate
in processing a single query.
Partition Number 1 2 3 4 5 6 7 8 9 10
ACCOUNT Table
Figure 3. Query processed in parallel by members of a data sharing group. Different DB2
members process different partitions of the data.
As shown in Figure 4 on page 6, it is possible to have more than one DB2 data
sharing group on the same OS/390 Sysplex. You might, for example, want one
group for testing and another for production data. There is also a single,
non-data-sharing DB2 in this example.
Heavy Light
access access
Operational
data
Operational
data
Cleanse and
denormalize Cleanse and
denormalize
Decision
support
data
Decision
support
data
Light Heavy
access access
CPC CPC CPC CPC
CPC CPC CPC CPC
DB2 DB2 DB2 DB2
DB2 DB2 DB2 DB2
Figure 6. Flexible configurations for decision support. DB2 data sharing lets you configure
your systems in the way that works best with your environment.
If you are unable to maintain that level of separation, or if you have separated
your operational data for other reasons such as security, then using a separate
decision support system is your best option.
Data sharing gives you the flexibility to configure these applications into a single
DB2 data sharing group. It also allows you to maintain a single copy of the shared
You can bind a package or plan on one DB2 subsystem and run that package or
plan on any other DB2 subsystem in a data sharing group.
You define a data sharing group and its members by using the installation and
migration process. See “Creating the DB2 data sharing group” on page 73 for an
overview of this process.
When multiple members of a data sharing group have opened the same table
space, index space, or partition, and at least one of them has opened it for writing,
then the data is said to be of inter-DB2 read/write interest to the members.
(Sometimes we shorten this to inter-DB2 interest.) To control access to data that is of
inter-DB2 interest, whenever the data is changed, DB2 caches it in a storage area
that is called a group buffer pool.
You define group buffer pools by using coupling facility resource management
(CFRM) policies. For more information about these policies, see OS/390 MVS
Setting Up a Sysplex.
As shown in Figure 7 on page 10, a mapping exists between a group buffer pool
and the buffer pools of the group members. For example, each DB2 has a buffer
pool named BP0. For data sharing, you must define a group buffer pool (GBP0) in
the coupling facility that maps to buffer pool BP0. GBP0 is used for caching the
DB2 catalog and directory table spaces and indexes, and any other table spaces,
indexes, or partitions that use buffer pool 0.
Although a single group buffer pool cannot reside in more than one coupling
facility (unless it is duplexed), you can put group buffer pools in more than one
coupling facility.
Hiperpool 0 Hiperpool 0
Virtual buffer Virtual buffer
pool 0 pool 0
Hiperpool 1 Hiperpool 1
Group buffer
Virtual buffer pool 0 Virtual buffer
pool 1 pool 1
Group buffer
Hiperpool n pool 1 Hiperpool n
Virtual buffer Virtual buffer
pool n Group buffer pool n
pool n
Data
Figure 7. Relationship of virtual buffer pools and hiperpools to group buffer pools. There is
one group buffer pool for all buffer pools of the same name.
When you change a particular page of data, DB2 caches that page in the group
buffer pool. The coupling facility invalidates any image of the page in the buffer
pools associated with each member. Then, when a request for that same data is
subsequently made by another DB2, that DB2 looks for the data in the group
buffer pool.
(Duplexing is the ability to write data to two instances of a group buffer pool
structure: a primary group buffer pool and a secondary group buffer pool.)
Because no other DB2 subsystem shares the table at this time, DB2 does not use
data sharing to process for DB2A’s update.
GBP4 GBP4-SEC
Figure 8. Data is read from disk and updated by an application running on DB2A
Next, suppose another application, running on DB2B, needs to update that same
data page (see Figure 9 on page 12). DB2 knows that inter-DB2 interest exists, so
DB2A writes the changed data page to the primary group buffer pool. The write to
the backup group buffer pool, the secondary group buffer pool, is overlapped with
the write to the primary group buffer pool. DB2B then retrieves the data page from
the primary group buffer pool.
GBP4-SEC
Figure 9. DB2B updates the same data page. When DB2B references the page, it gets the
most current version of the data from the primary group buffer pool.
After DB2B updates the data, it moves a copy of the data page into the group
buffer pool (both primary and secondary), and the data page is invalidated in
DB2A’s buffer pool (see Figure 10 on page 13). Cross-invalidation occurs from the
primary group buffer pool.
GBP4-SEC
Figure 10. The updated page is written to the group buffer pool. The data page is invalidated
in DB2A’s buffer pool.
Now, as shown in Figure 11 on page 14, when DB2A needs to read the data, the
data page in its own buffer pool is invalid. Therefore, it reads the latest copy from
the primary group buffer pool.
GBP4 GBP4-SEC
Figure 11. Data is being read from the group buffer pool by DB2A
GBP4-SEC
GBP4
Figure 12. Writing data to disk. There is no direct connection from the coupling facility to disk.
The data must pass through DB2A’s address space before being written to disk.
When a group buffer pool is duplexed, data is not cast out from the secondary
group buffer pool to disk. When a set of pages has been written to disk from the
primary group buffer pool, DB2 deletes those pages from the secondary group
buffer pool.
The originating member’s DB2 catalog is the catalog for the entire group.
Additional members of the group are added as new installations and use the
originating member’s DB2 catalog.
If you have data from existing DB2 subsystems to move into the group, you must
merge their catalog definitions into the catalog used by the data sharing group and
ensure that the data can be physically reached by each member of the data sharing
group. DB2 does not provide a way to merge DB2 catalogs automatically.
Administering a database
Because the DB2 catalog is shared, data definition, authorization, and control is the
same as for non–data sharing. Be sure every object has a unique name, considering
that existing data might be merged into this group. Be sure that the data resides on
shared disks.
In this section, we briefly describe some database administrative tasks and their
special considerations for data sharing.
The GBPCACHE option: Use the GBPCACHE option when you create or alter
table spaces or indexes to define what data, if any, should be cached in the group
buffer pool. The options are NONE, SYSTEM, CHANGED, and ALL, with the
default being CHANGED. See “Tuning group buffer pools” on page 219 for more
information about choosing these options.
Authorizing users
Use the same authorization mechanisms that are in place for non–data sharing DB2
subsystems to control access to shared DB2 data and to the member DB2
subsystem. Because all DB2 subsystems in the group access the same catalog, any
authorization ID has the same granted privileges and authorities in every member
of the group.
As suggested for non–data sharing DB2 subsystems use a security system outside
of DB2 (such as RACF® or its equivalent) to control which user IDs can access a
particular DB2 subsystem. RACF does not recognize an entire data sharing group
Each member of the data sharing group uses the same names for the connection
and sign-on exit routines.We recommend that these routines be shared by all
members of the group to avoid authorization anomalies such as primary
authorization IDs that are treated differently by different members of the group or
are associated with different sets of secondary IDs by different members.
Entering commands
Sysplex technology lets you manage the DB2 data sharing group from consoles
that are attached to a single MVS system or from separate systems. Figure 13
shows how commands are passed from a single MVS system.
Recovering data
DB2 recovers data from information contained in the logs and bootstrap data sets
(BSDSs). However, because updates to any particular table can be logged on many
different DB2 subsystems, DB2 coordinates recovery by using the shared
communications area (SCA) in a coupling facility. The SCA contains the member
names, BSDS data set names, and status information about objects and members in
the group. It is also used to coordinate startup.
The RECOVER utility: You can run the RECOVER utility from any DB2
subsystem in the group. The process for data recovery is basically the same for
DB2 data sharing as it is for non–data sharing DB2 subsystems. However, updates
to a single table space can come from many different DB2 subsystems. Therefore,
to recover that object DB2 must merge log records from those DB2 subsystems,
using a log record sequence number (LRSN). The LRSN is a value derived from the
store clock timestamp and synchronized across the members by the Sysplex Timer.
See “How recovery works in a data sharing group” on page 146 for more
information about recovery.
DB2 uses a process called group restart in the rare event that critical resources in a
coupling facility are lost and cannot be rebuilt. When this happens, all members of
the group terminate abnormally. Group restart rebuilds this lost information from
individual member logs. However, unlike data recovery, this information can be
applied in any order. Because there is no need to merge log records, DB2 can
perform many of the restart phases for individual members in parallel.
Do not use CASTOUT(NO) when you shut down multiple members of a data
sharing group and you need to maintain consistent data on disk. For example, you
shut down all members to get a consistent copy of the databases on disk that you
can copy and send offsite. Do not specify CASTOUT(NO), because some of the
changed data could still reside in the group buffer pools after the members shut
down. Your disk copy might not have all the most recent data.
Hint: Consider specifying NODISCON for the IRLM procedure’s SCOPE option to
allow IRLM to continue doing work while you apply maintenance to DB2. If you
edit the IRLM procedure using the DB2 installation process, specify NO for field
DISCONNECT IRLM? on installation panel DSNTIPJ. There are operational issues
to be considered; see Part 2 of DB2 Installation Guide for more information about
the ramifications of choosing this option.
Applying maintenance to IRLM: Each DB2 has its own IRLM. The set of IRLMs
have their own data sharing group. Similar to DB2, you have to stop and restart
each IRLM in the group to roll the change throughout the group.
IRLM has a concept of a function level to control changes that affect the entire
group. The function level for a particular IRLM member indicates the latest
function that IRLM is capable of running. The group function level is the lowest
function level that exists among the group. The group function level is the function
level at which all IRLMs in the group must run, even if individual members are
capable of running at a later function level.
It is a good idea to keep all members of the group at the same function level. This
ensures that all IRLMs are running with the same maintenance that affects the
entire group. (Maintenance that does not affect the group does not increment the
function level.)
To see the IRLM function levels, use the MODIFY irlmproc,STATUS,ALLI command
of MVS. See “Determining the function level of the IRLM group” on page 91 for
more information.
Software
For the capability of dynamically changing structure sizes, as described in
“Changing structure sizes” on page 51, structures must be allocated in a coupling
facility at CFLEVEL=1 or higher.
For migration considerations, you need to check your coupling facilities to ensure
that the appropriate service levels are installed before migrating the first member
to the latest DB2 subsystem version. Having the wrong service levels installed can
result in data corruption. If you have coupling facilities at CFLEVEL=7, then you
need service level 1.06 or above. If you have coupling facilities at CFLEVEL=8,
then you need service level 1.03 or above. There are no specific service level
requirements for CFLEVELs other than 7 and 8. Use the MVS D CF command to
display the service levels for IBM coupling facilities. You need Apar OW38667 for
R6–R9 for this support.
Group buffer pool duplexing also requires CFLEVEL=5 or higher. See “Duplexing
structures” on page 39 for more information about group buffer pool duplexing.
Group buffer pool checkpoint performs better when a group buffer pool is
allocated in a CFLEVEL=5 coupling facility. Group buffer pool checkpointing is
described in “Group buffer pool checkpoint” on page 235.
# SCA and lock structure duplexing requires z/OS Version 1, Release 2 and
# CFLEVEL=10 or higher. It also requires DB2 Version 7 with APAR PQ45073
# applied, as well as IRLM APAR PQ48823.
Hardware
DB2 data sharing requires a S/390 Parallel Sysplex:
v Central processor complexes (CPCs) that can attach to the coupling facility
v At least one coupling facility and the appropriate channels and channel cards
v At least one Sysplex Timer®
v Connection to shared disk
If you archive the DB2 log to tape, you might need a number of tape units greater
than or equal to the number of DB2 subsystems in the group. These tape units
must be accessible and sharable by the DB2 running a RECOVER utility.
Storage estimates
Installers must estimate the sizes of the various structures in the coupling facility.
See “General information about coupling facility storage” on page 42 for more
information.
If you already have a data sharing group on a release of DB2 previous to Version
7, read this chapter for new information, and see “Migrating an existing data
sharing group to the new release” on page 89.
DB2 uses the XCF for certain intersystem communications. Use both the coupling
facility and channel-to-channel connections for XCF signalling. See OS/390 MVS
Setting Up a Sysplex for more information about configuring the XCF.
Sysplex timer
Install at least one Sysplex Timer in the Sysplex.(For high availability, more than
one is required.)The Sysplex Timer synchronizes the timestamps of the S/390
processors for all DB2 subsystems in the data sharing group. DB2 data sharing
uses a value that is derived from the timestamp (as seen in the log) to recover
data.
Coupling facility
You must install and define at least one coupling facility to MVS before you can
run DB2 with the data sharing function.
Figure 14. Coupling facility structures used by DB2. This is a sample configuration. The lock
structure and SCA do not have to be in the same coupling facility. Individual structures
cannot span coupling facilities.
Define coupling facility structures: Before you use DB2 data sharing, you must
define coupling facility structures. Use MVS’s coupling facility resource
management (CFRM) policies to define these structures to the MVS Sysplex. A
CFRM policy determines how and where the structure resources are allocated.
See OS/390 MVS Setting Up a Sysplex for information about how to create CFRM
and SFM policies.
CF NAME(CF01) TYPE(009674)
MFG(IBM)
PLANT(00)
SEQUENCE(000000040016)
PARTITION(1)
CPCID(00)
DUMPSPACE(1200)
CF NAME(CF02) TYPE(009674)
MFG(IBM)
PLANT(00)
SEQUENCE(000000040029)
PARTITION(1)
CPCID(00)
DUMPSPACE(1200)
//
For DB2, you must know the following characteristics of DB2 coupling facility
structures before you create the policy definitions.:
v Initial size and maximum size (see “General information about coupling facility
storage” on page 42)
The structures can be dynamically resized from INITSIZE up to the value in
SIZE. See “Changing structure sizes” on page 51 for more information.
v Structure names (see “Coupling facility structure names” on page 30)
v Availability characteristics
You must know the preference list (PREFLIST) for rebuilding or reallocating a
structure if the coupling facility fails. See “Coupling facility availability” on page
35 for more information.
See “Rebuilding structures when connectivity is lost” on page 37 for information
about specifying the value for REBUILDPERCENT.
Authorize DB2 to access the structures: Optionally, you can set up a facility class
profile to limit access to the structures in the coupling facility. If you do this,
ensure that DB2 does have access by ensuring that the IDs associated with the DB2
address spaces have alter access authority to the coupling facility structures
through RESOURCE(IXLSTR.structure_name) in SAF class CLASS(FACILITY).
If you do not create a facility class profile, the default allows any authorized user
or program (supervisor state and program key mask allowing key 0-7) to issue
coupling facility macros for the structure.
One detail to remember, especially if you intend to have many DB2 subsystems in
the Sysplex, is that each DB2 and IRLM you define to MVS in the IEFSSNxx
parmlib member requires an MVS system linkage index (LX). The default number
of these indexes that MVS reserves is 165. If you place all your DB2 and IRLM
subsystem definitions in a single IEFSSNxx member, you might need more than
165 LXs to start your subsystems.
If you need more than 165 LXs, use the NSYSLX option on the MVS IEASYSxx
parmlib member to increase this number. See OS/390 MVS Initialization and Tuning
Guide for more information.
Also, all the members’ logs and bootstrap data sets (BSDSs) must be on shared
disks for recovery purposes. A DB2 performing recovery must have access to the
logs of other members in the group.
We strongly recommend that you place work files on shared disks because :
v It is required for processing many types of queries when those queries use
Sysplex query parallelism. Each assisting DB2 writes to its own work file, and
the coordinator can read the results from the assistants’ work files.
v You can create or drop a work file table space from any other member in the
group.
v It keeps DB2 connected to its work file even if you have to restart the DB2 on
another processor.
Make sure that you have physical connectivity by checking the following
connections:
v Verify that there is one user-integrated catalog facility for cataloging DB2 system
data sets and that you can access this catalog from each MVS in the Sysplex.
v Verify connectivity to the following entries from each system on which a DB2
resides:
In this section, we describe the names for which you must choose values. Other
names are generated during DB2 installation. A complete list of names is in
Appendix A, “DB2 and IRLM names,” on page 257. “Naming recommendations”
on page 31 describes a suggested naming convention. We use this naming
convention to describe the names in this section. If you want to change the name
of an existing DB2 subsystem to conform to your naming convention, see
“Renaming the DB2 member” on page 76.
Member names
The following names must be unique within the data sharing group or, in certain
cases, the MVS Sysplex:
Member name
This name can be up to 8 characters long and can consist of the
characters A-Z, 0-9, $, #, and @. This is the name of an individual
member of a particular DB2 group. DB2 uses this name to form its
MVS cross-system coupling facility (XCF) member name. An
example of a member name is DB1G.
Member subsystem name
This name can be up to 4 characters long and is the name used by
all the attachment interfaces. It must be unique within the MVS
Sysplex. We recommend that the member name and member
subsystem name be the same. An example of a member subsystem
name is DB1G.
LU name This name must be unique within the data sharing group and the
network. See Part 3 of DB2 Installation Guide for more information
about choosing LU names.
Member domain name
This name lets DB2 handle indoubt thread resolution for TCP/IP
connections. The name must be registered in the domain name
server and is of the format
luname.location.sysplexname.domainname. The workload manager
Choosing names for data sets: When choosing names for member data sets,
remember that data set names beginning with membname must have a master
catalog alias to point to the catalog where the data sets are cataloged. The DB2
installation process does not create this catalog alias. One way to handle this is to
begin member data set names with catalias and a member-related qualifier. For
example, member data set names could have a form catalias.membname.xxxxx. This
format eliminates the need to have a master catalog alias for membname.
IRLM names
Each DB2 in the data sharing group must have its own IRLM. The IRLM group
name, subsystem name, and member ID are parameters on the IRLM startup
procedure. This means that there must be a separate IRLM procedure for every
IRLM in the group. Figure 16 shows the relationship between DB2 and IRLM
groups and names.
You must choose the following IRLM names before installing DB2:
Group name The name that encompasses the entire IRLM group. This name can
be up to 8 characters long and can consist of the characters A-Z,
0-9, $, #, and @. The group name must begin with an alphabetic
character. To avoid names that IBM uses for its XCF groups, do not
begin with the letters A-I unless the first three characters are DXR.
Do not use the string SYS as the first three characters, and do not
use the string UNDESIG as your group name.
The IRLM group name is a parameter (IRLMGRP=) on each DB2
member’s IRLM procedure. A sample IRLM group name is
DXRDB0G, which is a convention that makes it easy for you to tell
which IRLM group is paired with which DB2 group.
Subsystem name
Each IRLM must have a subsystem name. This name can be up to
4 characters long and is a parameter on the IRLM procedure.
Where GBPxxxx is the name of the group buffer pool, the following restrictions
apply:
v 4 KB group buffer pools are named GBP0, GBP1, ..., GBP49
v 8 KB group buffer pools are named GBP8K0, GBP8K1, ..., GBP8K9
v 16 KB group buffer pools are named GBP16K0, GBP16K1, ..., GBP16K9
v 32 KB group buffer pools are named GBP32K, GBP32K1, ... , GBP32K9
Naming recommendations
You control the names you assign to entities during the DB2 installation process.
After installation, you cannot change some names such as the group name and
member names. Because you must name a large number of items, and you might
have to add new members or move existing members to different systems in the
future, managing all these items is easier if you choose and maintain a consistent
naming convention.
If you are enabling the originating member of the group from an existing DB2, you
can build a naming scheme around the existing names used in your DB2
subsystem to reduce disruption of existing applications. However, before enabling
data sharing, you might want to change some names now to lay the foundation for
a solid naming convention.
Another name to choose carefully is the catalog alias for the group. It is very
difficult to change that name. The procedure to do this for a single system is
documented in Part 2 (Volume 1) of DB2 Administration Guide. To change the
catalog alias for the group, you must bring the entire group down and do the
procedure for every member of the group.
Configuration assumptions
DB2 data sharing naming recommendations and installation process support
assume the following MVS system Sysplex configuration:
v One SYS1.PARMLIB shared by all MVS systems
v One SYS1.PROCLIB shared by all MVS systems
v One integrated catalog facility master catalog shared by all MVS systems
DB2 data sharing does not require that the MVS Sysplex be configured in this
manner. However, the following DB2 naming recommendations support such a
configuration, and the DB2 installation process assumes such a configuration.
If the MVS Sysplex is configured differently, you must customize the install
process. For example, if you use different SYS1.PARMLIBs, make sure that the DB2
data sets are in the APF list in each PARMLIB. If you use different PROCLIBs,
modify the JCL to point to the correct libraries during installation. And if you are
using more than one integrated catalog facility master catalog, put the DB2 catalog
alias in each master catalog.
If you enable an existing DB2 subsystem to take advantage of data sharing and
existing applications use that DB2, consider using the existing subsystem name
for the group attach subsystem name. This lets existing applications use the data
sharing member without changing to a new subsystem name.
v Use the same name for DB2 group name, the DB2 location name, and the DB2
integrated catalog alias.
A data sharing group uses the same catalog alias name. This catalog alias is used
as the high-level qualifier for the DB2 directory (DSNDB01), catalog (DSNDB06),
default database (DSNDB04), and work file database VSAM data sets.
v Use the same name for a member name and the member’s subsystem name.
v For a member’s command prefix, use a hyphen (-) in front of the member’s
subsystem name.
Distributed naming convention: The example in Table 4 does not include names for
distributed processing. Those naming conventions are probably part of a much
broader convention. See your network administrator for more information about
choosing names for distributed access.
# Duplexing the SCA and lock structures, however, is not critical because the
# structures can be rebuilt very quickly from in-memory data. And in most cases, the
# overhead incurred by duplexing the SCA and lock structures outweighs the
# availability benefits of duplexing.
Although a loss of a group buffer pool does not require a group restart, availability
for users and important applications require that data in a group buffer pool be
available as quickly as possible after a failure. Group buffer pools have several
# availability options, depending on the type of failure to occur. As with SCA and
# lock structures, for the highest availability, you can duplex the group buffer pool,
allowing DB2 to switch to the secondary group buffer pool if the primary one fails.
If a simplexed group buffer pool structure fails, the group buffer pool can be
recovered automatically from data on the DB2 logs. If members lose connectivity to
the group buffer pool, the group buffer pool can be rebuilt in another coupling
facility to which the members can connect.
You must install DB2 with a command prefix scope of “started” to take advantage
of automatic restart. See “Registering command prefixes and member group
attachment name” on page 57 for more information.
You can also specify a pattern-matching character (such as DSNDB0G*) if you want
to use a single policy statement for all members in the group.
DB2 startup can be a little faster when you have the automatic restart manager
start IRLM because the activity is done in parallel. DB2 does not have to start
IRLM and wait. To specify that DB2 or IRLM is not to be restarted after a failure,
include RESTART_ATTEMPTS(0) in the policy for that DB2 or IRLM element. For
IRLM, you can also use the following command to indicate that you want to stop
IRLM and to deregister it from automatic restart manager when it comes down.
Deregistering prevents IRLM from automatically restarting after you bring it down:
MODIFY irlmproc,ABEND,NODUMP
However, if your DB2 has YES for the AUTO START option of installation panel
DSNTIPI, and if MVS restarts DB2 automatically, DB2 will restart IRLM, too.
Restart light: Restart light enables DB2 to restart with a minimal storage footprint
to quickly release retained locks and then terminate normally. It is not
recommended for a restart in place, but is recommended for a cross-system restart
in the event of a failed MVS system. It is primarily intended to restart DB2
temporarily on another MVS system that doesn’t have the capacity to sustain a
DB2 and IRLM pair.ARM will not restart this DB2 member again when it comes
down after performing a restart light.
| Policy requirements for restart light: To have DB2 restarted in a “light” mode
| (restart light), you must have an ARM policy for the DB2 group that specifies
| LIGHT(YES) within the RESTART_METHOD(SYSTERM) keyword for the DB2
| element name. For example:
| RESTART_METHOD(SYSTERM,STC,’cmdprfx STA DB2,LIGHT(YES)’)
| If automatic restart manager is enabled for IRLM, the ARM policy for the IRLM
| element name should specify PC=YES within the RESTART_METHOD(SYSTERM)
| keyword for the IRLM element name. PC=YES allows IRLM to obtain the full
| benefits of restart light. For example:
| RESTART_METHOD(SYSTERM,STC,’cmdprfx S irlmproc,PC=YES’)
# With more than one coupling facility, you can also consider duplexing SCA, lock,
# and group buffer pool structures. With duplexing, a secondary structure is always
# on standby in another coupling facility. This secondary structure is ready to take
# over should the primary SCA, lock, or group buffer pool structure fail or if there is
a connectivity failure. If you have three or more coupling facilities, you can even
maintain duplexing while performing maintenance on one of the coupling
facilities. For more information about duplexing, see “Duplexing structures” on
page 39.
# Important: SCA and lock structure duplexing requires z/OS V1R2 or later.
See System/390 MVS Sysplex Hardware and Software Migration for more information
about configuring the coupling facility for high availability.
Quick recovery of the group buffer pools uses information in the lock structure
and SCA to determine which databases must be recovered. This is known as
damage assessment. Consider putting the lock structure and SCA in a coupling
facility that does not contain important cache structures (such as group buffer pool
0). You are less likely to lose the lock structure, SCA, and the group buffer pool at
the same time if you carefully separate coupling facilities.
If you lose the lock structure or SCA at the same time as one or more group buffer
pools, DB2 waits until the lock structure and SCA are rebuilt before doing damage
assessment.
# Important: To enable DB2 to switch to the secondary SCA or lock structure, the
# CFRM policy for the SCA or lock structure must indicate that duplexing is allowed
# and the SCA or lock structure must currently be running in duplexed mode.
Simplexed SCA and lock structure failures: DB2 can rebuild a simplexed SCA
and lock structure in the same coupling facility or in an alternate coupling facility,
assuming:
v You specified the alternate coupling facility in the CFRM policy preference list.
v You allocated enough storage in the alternate coupling facility to rebuild the
structures there.
The information used to recover the SCA and lock structure is contained in DB2’s
virtual storage, not the logs. If the SCA and lock structure cannot be rebuilt, all
active members in the group terminate abnormally, and you must perform a group
restart to recover the information from the logs.
Group buffer pool structure failure: Group buffer pools can be recovered from
the log when they fail, or you can switch to a secondary group buffer pool if the
CFRM policy for the group buffer pool indicates that duplexing is allowed and the
group buffer pool is currently running in duplexed mode.
Recovery from the log can occur manually, as the result of a START DATABASE
command, or it can occur automatically because the group buffer pool is defined
with the AUTOREC(YES) option. In either case, to reduce the time needed for
group buffer pool recovery, use the ALTER GROUPBUFFERPOOL command to
Consider also using DB2’s fast log apply to speed up recovery. To enable fast log
apply, indicate how much ssnmDBM1 storage can be used for the log apply
function on the LOG APPLY STORAGE field of installation panel DSNTIPL.
Be sure to specify one or more alternate coupling facilities in the CFRM preference
list for the group buffer pools because a group buffer pool can be allocated in an
alternative coupling facility when a new connection is made to it. See “Problem:
group buffer pool structure failure (no duplexing)” on page 160 for more
information about group buffer pool structure failures.
For a duplexed group buffer pool, DB2 can use automatic recovery if both
instances of the group buffer pool are damaged. Automatic recovery is not needed
for group buffer pools that are defined as GBPCACHE (NO).
DB2 and MVS interpret a total failure of the coupling facility, such as a power
failure to the coupling facility or some problem with coupling facility control code,
as a connectivity failure. See “Problem: all members have lost connectivity” on
page 157 for more information about recovery from lost connections.
When connectivity is lost, DB2 rebuilds those structures on the alternate coupling
facility that is specified in the CFRM policy. When DB2 rebuilds, it attempts to
| allocate storage on the alternate coupling facility. DB2 uses the current size of the
| structure for the size of the structure on the alternate coupling facility. If DB2
cannot allocate the storage for the SCA or lock structure, the rebuild fails. If MVS
To control when a rebuild can occur, MVS lets you specify a rebuild threshold. The
value is a percentage that you specify in the CFRM policy on the
REBUILDPERCENT parameter. MVS uses the REBUILDPERCENT value in the
CFRM policy to determine whether to initiate a structure rebuild when there is a
loss of connectivity to the coupling facility that contains the structure. The
percentage is based on the SFM weights of all the systems that have active
connectors to a structure at the time. You also specify weights on the SFM policy.
MVS calculates the total system weight of (A) all systems with at least one active
connection to the structure that have lost connectivity, and (B) all systems with at
least one active connection to the structure. If there are multiple connections to a
structure from a single system (for example, two DB2 members on the same MVS),
then that system weight is counted only once.
For example, let us say that a group buffer pool has one connection per MVS
system and all systems are of equal weight (10). If in an eight-system sysplex one
system lost connectivity, then the value of A (total system weight of all systems
containing an active connection that have lost connectivity) is 10, and the value of
B (total system weight of all systems containing an active connection) is 80.
For more information about the volatility options of a coupling facility, see
System/390 9672/9674 System Overview.
Duplexing structures
# Running some or all of the SCA, lock, and group buffer pool structures in duplex
# mode is one way to achieve high availability for these structures across many
types of failures, including lost connections and damaged structures.
# Note: You must duplex both the SCA and lock structures to achieve the availability
# benefits. Duplexing only one of the structures does not provide any benefit.
The other allocation of the structure is called the secondary structure (referred to by
MVS as the new structure). When changed data is written to the primary structure,
it is also written to the secondary structure.
MVS commands let you stop and start duplexing and chose which structure is the
primary structure.
Coupling facility storage considerations for duplexing: When you are planning
# for storage, make secondary and primary structures the same size. Duplexing
usually does not require any additional coupling facility storage beyond that which
# you would use for a highly available simplexed structure. For simplexed
structures, you must reserve enough spare capacity in the coupling facilities to be
able to absorb the structures of any failed coupling facility. For example, if you
have two coupling facilities, each with 1 GB of memory for a total of 2 GB, then
you need to ensure that the total size of the structures across the two coupling
facilities does not exceed 1 GB (50% of the total coupling facility storage). With
duplexing, you are using that previously reserved storage for the secondary
structure, and you would not need to configure extra coupling facility storage for
duplexing in this case. If you have three or more coupling facilities configured,
then you might need additional coupling facility for duplexing.
Requirements
For group buffer pool duplexing to work, the following conditions must be true:
v There must be at least two coupling facilities with a CFLEVEL of 5 or higher in
the CFRM policy preference list for the group buffer pool.
All members of the data sharing group must have physical connectivity to both
coupling facilities in which the primary and secondary structures reside.
If you are going to do automatic reduplexing, you need three coupling facilities
that are physically connected to members of the data sharing group.
v At least one DB2 member must be actively connected to the group buffer pool.
v All connected DB2 subsystems must be running on OS/390 Release 3 or a
subsequent release, with APAR OW28460 applied. (The function is included in
the base for OS/390 Release 6 or subsequent releases.)
v The group buffer pool must be defined with GBPCACHE(YES), the default.
# For SCA and lock structure duplexing to work, the following conditions must be
# true:
# v There must be at least two coupling facilities with a CFLEVEL of 10 or higher in
# the CFRM policy preference list for the structure you want to duplex.
# All members of the data sharing group must have physical connectivity to both
# coupling facilities in which the primary and secondary structures reside.
# If you are going to do automatic reduplexing, you need three coupling facilities
# that are physically connected to members of the data sharing group.
# v At least one DB2 member must be actively connected to the structure you want
# to duplex.
# v All DB2 subsystems must be running on z/OS V1R2 or a subsequent release.
# v All members of the data sharing group must be running DB2 Version 7 or a
# subsequent release, with APAR PQ45073 applied.
# v All DB2 subsystems must be running with IRLM APAR PQ48823 applied.
Configuring duplexing
There are three options on the CFRM policy for duplexing.
Performance of duplexing
The process of establishing duplexing can be somewhat disruptive because access
# to the structure being duplexed is quiesced while the secondary structure is
allocated and, in the case of a group buffer pool, changed pages are copied from
the primary structure to the secondary structure (or cast out to disk). Transactions
# that need access to the structure during this process are suspended until the
process is complete. Because of this disruption, it is best to establish duplexing at a
time of low activity on the system. How long the process takes depends upon how
# many pages are copied to the secondary structure.
In general, it takes a bit more processor and elapsed time to perform duplexed
# structure writes and castout processing than it does to do simplexed structure
writes and castout processing. Workloads that are more update-intensive will
probably experience a slight increase in host CPU usage when duplexing is
activated. In most cases, the majority of the CPU increase will occur in the DB2
address space. Duplexing can cause a slight increase in the transaction elapsed
time. Read performance is unaffected by duplexing.
You will also see an increase in the coupling facility CPU usage in the CF that
contains the secondary structure. You can estimate about how much the CF CPU
usage will increase when you establish duplexing as follows:
1. Determine the amount of CF CPU that the simplexed Primary structure
consumes.
2. Divide the result in half to determine how much CF CPU that the duplexed
Secondary structure will consume.
Duplexing should have little or no impact on the CF CPU usage for the CF
containing the Primary structure.
# The statistics and accounting trace classes contain information about structure
duplexing.
Another possible option for certain cases might be to assign the data to a
GBPCACHE(NO) group buffer pool or define the page set as GBPCACHE NONE.
The performance penalties for this option can be quite high, but certain types of
applications can perform better with this option. See “GBPCACHE NONE” on
page 231 for more information. The coupling facility is still used for
cross-invalidation, so GBPCACHE NONE page sets are affected by coupling
facility failures.
Estimating storage
This section gives you information about estimating storage for coupling facility
structures and for DB2 resources. The following topics are described:
v “General information about coupling facility storage”
v “Group buffer pool sizes” on page 44
v “Lock structure size” on page 49
v “SCA size” on page 51
v “Changing structure sizes” on page 51
v “Estimating a value for the IRLM MAXCSA parameter” on page 52
v “Storage for DB2 objects” on page 54
# For duplexed structures, the SIZE and INITSIZE values apply to both instances of
the structure.
The information given in this section assumes that all page sets in a particular
group buffer pool are defined with the same GBPCACHE attribute. You can put
page sets with different GBPCACHE attributes in the same group buffer pool, but
you must adjust the formulas accordingly.
In general, you should specify a SIZE that is larger than INITSIZE but keep the
SIZE parameter to no more than 2 to 3 times the INITSIZE for the lock and SCA,
and to no more than 4 times the INITSIZE for group buffer pools. For example, if
INITSIZE for a group buffer pool is 100 MB, specify a SIZE of 400 MB or less.
When you decide what your structure sizes are, include those values in the CFRM
policy definition. See OS/390 MVS Setting Up a Sysplex for more information about
creating CFRM policies.
| The new size is recorded across a restart of DB2 and is used for all subsequent
| allocations until one of the following events occurs:
| v A CFRM policy is started, and the policy has a different INITSIZE than what
| was in effect when the size of the structure was dynamically changed with the
| SETXCF START,ALTER command
| v Another SETXCF START,ALTER command is issued to dynamically change the
| size of the structure
| Exception: If a lock structure is deallocated and all the members are down, the
| INITSIZE value is used. This is a consideration for disaster recovery or situations
| For more information on changing structure sizes, see “Changing structure sizes”
| on page 51.
Data pages: Data pages reside in the group buffer pool. The size of a data page is
the same as the page size supported by the corresponding DB2 buffer pools (that
is, 4 KB, 8 KB, 16 KB, or 32 KB).
If you are caching changed data only, you need enough space to cache changed
data plus extra space for pages that are frequently referenced. By caching those
frequently referenced pages in the group buffer pool, you can decrease the amount
of time it takes for any member to refresh that page in its member buffer pool
because you avoid the disk I/O.
If you choose GBPCACHE NONE or SYSTEM, no user data pages are actually
stored in the coupling facility. However, with GBPCACHE SYSTEM, space map
pages for LOBs are cached in the coupling facility.
Directory entries: A directory entry specifies the location and status of a page
image somewhere in the data sharing group, whether the image appears in the
group buffer pool or in one of the member buffer pools. There is only one
directory entry for any given page, no matter how many places that page is
cached.
The size of a directory entry is approximately 200 bytes, but it varies somewhat
based on the size of the data pages and the CFLEVEL you are using. See Enterprise
System/9000 and Enterprise System/3090 Processor Resource/System Manager Planning
Guide for the exact size.
Specifying a ratio: The space allocated for a group buffer pool is divided into two
parts according to the ratio of the number of directory entries to the number of
data pages. When you originally define a structure in the CFRM policy for a group
buffer pool, you specify its total size. For DB2, the ratio defaults to five directory
entries per data page. Later, you can change the ratio with the ALTER
GROUPBUFFERPOOL command. That new value takes effect when the group
buffer pool is rebuilt or reallocated. See “Determining the correct size and ratio” on
page 244 for information about detecting problems with the size and ratio of group
buffer pools.
For group buffer pools defined with GBPCACHE(NO), ratios are ignored because
no data is actually stored in the group buffer pool.
In this section: When possible, both a formula and rules-of-thumb are provided to
help you estimate the initial sizes and ratios of your group buffer pools. (The
exception is for GBPCACHE ALL group buffer pools, for which we provide only a
rule-of-thumb.)
Storage estimate for group buffer pools that cache changed data
The size of a group buffer pool is related to the amount of sharing and the amount
of updating. An estimate must be based on the total amount of member buffer
pool storage multiplied by a percentage based on the amount of update activity. As
data sharing and updating increases, the more pages must be cached in the group
buffer pool and the more directory entries are needed to track inter-DB2 buffering.
Formula: The formula for estimating storage for group buffer pools that cache
changed data is:
Data_entries = U * D * R
Data(MB) = Data_entries * P / 1024
Dir_entries = Data_entries + (U * (VP+HP))
Dir(MB) = 1.1 * Dir_entries * 0.2 / 1024
GBP(MB) = Data(MB) + Dir(MB)
RATIO = Dir_entries / Data_entries
Where:
U A variable related to the estimated degree of data sharing:
1 A high amount of sharing with a lot of update activity
0.7 A moderate amount of sharing with a moderate amount of update
activity
0.5 A low amount of sharing with a low amount of update activity
D The number of data pages written to disk per second for all members,
peak rate. Do not use the number of pages written to the group buffer
pool; it must be a count of distinct pages. To determine this value, use the
field QBSTPWS from IFCID 0002 (the PAGES WRITTEN field of the buffer
pool section of the DB2 PM Statistics report.)
R The average page residency time in the group buffer pool, in seconds. This
value is application-dependent, but you can assume that the typical range
is 30 to 180 seconds. If you have no information about residency time, use
120.
In general, make this value high enough so that when a changed page is
written to the group buffer pool and invalidates local copies of the page in
other DB2 members, the page remains resident in the group buffer pool
long enough for other members to refresh the page from the group buffer
pool if they need to re-reference their local copy of the cross-invalidated
page.
P The page size (4, 8, 16, or 32).
HP The number of data pages defined for the hiperpool (the sum across all the
members).
VP The number of data pages defined for the virtual pool (the sum across all
the members).
0.2 The approximate size of a directory entry, in KB.
1.1 The additional storage needed for coupling facility control structures.
Example: Assume that you have a 2-member data sharing group for which you
have determined the following information:
The above calculation indicates that the group buffer pool should be defined with
an INITSIZE of 324 MB. Use the ALTER GROUPBUFFERPOOL command to
change RATIO to 7.
General rule: For installation planning purposes, you should use the following
general rule as an initial estimate for the size of a DB2 group buffer pool for table
spaces, indexes, or partitions that cache only changed data (GBPCACHE
CHANGED):
Add the local buffer pool storage for this buffer pool number (both virtual and
hiperpool) across all the DB2 subsystems of the group. Then, multiply this amount
by one of these workload factors:
Factor Condition
10% For light sharing with a low amount of updating
20% For medium sharing with a moderate amount of update activity
40% For a high amount of sharing with a lot of update activity
You can run a trace for IFCID 0002 to obtain an estimate of the amount of data
sharing in your system. Calculate the ″degree of data sharing″ by dividing
QBGLGG, the number of get pages for group buffer pool-dependent objects, by
QBSTGET, the number of get pages. A value that is less than 25 percent is
considered to be light data sharing, a value between 25 and 75 percent is medium
data sharing, and a value greater than 75 percent is high data sharing.
Remember that the type of workload you run can influence the amount of storage
used. For example, if you have “hot spots” in which updates to a single page are
frequent rather than spread throughout the table space, then you might need less
storage for caching.
Example: Assume that the total virtual buffer pool storage for all the DB2
subsystems of the group is 400 MB, and you expect a medium amount of
read/write sharing in the environment. The calculation is now:
400 MB x 20% = 80 MB
Factor Condition
50% Few table spaces, indexes, or partitions specify GBPCACHE ALL
75% Half of the table spaces, indexes, or partitions specify GBPCACHE ALL
100% Almost all table spaces, indexes, or partitions specify GBPCACHE ALL for a
high sharing environment
Example: The local virtual buffer pool storage (do not count hiperpool storage) on
all the DB2 subsystems of the group adds up to 200 MB. Half of the page sets
coming into the pool are defined as GBPCACHE ALL. The calculation is now:
If the group buffer pool itself is defined with GBPCACHE(NO), then the ratio is
ignored.
The variables are the same as described in “Formula” on page 45. In summary,
they are:
U The estimated degree of data sharing.
P The page size (4, 8, 16, or 32).
HP The number of data pages defined for the hiperpool (the sum across all the
members).
VP The number of data pages defined for the virtual pool (the sum across all
the members).
Example: Assume that you have a two-member data sharing group for which you
have determined the following information:
v The degree of data sharing is very high (1)
v Member 1 is configured with a virtual pool of 80000 buffers and a hiperpool of
160000 buffers
v Member 2 is configured with a virtual pool of 40000 buffers and a hiperpool of
80000 buffers
The calculation is as follows:
Dir_entries = 1 * (240000 + 120000) = 360000
Dir(MB) = 1.1 * 360000 * 0.2/1024 = 77 MB
GBP(MB) = 77 MB
The above calculation indicates that the group buffer pool should be defined with
an INITSIZE of 77 MB. Use the command ALTER GROUPBUFFERPOOL to change
the GBPCACHE attribute to NO. If you put GBPCACHE NONE page sets in a
GBPCACHE(YES) group buffer pool, then the calculation becomes more
complicated because the RATIO is observed and you are probably going to waste a
lot of space on unneeded data entries.
The variables are the same as described in “Formula” on page 45. In summary,
they are:
U The estimated degree of data sharing.
D The number of data pages written to disk per second for all members,
peak rate. Do not use the number of pages written to the group buffer
pool; it must be a count of distinct pages. To determine this value, use the
field QBSTPWS from IFCID 0002 (the PAGES WRITTEN field of the buffer
pool section of the DB2 PM Statistics report).
10 Estimate of the LOB system pages that are written for every LOB data
page.
P The page size (4, 8, 16, or 32).
R The average page residency time in the group buffer pool in seconds.
HP The number of data pages defined for the hiperpool (the sum across all the
members).
VP The number of data pages defined for the virtual pool (the sum across all
the members).
Example: Assume that you have a two-member data sharing group for which you
have determined the following information:
v The degree of data sharing is moderate (.7)
v There are 10 disk writes per second for across both members, peak rate
v The space map page is resident in the group buffer pool page for 120 seconds
v The page size is 32 KB
v Member 1 is configured with a virtual pool of 20000 buffers and a hiperpool of
70000 buffers
v Member 2 is configured with a virtual pool of 10000 buffers and a hiperpool of
20000 buffers
The calculation is as follows:
Data_entries = ((.7 * 10)/ 10) * 120 = 84
Data(MB) = 84 * 32 / 1024 = 2.6 MB
Dir_entries = 84 + (.7 * (90000 + 30000)) = 84084
Dir(MB) = 1.1 * 84084 * 0.2 / 1024 = 18.6 MB
GBP(MB) = 2.6 MB + 18.6 MB = 21.2 MB
RATIO = MIN (84084 / 84, 255) = 255
The above calculation indicates that the group buffer pool should be defined with
an INITSIZE of 21.2 MB. The ratio is greater than the maximum value, which is
not unusual with GBPCACHE(SYSTEM), so use the command ALTER
GROUPBUFFERPOOL to change the ratio to 255.
Table 6. Formulas for determining R_data and R_de. N is the RATIO entered on the
command ALTER GROUPBUFFERPOOL.
Page Size N has no decimal point N has decimal point
4 KB R_de N N×10
4 KB R_data 1 10
8 KB R_de N N×10
8 KB R_data 2 20
16 KB R_de N N×10
8 KB R_data 4 40
32 KB R_de N N×10
32 KB R_data 8 80
| IRLM reserves 10% of the record table entries for “must complete” functions (such
| as rollback or commit processing) so that a shortage of storage does not cause a
| DB2 subsystem failure. However, if storage runs short in the record table, there can
| be an impact on availability (transactions are terminated), response time, and
| throughput. See “Monitoring DB2 locking” on page 211 and “Changing the size of
| the lock structure” on page 216 for more information.
# By restricting each lock entry to two bytes, you maximize the amount of RLE space
# available from the define structure size. This can help avoid false contention, as
described in “Avoid false contention” on page 205.
# When specifying a value for the LTE= parm in the IRLMPROC, or when issuing
# the irlm MODIFY SET,LTE= command, you should monitor XES contention rates to
determine the optimum value for your normal environment. If the contention rates
# appear too high, then increase the LTE= value to the next power of 2, keeping in
mind that any increase in the size of the lock table will cause a corresponding
decrease in the record table, unless the structure size is also increased. If you have
little contention and want more storage available for record table entries, then
# decrease the LTE= value by a power of two. Anytime the number of lock table
| entries are decreased, it is good to monitor contention rates for a period of time.
| Note: Since the structure allocation is done at CONNECT, any change made to the
# LTE= value does not take affect unless the group is terminated, structure
# forced and the group restarted or a REBUILD is done. Also, the LTE= value
| of the first IRLM to CONNECT dictates the coupling facility attributes used
SCA size
The shared communications area (SCA) is a list structure in the coupling facility
that contains exception information for objects in the database. log data set names,
and BSDS names. You can use the coupling facility structure sizer tool to help you
calculate structure sizes. (See IBM’s S/390 tool’s web site.)Table 8 Table 7 shows
how to estimate the size of the SCA. The SCA size can be specified in 1 KB
increments.
Table 8. Estimating storage for the SCA
Site Size Databases Tables INITSIZE SIZE
Small 50 500 8 MB 16 MB
Medium 200 2000 16 MB 32 MB
Large 400 4000 32 MB 64 MB
Extra Large 600 6000 48 MB 96 MB
Running out of space in the structure can cause DB2 to come down. Because much
of the space in the SCA is taken up with exception information, you reclaim space
by correcting database exception conditions.
MVS attempts to reallocate a new instance of the structure in the same coupling
facility, if that coupling facility has enough storage space. If there is not enough
room, MVS looks at the preference list and uses the alternate coupling facility
specified there. After the space is allocated, DB2 rebuilds the information into the
new structure. Any transactions that need the structure must wait until the rebuild
is complete. It is best to rebuild when other activity in the system is low.
# Important! This function requires that APARs PW68114 and OW50397 are applied.
For data sharing, plan for additional storage to accommodate additional data
sharing locks called P-locks. These locks are held on open page sets and on
database descriptors (DBDs), skeleton cursor tables (SKCTs), and skeleton package
tables (SKPTs). Unlike transaction locks, storage for P-locks is held even when
there is no transaction activity; therefore they consume storage even with no
transaction activity. See “P-locking” on page 225 for more information about
P-locks.
Plan also for extra storage that IRLM needs to build retained locks in case other
members fail. Table 9 on page 53 shows the variables you need to account for.
X = N + (N × .40)
Note: The formula assumes that more than one P-lock might be held on a page set
occasionally (such as for castout activity) and estimates about 40 percent for P-locks on the
EDM pool objects and for short-lived page P-locks. If you know that your EDM pool has
relatively few objects in it, you could use a lower percentage for that value. See Part 5
(Volume 2) of DB2 Administration Guide for more information about estimating the
maximum number of open data sets, or use the value specified for the subsystem parameter
DSMAX.
Y Ability to hold update retained Depends on the update-intensity of
locks for a failed member the workload. Start with the
following:
Y= .25X(I + X)
For example, suppose that your non-data sharing IRLM storage estimate is 5 MB.
If you estimate that this DB2 member could have as many as 8000 open data sets,
you could calculate the IRLM storage as follows:
(8000 × 500) + 1600000 = 5.47 MB
+
1 MB (approximate for retained locks)
+
5 MB (non-data sharing estimate)
-----------------------
Total IRLM storage = 11.47 MB
# For additional guidance in determining the correct setting for the PC parameter,
# see ″IRLM panel 2: DSNTIPJ″ in section 2 of the DB2 Installation Guide
Before you use Sysplex query parallelism, make sure that you have enough ECSA
to handle these messages.
Calculating storage for the assistants: To estimate the amount of extra storage
IRLM requires on an assisting DB2 (any DB2 that receives query work from another
DB2), estimate the number of parallel tasks that can run concurrently on the
assisting DB2, and divide that by the number of members sharing the query work.
Multiply the result by 32 KB to get an estimate of the amount of extra storage
needed on the assistants.
(numbers of queries × max concurrent tasks) ⁄ number of members) × 32 KB
For example, assume you have a data sharing group in which all four members
participate in processing parallel queries. If you have a total of 10 queries
executing concurrently and the highest number of parallel tasks is approximately
40, the calculation is:
(10×40) ⁄ 4 = 100
100×32 KB = 3 MB of extra storage on assistant
To estimate the number of parallel tasks, you can look at EXPLAIN output or
instrumentation records for the concurrent queries.
Calculating storage for the coordinator: Any member that can be a coordinator
needs approximately 200 KB of extra storage for messages that the coordinator
sends to the assistants.
Reducing the storage impact: For CREATE, ALTER, or DROP statements, the
DBD is not modified until a COMMIT is issued. You can significantly reduce the
number of EDM versions by issuing all those SQL statements within a single
COMMIT scope. However, the exclusive lock on the DBD is held until the
COMMIT.
Storage for reusing threads: One of the general recommendations for data
sharing is to reuse threads whenever possible and to bind with the option
RELEASE(DEALLOCATE). Depending on how often your threads get reused, this
bind option can mean more storage is necessary for storing objects used by the
plan. Plan for more EDM pool storage if you use RELEASE(DEALLOCATE) and if
you reuse threads.
After enabling data sharing, disabling data sharing is a very difficult process and
one which should be avoided. See “Disabling and re-enabling data sharing” on
page 104 for more information.
This section describes considerations for planning your move to data sharing:
v “Deciding if merging is the right thing to do” on page 56
v “Connecting IMS and CICS” on page 56
v “Binding plans and packages if you are moving to a new machine” on page 57
v “Registering command prefixes and member group attachment name” on page
57
v “Applications using CICSPlex SM” on page 59
v “Increasing the size of the BSDS” on page 63
v “Increasing the size of the SYSLGRNX table space” on page 63
v “Additional considerations for existing subsystem parameters” on page 64
Merging is a very complicated process. It involves not only the physical problem of
moving data, but also many other management issues, such as:
v Naming conventions for users, plans, packages, databases, tables, views, and so
on
v Authorization techniques
v Backup and recovery conventions
v Availability practices
Before you consider merging existing DB2 subsystems into a single data sharing
group, ask yourself the following question: Why are the subsystems separate now?
For most likely the same reasons that you do not include test and production DB2
subsystems in a single MVS, we do not recommend merging test and production
subsystems into a single data sharing group.
If you try to minimize the number of subsystems because you do not have enough
subsystem recognition characters, then use 8-character command prefixes for relief
instead of merging the subsystems.
If you have two existing subsystems, and each of those subsystems can grow into a
separate group, availability is usually better if you keep those groups separate.
Administration is simpler if you keep the groups split along the same lines as the
users.
Reasons to merge
If the subsystems were split because of capacity constraints only, then merging
might be a good idea, especially if the subsystems already share a common naming
convention.
If the subsystems have or need a lot of common data and use shared read only
data, distributed access, or data replication to handle the problem of sharing the
data, then merging might be a solution. However, this might not be a good
approach if the security needs of the two groups are different. If you try to merge
two subsystems with different security needs, especially if a shared naming
convention is not already in place for those separate subsystems, then merging
them could be difficult.
# When you register the command prefix in parameter library member IEFSSNxx,
you also specify the scope of the prefix. We recommend that you choose a scope of
Started (S), which lets all MVS systems in a single parmlib member IEFSSNxx use
all MVS systems in the Sysplex. It also simplifies the task of moving a DB2 from
one system to another; you can stop DB2 on one MVS and start it up on another.
There is no need to re-IPL the system.
Sample definitions
The following sample definitions might appear in the shared parameter library
SYS1.PARMLIB:
DB1G,DSN3INI,’DSN3EPX,-DB1G,S,DB0G’
DB2G,DSN3INI,’DSN3EPX,-DB2G,S,DB0G’
DB3G,DSN3INI,’DSN3EPX,-DB3G,S,DB0G’
DB4G,DSN3INI,’DSN3EPX,-DB4G,S,DB0G’
With these definitions, you can start DB1G on MVS1, and that DB2 will be the only
one in the Sysplex that can use -DB1G as its command prefix. However, because
the DB2 is registered to MVS with a scope of S, you can stop DB1G and restart it
on another MVS without having to re-IPL any MVS system.
If you want to use multiple-character command prefixes, make sure that your
automation programs can handle multiple-character prefixes in messages before
you change the prefixes.
Even if you have not yet enabled data sharing, the group attachment name is
active after you IPL the system. This is not a problem. Until you are ready to move
to data sharing, we recommend that you continue to specify the DB2 subsystem
name in your TSO and batch jobs. When you are ready to move to data sharing,
you can then change those jobs to specify a group attachment name without the
need for an IPL.
The group attachment name should not be the same as the subsystem names.
How DB2 chooses a subsystem name: When you submit a job on an MVS system,
DB2 treats the name that you specified on the DB2 connection request as either a
subsystem name or a group attachment name. DB2 first assumes that the name is a
subsystem name and attaches to that subsystem if either the following is true:
v The subsystem is started
v The subsystem is not started, and NOGROUP was specified in the DB2
connection request. NOGROUP indicates that group attach processing is not to
be considered. If RETRY was specified in the command, DB2 tries to attach the
subsystem again in 30 seconds. The value of RETRY determines the number of
times that DB2 reattempts to attach.
If no qualifying subsystem is found and either of the following are true, DB2 then
assumes the name on the DB2 connection request is a group attachment name:
v No subsystem with the name in the command is defined.
v A subsystem with that name is not started, the group attachment name is the
same as its subsystem name, and NOGROUP was not specified in the DB2
connection request.
When DB2 assumes that the name is a group attachment name, it:
v Constructs a list of DB2 subsystems that are defined to this MVS.
To create the list, DB2 adds each subsystem when it goes through subsystem
initialization. At IPL time, subsystems are initialized in the order in which they
appear in member IEFSSNxx. If you add a subsystem with the MVS SETSSI
command, that subsystem is added to the list at that time.
v Tries to attach to each subsystem in order of the list until it finds one that is
started on this MVS or reaches the end of the list.
DB2 always attaches to the first one on the list that is started—there is no load
balancing.
When a subsystem and a group attachment name are the same: When you begin
moving to data sharing, ensure that your definitions IEFSSNxxare correct and DB2
connection requests are coded to get the results that you intend, especially when
the group attachment name is the same as a subsystem name. Incorrect definitions
IEFSSNxx might be especially troublesome if you have extinct subsystems that are
still defined but not used. For example, assume you have the following subsystem
definitions on an MVS system:
DB2P,DSN3INI,’DSN3EPX,-DB2P,S’ ←Extinct subsystem
DB1G,DSN3INI,’DSN3EPX,-DB1G,S,DB2P’ ←Active subsystem
The jobs submitted on this MVS try to connect to the name DB2P. DB2 tries to
connect to subsystem DB2P before considering group attachment processing.
However, because DB2P is not started and it lacks a group attachment name, DB2
does not invoke group attachment processing and find DB1G as you might have
intended. To avoid this situation, include the group attachment name in DB2P’s
definition, or remove entry IEFSSNxx for subsystem DB2P if it is obsolete. With
DB2P defined as the group attachment name for subsystem DB2P, DB2 tries to
attach to DB1G after it discovers that DB2P is not started.
The jobs are submitted on this system with a DB2 connection request that specifies
the name DB1G and omits the NOGROUP keyword. DB2 tries to connect to
subsystem DB1G, but does not. Instead, DB2 invokes group attachment processing
and eventually connects to DB3G, the first system with the group attachment name
that is started. You might have intended that the job connect only to DB1G . To
ensure that DB2 connects to subsystem DB1G and no other subsystem, specify
NOGROUP in the DB2 connection request to disable group attachment processing.
Specify the RETRY keyword in the request to indicate the number of times, at
30-second intervals, that DB2 will retry connecting to DB1G.
When both of following conditions are true, the storm drain effect can occur:
v The CICS attachment facility is down.
v You are using INQUIRE EXITPROGRAM to avoid AEY9 abends.
Again, because there hasn’t been an abend, it appears as if work completes rapidly
at that subsystem.
You can write a resource manager interface program exit, XRMIOUT, to avoid the
storm drain effect caused by SQLCODE -904 (resource unavailable). This exit does
not avoid the storm drain problem caused by using INQUIRE EXITPROGRAM to
avoid AEY9 abends.
Using XRMIOUT, you can intercept the return from the resource manager. The exit
can check whether:
v The resource manager is DB2.
v SQLCODE -904 is in the SQL communication area (SQLCA).
If these conditions exist, abend the transaction instead of ending the transaction
normally.
To determine if DB2 is the resource manager, compare 'DSNCSQL' with the value
stored at the address included with the UEPTRUEN parameter passed to
XRMIOUT as shown in Figure 17 on page 61.
For more information about the XRMIOUT exit, see CICS for MVS/ESA
Customization Guide.
That follow-on release also gives you new options on the RCT TYPE=INIT macro
that let you benefit from the INQUIRE EXITPROGRAM without causing the storm
drain effect. Those options are STRTWT=AUTO and STANDBY=SQLCODE. For
more information about these options, see Part 2 of DB2 Installation Guide.
The following alternatives can help solve the order-dependent transaction problem:
Table 10 illustrates the implied hierarchy when using the IMMEDWRI subsystem
parameter and the IMMEDWRITE option of the BIND and REBIND commands.
Table 10. The implied hierarchy of the immediate write option
IMMEDWRITE bind IMMEDWRI subsystem
option parameter Value at run time
NO NO NO
NO PH1 PH1
NO YES YES
PH1 NO PH1.
PH1 PH1 PH1
PH1 YES YES
| YES NO YES
| YES PH1 YES
| YES YES YES
| Note: YES always has precedence whether it is the subsystem parameter or bind option.
You can do this using access method services. To see the definition used for the
BSDSs, see the installation job DSNTIJIN.
To increase the space allocation for SYSLGRNX, use access method services:
1. Stop the table space.
2. Rename the existing SYSLGRNX data set.
3. Define a larger SYSLGRNX data set with the original name.
4. Using only DSN1COPY, copy the contents of the renamed data set into the new
SYSLGRNX data set.
5. Restart the table space.
Be sure to read “Choosing parameters for DB2 members” on page 66 for guidance
on choosing specific subsystem parameters.
Table 11. Data sharing options
If you have this... And you want this... Read this...
No system Version 7, data “Installing a new DB2 data sharing group”
sharing on page 75. (Use this procedure only in
low-risk situations. It is best to migrate to
Version 7 and then enable data sharing.)
A Version 7 The originating “Enabling DB2 data sharing” on page 77.
non-sharing member of a data
subsystem sharing group
One member in the More members in the “Adding a new DB2 data sharing member”
group group on page 79.
Separate DB2 Merged DB2 “Merging existing DB2 data into the group”
subsystems subsystems into a on page 81.
single group
| A Version 6 or Version A Version 7 data “Migrating an existing data sharing group to
| 5 data sharing group sharing group. the new release” on page 89.
If you already have a Version 6 or Version 5 data sharing group, read this chapter
for new information, and see “Migrating an existing data sharing group to the new
release” on page 89.
For information about falling back, see “Falling back and remigrating” on page
102.
For information about disabling data sharing, which is not a recommended course
of action, see “Disabling and re-enabling data sharing” on page 104.
The load module for member parameters is built by job DSNTIJUZ and stored in
the prefix.SDSNEXIT target library. Every member must use a different name for its
parameters’ load module because the prefix.SDSNEXIT target library can be shared
among all members of the data sharing group. The installation process requires
that you provide the name of the load module for a member.
Other parameters must be unique for each member. For example, each DB2
subsystem uses a different BSDS name.
Other recommendations
These parameters can be the same or different on separate members of the group.
Table 14. Recommended parameters
Parameter field name Panel ID Comment
DEALLOC PERIOD DSNTIPA This is the length of time during
which an archive read tape unit
is allowed to remain unused
before it is deallocated. We don’t
recommend archiving to tape. If
you must, however, we
recommend that you specify 0
for this parameter unless you
intend to run all RECOVER jobs
from the same DB2 member.
Specifying a deallocation delay
means that the tape is not
available to any other DB2
members until the deallocation
time expires.
DEFAULT BUFFER POOL FOR DSNTIP1 Specifies the default buffer pool
USER DATA for any table spaces that are
created without a specified
default. For consistent results
when creating objects on
different members, make this
default the same on all members.
DEFAULT BUFFER POOL FOR DSNTIP1 Specifies the default buffer pool
USER INDEXES for any indexes that are created
without a specified default. For
consistent results when creating
objects on different members,
make this default the same on all
members.
Before enabling data sharing, test other major new functions in the release on a
single system, and then build and try a test data sharing group. When you are
ready to begin a move to production, you must avoid having to fall back to the
previous release.
Move to production
When you are ready to move to production:
Sharing libraries also simplifies the tasks of defining a new DB2 member to a data
sharing group. The DB2 member installation process supports sharing of the
libraries.
The JCLLIB statement must follow the JOB statement and precede the first EXEC
statement in the job. You can have DB2 insert this statement in your JCL for you
by entering it on installation panel DSNTIPY.
For more information on the JCLLIB statement, see OS/390 MVS JCL Reference.
OS/390 MVS JCL Reference describes the JCL statements shown above. You can edit
the jobs manually, or you can enter the above statements on installation panel
DSNTIPY and have DB2 insert these statements for you.
Your installation might have other mechanisms for controlling where batch jobs
run, such as by using job classes.
To create a data sharing group, you add one member at a time. The first member
(the originating member) can either be created as a new installation or enabled for
data sharing from an existing Version 7 member. We strongly recommend that you
use Version 7 before enabling data sharing. This allows you to test Version 7
without the additional complexity of defining and tuning coupling facility
structures. In addition, this approach helps you avoid falling back after data
sharing is enabled. See “Migrating an existing data sharing group to the new
release” on page 89 for information to help you plan a move to a data sharing
environment.
However, if you decide to install and immediately enable data sharing on a new
Version 7 member, this new Version 7 member becomes the originating member of
the data sharing group. This member’s DB2 catalog is used as the DB2 catalog for
the data sharing group.
Renaming a member is an activity that you should plan for very carefully. Because
every installation has a different configuration, we cannot guarantee that this
procedure is complete. If you are interested in changing the high level qualifier for
data sets, see the procedure in Part 2 (Volume 1) of DB2 Administration Guide.
In this example procedure, we change the member name for DB2P to DB1G to
conform to the naming convention for data sharing that we use in this publication.
While adding a new DB2 member, you might need to make changes during
installation to allow more XCF groups, or more XCF members per group, or you
might need to ″widen″ the locks in the IRLM lock structure (for example, if it was
initially allocated with seven as the maximum number of users, and the eighth
member needs to join the group).
DB2 does not have an automatic way to “merge” catalogs and resolve naming
conflicts. If you have applications that are currently running on several existing
DB2 subsystems, your migration plan might include procedures for moving the
relevant data and applications from those DB2 subsystems onto one or more of the
group members and for resolving any catalog naming conflicts that result. See
“Merging existing DB2 data into the group” on page 81 for more information
about this.
After you have installed a new data sharing group or enabled an existing
subsystem for data sharing, you can add new data sharing members.
Merging subsystems
If, for some reason, you want to merge existing subsystems, you must do the
following:
1. Choose a subsystem to be the originating member.
2. Move data and data definitions from the other DB2 subsystems to the
originating member.
3. Add those other DB2 subsystems to the group using the new member install
process.
Merging data
If you have an application that is now running on independent DB2 subsystems,
you might decide that it is an application that will work well in a data sharing
group. In that case, you must move the data and merge the catalog definitions for
that application from the independent DB2 subsystems into the data sharing
group. Because those independent DB2 subsystems still exist, you cannot reuse
their subsystem names when installing new members into the data sharing group.
DB2 does not provide an automated way to move catalog definitions from one
DB2 into the catalog of the data sharing group. If you have procedures and tools in
place now to do things such as move applications from test to production, or to
handle merging databases from enterprise reorganizations or mergers, those same
procedures can be used to move applications into the data sharing group.
Figure 18. Sample header page of DSN1PRNT command with the FORMAT option.
Then on the first space map page, or page 1, you will see the following:
# In the header page, HPGOBID is DBID concatenated with OBID. In Figure 18,
# HPGOBID is x’018E0002’, so the DBID is x’018E’, and the OBID is 0002’X. You can
# see that same OBID in the first four segments in the space map page, or bytes five
# and six, following the segment number. The OBID in these four segments needs to
# be modified with the REPAIR utility to match the new OBID in the header page.
# The remaining segments are for the table and do not need to be modified. You can
# see this in Figure 19, which shows that the table OBID is x’0003’.
# If you run DSN1PRNT on pages zero and one, and you do not see the same OBID
# in the space map page as the one listed on the header page, it means that the
# dictionary has not been built yet. If the dictionary is not built, you will only see
# the table segments (segments x’5’ thru x’E’ shown above). If this is the case, you
# can omit this current step.
# X’29’
# X’32’
# X’3B’
# 8 X’20’
# X’2B’
# 12 X’20’
# X’2D’
# 16–64 x’20’
#
#
Testing the data sharing group
When you installed DB2, there were sample objects created in job DSNTEJ1. The
DSNTESD member of prefix.SDSNSAMP contains SQL statements that refer to
these objects. These SQL statements can be used to test group buffer pool caching,
global lock serialization, and concurrency in the data sharing group. Do these tests
after you have installed several data sharing members.
Test concurrency
Use the SQL statements in DSNTESD to test concurrency within the data sharing
group.
1. Run SPUFI concurrently on different data sharing members. Specify
AUTOCOMMIT=YES.
Global locking ensures that inserts to DSN8710.PARTS are coordinated across
data sharing members.
2. Verify that ITEM_COUNT increases by 5 each time the run completes
successfully.
The created installation job creates new parameters for the DB2 member.
A maximum of two different release levels are allowed to coexist in a group at any
one time.
# When running in a data sharing group, each member has a different DBM1
# address space. This means that the DB2 code in the WLM-SPAS will have to match
# more than one DB2 release level. This can cause a problem when you want to use
# a single JCL definition for the procedure name listed in the WLM definition.
# To define one JCL procedure to reference DB2 code data sets at different release
# levels, using a simple data set naming and alias convention. If the procedure
# library is shared throughout the SYSPLEX, this allows for a single JCL definition
# for the Procedure Name listed in the WLM definition.
# In the following example, the DB2SSN parameter is used as a part of the data set
# name in STEPLIB. This allows redirection to a data set name based on the SSN of
# the member that is invoking the Stored Procedure or UDF.
# If one subsystem name is DT21 then the following alias can be used to redirect the
# library name to a release-specific library for that member. This would allow you to
# have a single release-specific library for a data sharing group.
# DSNT2.DT21.SDSNLOAD *ALIAS
# As members are migrated, the ALIAS can be changed to reflect the new release the
# member is running.
Figure 20. DISPLAY GROUP command shows group and member release level
When the function level for the group changes, that change is serialized by IRLM
with lock structure rebuilds. In most cases, however, the lock structure does not
actually do a full rebuild. The first phase of rebuild is enough to quiesce the work
and cause the function level change to occur. These “partial” rebuilds take place
when an IRLM joins or leaves the group and if that activity causes the group
The IRLMs shown in Figure 21 are at group function level 13, which is the lowest
level of any of the individual members (KRLM). The MIN_LEVEL field shows the
minimum level with which this IRLM can coexist. MIN_SERVICE indicates the
service or release that corresponds with that MIN_LEVEL.
Disallowing all binds: You can do the following on the Version 7 member to
avoid automatic rebinds:
v Specify NO on the AUTO BIND field of installation panel DSNTIPO. This
disables all automatic rebinds on the Version 7 member for any reason. This
means that you cannot run a plan or package on a Version 7 subsystem if it has
gone through the following scenario:
1. Bind on Version 7.
2. Run on non-Version 7. This causes an automatic rebind on that non-Version 7
subsystem.
3. Try to run on Version 7. This returns a -908 SQLCODE (SQLSTATE ’23510’)
because DB2 must autobind the plan or package on Version 7 before running
it there.
v Use the resource limit facility to disallow BIND operations. Do this by inserting
rows in the resource limit specification table (RLST) to set RLFFUNC to “1” and
RLFBIND to “N”. This ensures that nobody binds plans or packages on Version
7.
Here is an example of an INSERT statement for the RLST that disallows all
BIND operations for all authorization IDs (except those with installation
SYSADM or installation SYSOPR) for all packages and plans:
INSERT INTO authid.DSNRLSTxx
(RLFFUNC,RLFBIND) VALUES(’1’,’N’);
After all the DB2 members in the data sharing group are running at the current
release, enable automatic rebinds again by setting AUTO BIND=YES, and allow
bind operations by changing the RLST accordingly or by stopping the resource
limit facility using the STOP RLIMIT command.
When all members are at Version 7, you do not need to change the COEXIST
value. The behavior is the same as if you had specified AUTOBIND YES.
If you are migrating from Version 6, the following bind option causes rejection:
v ENCODING for BIND and REBIND PLAN or PACKAGE
If you are migrating from Version 5, the following bind options cause rejection:
v ENCODING for BIND an REBIND PLAN or PACKAGE
v DBPROTOCOL(DRDA) for BIND PLAN or PACKAGE
v DBPROTOCOL (any value) for REBIND PLAN or PACKAGE
v The DYNAMICRULES values of DEFINEBIND, DEFINERUN, INVOKEBIND, or
INVOKERUN for BIND and REBIND PACKAGE
v OPTHINT (non-blank) for BIND PLAN or PACKAGE
v OPTHINT (any value) for REBIND PLAN or PACKAGE
v PATH for BIND and REBIND PLAN or PACKAGE
v PATHDEFAULT for REBIND PLAN or PACKAGE
v REBIND TRIGGER PACKAGE
To avoid problems, make sure the DB2 subsystem named in the DSN subcommand
matches the load libraries that are used for the DSN command.
| The utilities batch program called DSNUTILB is split into multiple load modules: a
| release-independent load module called DSNUTILB, multiple release-dependent
| module DSNUT510, DSNUT610, or DSNUT710, and multiple utility-dependent
| load modules. The utililty-dependent load modules are listed in Appendix E of
| DB2 Utility Guide and Reference. To operate in a mixed-release data sharing
| environment, you must have DSNUT510 (if applicable), DSNUT610 (if applicable),
| DSNUT710, and all utility-dependent load modules and their aliases for the
# utilities which you have purchased, as shown in “Running purchased utilities in
# coexistence mode” on page 95, available to the utility jobs that operate across the
| data sharing group. See “Changing STEPLIB in DSNUPROC” and “Cross-copy into
| load libraries” on page 95 for the instructions on making these load modules
| available.
# The last character in the alias is a ″utility identifier,″ which is used to associate the
# alias with the utility name in the feature. Aliases are used because some utilities
# are shipped in multiple features using that feature’s naming convention. Although
# the names differ, the utilities are identical. For example, the COPY utility that is
# shipped with the OPERATIONAL (JDB771K) feature is named DSNU7OLC and the
# COPY utility that is shipped with the RECOVERY AND DIAGNOSTIC (JDB771M)
# feature is named DSNU7RLC. DSNU7OLC and DSNU7RLC are identical except for
# their names. Notice that the last character in both names (DSNU7OLC and
# DSNU7RLC) is a C. In Table 16 on page 95, you can see that the alias for the COPY
# utility also ends with a C (DSNU71AC).
# Table 17, Table 18, and Table 19 show the new load module names for Version 7.
# Compare the last character in each module name with the aliases in Table 16 on
# page 95 to associate that module with a feature.
# Table 17. Core utility load modules that are shipped with the base
# DSNU7CLA DSNU7CLD DSNU7CLE DSNU7CLI
# DSNU7CLJ DSNU7CLN DSNU7CLO DSNU7CLR
# 7CL indicates Version 7, Core feature, Load module.
#
# Table 18. Load modules that are shipped with the OPERATIONAL (JDB771K) feature
# DSNU7OLC DSNU7OLF DSNU7OLK DSNU7OLL
# DSNU7OLM DSNU7OLP DSNU7OLQ DSNU7OLS
# 7OL indicates Version 7, Operational feature, Load module.
#
# Table 19. Load modules that are shipped with the RECOVERY AND DIAGNOSTIC
# (JDB771M) feature
# DSNU7RLB DSNU7RLC DSNU7RLG DSNU7RLH
# DSNU7RLK DSNU7RLL DSNU7RLT
# 7RL indicates Version 7, Recovery feature, Load module.
#
# You can also reallocate the group buffer pool by stopping and restarting all DB2
# group members using the following procedure:
# 1. Issue STOP DB2 CASTOUT(YES) command for each group member
# 2. Issue START DB2 command for each group member
# This method is more disruptive than using the SETXCF command.
# Once the Name Class Queue support is enabled in a mixed-release data sharing
# group, the following behavior occurs when Delete Name requests are issued:
# v Version 7 members use the Name Class Queues, which improves Delete Name
# performance and reduces coupling facility utilization
# v Version 5 and Version 6 members do not use the Name Class Queues, and
# Delete Name searches the full directory for data set entries that are no longer
# shared.
| Postponed abort transactions and new restrictive status REFP: Refresh pending
| status (REFP) is a new restrictive status in Version 7 for objects that are associated
| with postponed abort transactions and whose backout is not complete. Displaying
| the restrictive status of an object in REFP status from DB2 members at different
| levels produces two different results. The display from a Version 7 member shows
| REFP,RECP states for a table space and REFP, RBDP or REFP, PSRBD for an index
| space. The display from a down-level member shows RECP state for the same
| table space and RBDP or PSRBD for the same index space.
| Only a Version 7 member can access an object with REFP as part of its status. If a
| down-level member attempts to access such an object, DB2 issues resource
| unavailable message DSNT501I with a reason code of 00C900CE.
| Constraint management: You should only create and drop indexes that enforce
| unique key constraints on members that are at the same release level on which the
| unique key constraints were created. For example, if you create a unique key
| constraint on a Version 6 member and the enforcing index on a Version 7 member,
| DB2 does not recognize the index as one that enforces the constraint and leaves the
| table in an incomplete status. To correct this situation, drop the index and create it
| on a Version 6 member.
| You should execute the following SQL statements for a particular table on
| members that are at the same release level:
| v CREATE TABLE PRIMARY KEY
| v CREATE TABLE UNIQUE
| v CREATE UNIQUE INDEX (to enforce the primary key
| v CREATE UNIQUE INDEX (to the unique keys)
| v DROP INDEX (to drop the index that enforces the primary key)
| v DROP INDEX (to drop an index that enforces a unique key)
| v DROP INDEX (to drop an index that enforces a referential constraint)
| v CREATE TABLE FOREIGN KEY
| v ALTER TABLE DROP PRIMARY KEY
| v ALTER TABLE DROP UNIQUE
| v ALTER TABLE DROP FOREIGN KEY
# Duplexed SCA and lock structures: SCA and lock structure duplexing is a new
# feature of DB2 Version 7 and therefore, is not supported for DB2 Version 5 and 6
# members. If you migrate a member of a data sharing group to Version 7 and
# enable SCA and lock structure duplexing, DB2 Version 5 and 6 members are
# prevented from connecting and thus, restarting. You must either migrate all the
# data sharing members to DB2 Version 7 or disable SCA and lock structure
# duplexing before you can restart the DB2 Version 5 and 6 members.
Page sizes: Table spaces that use an 8-KB or 16-KB buffer pool are not available to
Version 5 members. You cannot issue the ALTER or DISPLAY BUFFERPOOL
commands for those buffer pools from a Version 5 system.
Built-in functions: DB2 uses the new CURRENT LOCALE LC_CTYPE special
register when evaluating the TRANSLATE, UPPER, and LOWER scalar functions.
New GBPCACHE options: Table spaces or indexes that are defined with
GBPCACHE NONE or GBPCACHE SYSTEM are not available to Version 5
members. Table spaces that are defined in a buffer pool defined with GBPCACHE
NO are also not available to Version 5 members if they are group buffer
pool–dependent.
TRACKMOD options: If you try to use COPY from a Version 5 member for a table
space defined with TRACKMOD NO, the result will always be a full image copy.
If you change from TRACKMOD NO to TRACKMOD YES and then try to copy
from a Version 5 member, the first copy will be a full image copy.
New resource limit facility columns for predictive governing: If you populate the
new columns in the resource limit facility table, those columns are ignored on a
Version 5 member. There is no predictive governing on a Version 5 members.
Duplexed group buffer pools: Do not start duplexing until all members of the group
are at the level of DB2 and OS/390 code that allows them to be duplex-enabled,
and until the group buffer pool is allocated in a coupling facility with coupling
If any Version 5 members are connected to a group buffer pool, duplexing cannot
start for that group buffer pool until all Version 5 members are disconnected from
the group buffer pool.
The meaning of the ’Q I’ status is slightly different for Version 5 and Version 7
members in the display. For a Version 7 member, it can indicate that postponed
abort URs and indoubt URs are present.
For dynamic statements, hints are only used if the subsystem that the statement is
running on has enabled optimization hints.
Changing partitioning values: You cannot issue the ALTER INDEX statement with
the VALUES clause from a Version 5 member. Also, while a table space has any
partitions in REORG pending, that entire table space cannot be accessed from a
Version 5 member. However, you can run REORG TABLESPACE from the Version
5 member to turn off the REORG pending state and to rebalance the partitions.
Data sets that use extended addressability: The following objects are not available
from a Version 5 member:
v Partitioned table spaces with a DSSIZE greater than 4 GB
v Partitioning indexes for those partitioned table spaces
v Nonpartitioning indexes that are created with a PIECESIZE value greater than 4
GB
Nonpartitioning indexes of greater than 128 pieces: The limit for nonpartitioning
indexes is 254 pieces in Version 7. The limit in Version 5 is 128 pieces. You can
access a nonpartitioning index of more than 128 pieces from a Version 5 subsystem
as long as that nonpartitioning index is not for an EA-enabled table space.
Changing RECOVER INDEX to REBUILD INDEX: In Version 7, you must use the
syntax REBUILD INDEX to build an index from data. RECOVER INDEX is used to
recover an index from an image copy of the index and with log record updates.
Sysplex query parallelism: If a plan or package that uses Sysplex query parallelism
is bound on Version 7, then DB2 will not distribute queries to Version 5
The DB2I CLISTs and sample jobs also get edited for the first member to migrate.
Before migrating to Version 7, you must have the fallback and coexistence SPE
(and its prerequisite APARs) installed on the Version 6 load library. Version 7
members cannot start if any one of the active Version 6 members do not have the
SPE applied. Similarly, if a Version 7 member is started, a Version 6 member
cannot start unless it has the fallback and coexistence SPE applied.
Attention: Follow these directions carefully. The first member of the data sharing
group uses DSNTIDXA as its input member name. Subsequent members must use
a previous member’s output member as its input member name.
Falling back
Although the procedure in this section is described in terms of falling back to
Version 6, the information also applies to falling back to Version 5, with any
differences noted.
Before falling back to Version 6, you must have the fallback and coexistence SPE
and its prerequisite APARs installed on the Version 6 load library. If all members
have already been migrated to the new release, and you are falling back one
member at a time, then after the first member falls back, you are running in
You can do the fallback procedure on one member of the data sharing group at a
time. Other members can continue to run while another member is falling back.
1. If you use MVS’s automatic restart capability and changed the ARM policy for
DB2, IRLM, or both to utilize restart light, remove the added keywords from
the policy. For more information, see “Creating the automatic restart policy”
on page 34.
2. If NOGROUP is used, it should be removed before falling back.
3. If fallback is to Version 5, use the ALTER GROUPBUFFERPOOL command to
redefine GBPCACHE NO group buffer pools to GBPCACHE YES. You need to
redefine only those group buffer pools to which other members are connected.
If you do not alter those group buffer pools to GBPCACHE YES before falling
back, connections receive a resource unavailable condition.
4. Stop DB2 on the member that is falling back. Stop DB2 on all members if you
are falling back all members at once.
5. Reactivate Version 6 code for that member (DSNTIJFV) or all members.
6. Reconnect TSO, IMS, CICS to Version 6.
7. Start Version 6:
a. Enter the command START DB2
1) Check for indoubt units of recovery
2) Check for outstanding restrictive states
8. Verify Version 6.
9. Repeat steps 4 through 8 for each member (or all members) of the data
sharing group.
10. When the last member is falling back, run job DSNTEJ0 to free plans and
packages and drop objects created by the Version 7 sample programs.
Remigrating
You can remigrate each member or all members of a data sharing group. Which
method you choose depends on your situation and environment. See
“Considerations for mixed releases in a data sharing group” on page 89 for more
information. To remigrate members of a data sharing group one at a time or all
together, follow the same procedures in “Falling back” on page 102.
Take special care when the survivor is not the originating member: If you disable
data sharing so that the surviving member is not the originating member, be sure
to complete the following tasks when you fall back:
1. Tailor the DSNTIJFV job to refer to the procedures used by the surviving
member.
Remigrating
If you followed the procedure in “Falling back” on page 102, simply remigrate
each member of the data sharing group as described in Part 2 of DB2 Installation
Guide.
If you followed the procedure in “Falling back and disabling data sharing” on
page 103, remigrate the member as described in Part 2 of DB2 Installation Guide,
and then re-enable data sharing, as described in “Re-enabling data sharing” on
page 107.
After you have disabled data sharing, only one DB2 from the data sharing group
can access the previously shared data. That DB2 is called the surviving member.
You must also ensure that there is no need to recover data from information
contained on other members’ logs after you disable data sharing, as described in
“Data recovery after disabling DB2 data sharing” on page 107. Those logs are not
If you are planning to re-enable data sharing for this group, do not change any
group-wide information in the surviving member’s BSDS. This includes the catalog
alias name and the database password. It also includes the DDF name and
password information, even if you are not going to use DDF when you re-enable.
If you change any of this information, you will have to change that value in every
member’s BSDS before you start the group.
The following output from the original data sharing enabling procedure remains
intact after disabling data sharing and does not need to be recreated or
re-specified:
v Data sharing subsystem parameters (output from the CLIST processing when
enabling data sharing)
v XCF definitions
v Coupling facility definitions
v RACF definitions
v DB2 catalog and directory
The same principle is used to “remove” a member of the group forever. Make sure
a member is quiesced cleanly, and that member can remain dormant forever. In
effect, it is removed from the group.
The BSDS is also needed for group restart. However, if you are confident that logs
for the quiesced member are no longer necessary, because that member has been
quiesced for a long time or is permanently quiesced, it is possible to delete the
BSDS data sets. However during group restart, you must expect the following
message:
DSNR020I -DB2G csect-name START MEMBER DB1G, OR REPLY ’NO’ or QUIESCED’
When you respond with QUIESCED, then DB2 issues the following message:
DSNR030I -DB2G csect-name WILL CONTINUE WITHOUT THE DB1G MEMBER’S LOG,
REPLY ’YES’ OR ’NO’
In summary, you must do one of the following things to ensure that you have
group restart capability:
v Keep the quiesced member’s BSDS data sets (thus avoiding the WTOR messages
above)
v Update your group restart procedure to ensure that operators know how to
respond to the DSNR020I and DSNR030I messages.
A data sharing group can support many more threads than a single DB2
subsystem. The DDF thread limit for a DB2 group is “n × 150000”, where n is the
number of DB2 subsystems in the group. Thus, a group with 16 DB2 members can
support 2400000 DDF threads.
Before reading this chapter: Be sure to read Part 3 of DB2 Installation Guide.
Included in this chapter: The following topics are described in this chapter:
v “An overview of the ways to access a DB2 data sharing group”
v “Defining a DB2 data sharing group in an SNA network” on page 118
v “Defining a DB2 data sharing group in a TCP/IP network” on page 126
v “Excluding a member from processing remote requests” on page 129
v “Using the change log inventory utility to update the BSDS” on page 130
TCP/IP network: TCP/IP is supported only for access using DRDA protocols.
When using TCP/IP, all members of the data sharing group use the same DRDA
port number used to receive incoming SQL requests, but each member must have a
resynchronization port number that is unique within the Sysplex. In the event of a
failure, this unique number allows a client to reconnect to the correct member so
units of work requiring two-phase commit can be resolved.
Clients connect to a data sharing group using a domain name. (It is possible to
connect using an IP address, but this is not recommended because it does not work
if DB2 is restarted on a different CPC.) After a client has connected to a member of
the group the first time, that client receives a list of all eligible members in the data
sharing group and subsequently can connect to any eligible member. This is
functionally equivalent to member routing, but the requester does not have to
Mixed SNA and TCP/IP network: You can have the group send or receive requests
using either or both network protocols. It can receive TCP/IP requests if a DRDA
port and resynchronization port are defined for each member (any member that
does not have this information cannot receive TCP/IP requests). When sending a
request, DB2 uses the LINKNAME column of the SYSIBM.LOCATIONS catalog
table to determine which protocol to use, as shown in Figure 22. If the LINKNAME
value is found in the SYSIBM.IPNAMES table, TCP/IP is used. If it is not, then the
SYSIBM.LUNAMES table is checked. If the value is found in SYSIBM.LUNAMES,
then SNA is used.
Figure 22. The LINKNAME column of SYSIBM.LOCATIONS determines which protocol to use
Attention: A requester cannot connect to a given location using both SNA and
TCP/IP protocols. For example, if SYSIBM.LOCATIONS specifies a LINKNAME of
LU1, and if LU1 is defined in both the SYSIBM.IPNAMES and SYSIBM.LUNAMES
table, TCP/IP is the only protocol that is used to connect to LU1 from this
requester. (TCP/IP is never chosen for access using DB2 private protocol, so it is
possible to switch between SNA and TCP/IP.)
SNA alternatives
A given DB2 subsystem can support both member routing and group-generic, but
only one can be used for a given partner. Use member routing whenever possible.
Requesters outside the DB2 group set up their communications directories to refer
to DB2 by a generic name, and VTAM selects the real DB2 LU name to be used by
the requester. VTAM makes this choice based on the number of active DDF
sessions or the result of a user-written VTAM or MVS workload manager exit
routine.
After a requester is associated with a particular LU in the data sharing group, all
future requests from that requester are sent to the same member of the data
sharing group until all connections between the two LUs are terminated. In
addition, if the connection between the client and server is enabled for two-phase
commit processing, the mapping between the client and data sharing LUs are
preserved until you issue the DB2 command RESET GENERICLU.
Recommendation: Use member routing unless your requester does not support it.
It provides better workload balancing and two-phase connection support.
If you have a model definition like that shown above, and if one of your DB2
subsystems say LUDB2A, fails on MVS1 and is restarted on MVS2, VTAM can use
the above model definition for LUDB2A. For more information about using model
application program definitions, see VTAM for MVS/ESA Network Implementation
Guide.
If the server is not a DB2 subsystem, each DB2 system in the group can send SQL
statements to the server.
DB2 server workload Because DDF is not using any special support for data sharing, you are responsible for
balancing balancing the data sharing group workload. This is achieved by assigning some
number of requesters to each DB2 server in the group. No dynamic workload
balancing can occur.
Reconnection considerations The requester is statically assigned to a single member of the DB2 group. If that
after a communication member of the DB2 group is unavailable, a communication error is returned.
failure
Network definitions at Only a single DB2 LU name must be defined at the requester. You are responsible for
partner site determining which LU name should be used at each requester to achieve acceptable
workload balancing.
For resynchronization, however, each member has its own unique resync port
number, which allows that member to handle outstanding resync requests, even if
the member is started on another CPC.
If you use the VIPA, end users can connect to the VIPA instead of the IP address
associated with any single network controller. If a network controller fails, TCP/IP
can automatically route the user’s data to a different path.
When initializing a TCP stack for use with a VIPA, the PROFILE.TCPIP
configuration should contain the HOME list with the VIPA followed by the
PRIMARYINTERFACE statement pointing at the appropriate VIPA to be used by
DB2. It is not recommended to change the stack’s HOME list or the
PRIMARYINTERFACE while DDF is started. The PRIMARYINTERFACE and the
stack’s HOME list may be changed (via the VARY OBEY command) while the
stack is running without recycling the stack. If a new HOME list is specified
through the VARY OBEY file, the PRIMARYINTERFACE should also be specified.
In OS/390 Release 4, you can specify the PORT statement as follows, which
reserves the DRDA port just for the DB2 DDF address space:
PORT
.
.
.
446 TCP DB1GDIST SHAREPORT
446 TCP DB2GDIST
446 TCP DB3GDIST
446 TCP DB4GDIST
Only one of the DB2 members associated with a given DRDA port number is
selected by TCP/IP to process the incoming requests. However, when
SHAREPORT is specified, TCP/IP will allow multiple listeners to listen on the
same port. As incoming client connections arrive for this port, TCP/IP will
distribute them across the listeners. TCP/IP will select the listener with the least
number of connections (both active and in the backlog) at the time that the
incoming client connection request is received. However, don’t forget to register
each member in the domain name server as described in “Registering names in the
domain name server” on page 127.
The chosen DB2 member receives all of the DRDA server’s workload for that
TCP/IP instance, which leaves the other DB2 members with no TCP/IP server
threads for DRDA. This is transparent to the DRDA clients if the DB2 member
processing the TCP/IP requests doesn’t reach the MAX REMOTE CONNECTED
thread limit. If the MAX REMOTE CONNECTED limit is reached, the connection
request of the DRDA client is rejected.
For more information about setting up the DNS to handle Sysplex domain
workload balancing, see OS/390 eNetwork Communications Server: IP
Configuration.
Recommendation: For the highest availability and workload balancing, use DNS
workload balancing and DRDA Sysplex routing together where possible. Because
the Sysplex routing information is returned only after the first connection is made
to the host, the DNS can be used to route that first connection to an available
member with the most capacity. After that first connection is made, the client can
use DRDA Sysplex routing to choose where subsequent connections are made.
# To achieve the highest level of Web application availability using JTA and JTS
# distributed transactions against a data sharing group, configure the DB2 group and
# each DB2 member to use dynamic VIPA. When the DB2 Universal JDBC Driver
# and WebSphere Application Server act as the transaction manager in a distributed
# transaction system, they require the use of dynamic VIPA to coordinate distributed
# transactions against the DB2 group.
A DB2 requester’s SYSIBM.LOCATIONS table: Now you must map the data
sharing location name to the link name. USIBMSTODB21’s SYSIBM.LOCATIONS
table looks like Table 23.
If you use RACF PassTickets, you need to specify the server’s generic LU name as
the link name. The link name relates rows in SYSIBM.LOCATIONS to rows in
SYSIBM.LUNAMES and is used to build a valid passticket for the data sharing
group. Each server needs to be configured with a generic LU name.
Table 23. A DB2 requester’s LOCATIONS table for member routing. Not all columns are
shown.
LOCATION LINKNAME TPN
DB2A LUGROUP
Use the following SQL statements to associate the LUNAMES of the all members
of the group (LUDB2AR, LUDB2B, and LUDB2C) with DB2A (the location name of
the data sharing group) by creating a new LUNAME (LUGROUP) that is
composed of a list of the real LUNAMES.
INSERT INTO SYSIBM.LULIST
VALUES (’LUGROUP’, ’LUDB2AR’);
To set up the group for group-generic processing, specify the generic LU name on
an installation panel for each member of the group. If the group is to be used as a
server (the most likely configuration) then you must specify Y in column
GENERIC for the data sharing group’s SYSIBM.LUNAMES table entry for
requesters that use the generic name to connect to the group. (A blank LUNAME
will do fine for this purpose.)
You must also include information in the coupling facility for support of VTAM
generic resources (the ISTGENERIC structure). For more information about using
VTAM’s generic resources, see VTAM for MVS/ESA Network Implementation Guide.
To calculate storage for that structure, you also need information from Enterprise
System/9000 and Enterprise System/3090 Processor Resource/System Manager Planning
Guide.
Each member of a data sharing group must choose the same name. The generic LU
name is stored in each member’s BSDS.
If this DB2 is not a member of the data sharing group but is still running as part of
an MVS Sysplex, you can still choose a generic LU name for the DB2. This might
be useful, for example, during a transition when network names are being
changed.
DB2A wants a SYSIBM.LUNAMES table that looks like Table 25. A value of ’Y’ is
inserted into the GENERIC column for all partners that use a generic LU name to
communicate with the data sharing group.
Table 25. The data sharing group’s SYSIBM.LUNAMES table for group-generic processing
LUNAME ... GENERIC
(blanks) Y
The following statement can be used to update the SYSIBM.LUNAMES table of the
data sharing group:
UPDATE SYSIBM.LUNAMES
SET GENERIC=’Y’
WHERE LUNAME=’ ’;
For a DB2 requester, use the generic LU name to access a DB2 data sharing group.
Place the generic LU name of the DB2 group in the LUNAME and LINKNAME
columns of the CDB entries associated with the DB2 group’s location. If you use
the original member’s LU name as the generic LU name, then no changes are
necessary.
For a remote DB2 server, include the generic LU name but also include all the LU
names of all members of the requesting DB2 data sharing group. You can use the
default row (blanks for LUNAME) in the SYSIBM.LUNAMES table as we have
shown here:
Table 26. A remote DB2 server’s SYSIBM.LUNAMES table
LUNAME ... GENERIC
(blank)
Figure 27. Example TCP/IP network configuration. Applications use the location name to direct requests to the group.
The network addresses of the various members of the group are provided in the requester communications definitions.
Use a domain name to simplify this process.
Server definitions
Defining a data sharing group as a TCP/IP server does not require any CDB
definitions.
The network administrator must register the port numbers on the TCP/IP that is
associated with each member’s MVS system.
If you do not use RACF PassTickets, and you have no SNA communication at all,
you can use any name as the link name; the link name relates rows in
SYSIBM.LOCATIONS to rows in SYSIBM.IPNAMES.
Table 27. USIBMSTODB21’s LOCATIONS table. Not all columns are shown.
LOCATION LINKNAME PORT
db2a GENERICLU 446
If you prefer, you can use a case-sensitive service name instead of a hard-coded port
number in the PORT column. This service name is another way to refer to a port
number. For more information, see the customization information for the level of
TCP/IP configuration that you are using.
The DB2 for OS/390 and z/OS requester has a SYSIBM.IPNAMES table that looks
like Table 28.
Table 28. SYSIBM.IPNAMES at the DB2 for OS/390 and z/OS requester. Not all columns
are shown.
LINKNAME SECURITY_OUT USERNAMES IPADDRESS
GENERICLU R blank db2a.sysplex1.ibm.com
# You can also dynamically update the DSN6SYSP macro’s MAXDBAT parameter to
# exclude a member from processing remote requests. By setting the value of this
# parameter to zero, you cause the member to be deregistered from MVS workload
# manager for member routing. Any work already in progress by that member
# continues, but new requests are directed to other members of the data sharing
# group.
If you change the generic LU name or DRDA port for one member of the data
sharing group, you must change it for all members. This requires that you stop
and restart DDF to pick up the change.
See Part 2 of DB2 Utility Guide and Reference for more information about using
DSNJU003.
Entering commands
This section describes the following:
v “Routing commands”
v “Command scope”
v “Entering commands from an application program” on page 132
v “Authorizing commands” on page 132
v “Receiving messages” on page 132
Routing commands
Operations on an individual member of a data sharing group can be controlled
from any MVS console by entering commands prefixed by the appropriate
command prefix. For example, with the appropriate choice of command prefix, you
can start a DB2 statistics trace on member DB1G by entering this command at any
console in the Sysplex:
-DB1G START TRACE (STAT)
This routing of commands requires that the command prefix scope is registered as
S or X on the IEFSSNxx parmlib member. For specifications of command prefixes,
see “Registering command prefixes and member group attachment name” on page
57.
Command scope
The breadth of a command’s impact is called the scope of that command.
Many commands used in a data sharing environment affect only the DB2 for
# which they are issued. For example, a CANCEL THREAD command displays only
those threads that exist for the member identified by the command prefix. Such
commands have member scope.
Authorizing commands
Data sharing does not introduce any new techniques for establishing and checking
authorization IDs. Because all members of a data sharing group share the DB2
catalog, any ID has the same privileges and authorities on every member.
Receiving messages
You can receive messages from all members at a single console. Hence, a message
must include a member identifier as well as a message identifier. The member’s
command prefix appears in messages to identify the source of a message.
Impact of command prefix scope: If DB2 is installed with a command prefix scope
of STARTED (the default and recommended value), you must either issue the
command from the MVS system you want to start DB2 on or route the command
to that MVS. Here is an example of routing the command to the MVS on which
DB1G is to be started:
ROUTE MVS1,-DB1G START DB2
After DB2 is started, all other commands can be issued from any MVS in the
Sysplex, and the commands are routed to the appropriate DB2 subsystem.
Stopping DB2
Stop individual DB2 members using the STOP DB2 command as described in
Chapter 2 of DB2 Command Reference. Consider specifying CASTOUT(NO) when
you stop an individual member of a data sharing group for maintenance. This
option speeds up shutdown because DB2 bypasses castout and associated cleanup
processing in the group buffer pools.
Normal shutdown: Table 29 summarizes the information that you see after a
normal termination:
Table 29. States of structures and connections after normal DB2 termination
Structure Connections Structure
SCA None Allocated
Lock Failed-persistent Allocated
Note: If a given DB2 member has no retained locks, its failed-persistent connection to the
lock structure is removed when it shuts down. If this is the last member to shut down, the
connection remains in a failed-persistent state.
Group buffer pools None with CASTOUT(YES); Unallocated with
Failed-persistent with CASTOUT(YES); Allocated
CASTOUT(NO) with CASTOUT(NO)
Note: If castout failure occurs during shutdown, group buffer pool connections show as
failed-persistent, even though DB2 terminates normally.
Abnormal shutdown: Table 30 summarizes the information that you see after an
abnormal termination:
Table 30. States of structures and connections after abnormal DB2 termination
Structure Connections Structure
SCA None Allocated
Lock Failed-persistent Allocated
Note: If a given DB2 member has no retained locks, its failed-persistent connection to the
lock structure is removed when it shuts down. If this is the last member to shut down, the
connection remains in a failed-persistent state.
# Group buffer pools Failed-persistent Allocated
The group attachment name acts as a generic name for the DB2 subsystems in a
data sharing group. It substitutes for the DB2 subsystem name running on the
MVS from which the job was submitted.
By using the group attachment name, the utility or application does not have to be
sensitive to the particular subsystem, which makes it easier to move jobs around
the Sysplex as needed. The utility or application connects to the first active DB2
| If you do not explicitly specify a subsystem name or group attachment name, DB2
| uses DSN as the name of the intended subsystem. As with any application
program, make sure you are accessing the set of DB2 libraries with the correct
DSNHDECP programming defaults.
Establishing affinity: If you don’t use the group attachment name, the utility job
must run on the MVS system where the specified DB2 subsystem is running. To do
that, you must be sure that MVS runs the utility job on the appropriate MVS
system. There are several MVS installation-specific ways to make sure this
happens. These include:
v For JES2 multi-access spool (MAS) systems, use the following JCL statement:
/*JOBPARM SYSAFF=cccc
Where cccc is the JES2 name. You can specify an asterisk (SYSAFF=*) to indicate
that the job should run on the system from which it was submitted.
v For JES3 systems, use the following JCL statement:
//*MAIN SYSTEM=(main-name)
Where main-name is the JES3 name.
OS/390 MVS JCL Reference describes the above JCL statements. Your installation
might have other mechanisms for controlling where batch jobs run, such as by
using job classes.
You can restart a utility on any member, but that member must be able to access
all required data sets. We recommend that you define all work data sets used by
utilities on shared disks. Use the same utility (UID) to restart the utility. That UID
is unique within a data sharing group. However, if a DB2 fails while a utility is
executing, you must restart that DB2 on either the same or another MVS before
restarting the utility.
In a data sharing environment, if a table space has inter-system R/W interest, then
its most recently updated pages might be in the coupling facility and a stand-alone
utility might not be running with current data. If it is important that the data is in
a consistent state, then you must stop or quiesce the table space. Also, the data
must not be in the RECP or GRECP status nor have any logical page list (LPL)
entries. Use DISPLAY DATABASE with the RESTRICT option to find out if there
are exception statuses for a given table space or index.
The section on monitoring databases includes information about the logical page
list and how to clear entries from that list. It also includes information about
detecting retained locks.
To obtain general information about all members of a particular group, use the
DISPLAY GROUP command, shown here:
-DB1G DISPLAY GROUP
D XCF,STR
IXC359I 15.57.52 DISPLAY XCF
STRNAME ALLOCATION TIME STATUS
DSNCAT_GBP0 04/09/1999 15:57:47 DUPLEXING REBUILD NEW STRUCTURE
DUPLEXING REBUILD
REBUILD PHASE: DUPLEX ESTABLISHED
D XCF,STR,STRNAME=DSNCAT_GBP0
IXC360I 11.13.38 DISPLAY XCF
STRNAME: DSNCAT_GBP0
STATUS: REASON SPECIFIED WITH REBUILD START:
OPERATOR INITIATED
DUPLEXING REBUILD
REBUILD PHASE: DUPLEX ESTABLISHED
POLICY SIZE : 32768 K
POLICY INITSIZE: 5000 K
REBUILD PERCENT: N/A
DUPLEX : ALLOWED
PREFERENCE LIST: LF01 CACHE01
EXCLUSION LIST IS EMPTY
Depending on the options you choose for the command, the display output
contains the following information:
v A list of all connections to the group buffer pools. For duplexed group buffer
pools, there is only one set of connections for both instances of the group buffer
pool. For example, if there are 3 connections to duplexed structure GBP0, there
are just 3 connections, not 6 connections.
See “Using the DISPLAY GROUPBUFFERPOOL command” on page 242 for more
information about the DISPLAY GROUPBUFFERPOOL command.
Monitoring databases
Data sharing introduces the GRECP and LPL statuses. These statuses can appear
on the output from the DISPLAY DATABASE command.
# GRECP “Group buffer pool recovery pending.” The group buffer pool was
# lost, and the changes that are recorded in the log must be applied
to the page set. When a page set is placed in the GRECP state, DB2
sets the starting point for the merge log scan to the LRSN of the
last complete group buffer pool checkpoint.
DB2 automatically recovers GRECP page sets when the group
buffer pool is defined with AUTOREC (YES) and at least one DB2
member was connected when the failure occurred.
LPL “Logical page list”. Some pages were not read from or written to
the group buffer pool because of some failure, such as a channel
failure between the group buffer pool and the processor. Or
perhaps pages could not be read from or written to disk because of
a transient disk problem.
For page sets or partitions that have LPL or GRECP status and aren’t automatically
recovered, either start the page set or partition using the START DATABASE
command with SPACENAM and ACCESS (RW) or (RO), or run the RECOVER
# utility. If any table or index space that is required to confirm START DATABASE
# command authority is unavailable, INSTALL SYSADM might be required to issue
# the command. See DB2 Command Reference for more information about
# authorization requirements. For more information about removing LPL status, see
“Recovering pages on the logical page list” on page 152.
Specific to data sharing, the LPL also contains pages that could not be read or
written for “must-complete” operations, such as a commit or a restart, because of
some problem with the coupling facility. For example, pages can be added if there
is a channel failure to the coupling facility or disk or if locks are held by a failed
subsystem, thus disallowing access to the desired page.
The LPL is kept in the SCA and is thus accessible to all members of the group.
If an application tries to read data from a page that is on the LPL, it receives a
“resource unavailable” SQLCODE. In order to be accessible, pages in the LPL must
first have their logged changes applied to the page set.
To verify the existence of LPL entries, issue the DISPLAY DATABASE command.
The LPL option of DISPLAY DATABASE can then be used to see the specific list of
pages:
-DB1G DIS DB(DSNDB01) SPACENAM(*) LIMIT(*) LPL ONLY
DSNT360I -DB1G
***********************************************************
DSNT361I -DB1G * DISPLAY DATABASE SUMMARY
* GLOBAL LPL
DSNT360I -DB1G
***********************************************************
DSNT362I -DB1G DATABASE = DSNDB01 STATUS = RW
DBD LENGTH = 8000
DSNT397I -DB1G
NAME TYPE PART STATUS LPL PAGES
-------- ---- ---- ------------------ ------------------
DBD01 TS RW,LPL,GRECP 000001,000004,00000C,000010
---- 000039-00003C
SYSLGRNX TS RW,LPL,GRECP 000000-FFFFFF
******* DISPLAY OF DATABASE DSNDB01 ENDED **********************
DSN9022I -DB1G DSNTDDIS ’DISPLAY DATABASE’ NORMAL COMPLETION
If LPL entries exist, LPL recovery begins when you start the table space, index, or
partition by using the START DATABASE command with ACCESS(RW) or
ACCESS(RO).
Physical R/W errors: In previous releases of DB2, physical read and write errors
were recorded in an error page range. This is still the case; however, if a read or
write problem is of undetermined cause, the error is first recorded in the LPL. If
recovery from the LPL is unsuccessful, the error is then recorded on the error page
range.
To determine if there are retained locks, use the DISPLAY DATABASE command
with the LOCKS option as shown here:
-DB1G DISPLAY DATABASE(TESTDB) LOCKS ONLY
You can tell if a lock is retained if there is an R in the LOCKINFO field of the
report, as shown in Figure 32 on page 141.
Figure 32. Output from the DISPLAY DATABASE command with the LOCKS option
Removing retained locks: A normal restart of DB2 resolves and removes retained
locks held by that DB2 with the full data integrity control that DB2 restart
provides. However, if for some reason you cannot get DB2 restarted and the failed
DB2 has retained locks that are severely affecting transactions on other DB2
subsystems consider the following actions:
v Defer the restart processing of the objects that have retained locks.
When you defer restart processing, the pages that locks are protecting are placed
in the logical page list (LPL). Those pages are still inaccessible. However, this
approach still has the advantage of removing any retained page set P-locks,
which have the potential of locking out access to an entire page set. See Part 4
(Volume 1) of DB2 Administration Guide for more information about deferred
restart.
v Cold start the failed member.
This approach causes DB2 to purge the retained locks, but data integrity is not
protected. When the locks are released after the cold start, DB2 will be looking
at data whose status is unclear. See “Restarting a DB2 member with conditions”
on page 174 for more information about how to do this.
# v Use the command, MODIFY irlmproc,PURGE.
# Like a cold start, this command causes DB2 to purge the retained locks. And
# also like a cold start, with this method, data integrity is not protected. See Part
# 3 of DB2 Command Reference for more information about MODIFY irlmproc,PURGE.
| v Restart the failed member in light mode (restart light).
| Restart light is not recommended for a restart in place. It is intended for a
| cross-system restart in the event of a failed MVS to quickly recover retained
| locks. Restart light enables DB2 to restart with a minimal storage footprint and
| then terminate normally after the locks are released. For more information about
| restart light, see “Restart light” on page 167.
| Example: To set the host variable MEM to the name of the current DB2 member:
| EXEC SQL SET :MEM = CURRENT MEMBER;
| Or:
| EXEC VALUES (CURRENT MEMBER) INTO :MEM
The distributed data facility (DDF) is controlled on a member basis. This gives you
more control over DDF processing in the group. Say, for example, that you want to
devote DB1G to batch processing for some period of time without disrupting other
connections. You can enter the following command to disallow any further
distributed connections from coming into this member:
-DB1G STOP DDF MODE(QUIESCE)
To stop all DDF processing for the group, you have to enter the STOP DDF
command for every member of the group. You might need to do this when, for
example, you change the SYSIBM.LOCATIONS table.
# There are no new commands for monitoring connections to or from a data sharing
# group. The DISPLAY LOCATION command shows information only for the
# member on which it is issued. The DISPLAY THREAD command shows
# information for the entire data sharing group.
If your data sharing group is defined with a generic LU, you must use the real LU
name for luwid, if you are requesting information by luwid.
To break this affinity, use the RESET GENERICLU command. The command must
be issued from the member with the affinity to the particular LU. Here is an
example that removes information about USIBMSTODB22 from DB1G:
-DB1G RESET GENERICLU(LUDB22)
Great care should be taken when using this command, because it can potentially
cause the specified partner LUs to connect to different DB2 subsystems on later
sessions. This can cause operational problems if indoubt threads exist at a partner
LU when this command is issued. This command can be issued from any member
of the data sharing group.
End of General-use Programming Interface
For more information about using the RESET GENERICLU command, see Chapter
2 of DB2 Command Reference.
Figure 33. Member BSDSs and logs in the data sharing environment
For data sharing, we recommend that you avoid using tape archive logs for data
recovery.
Recovering data
This section describes the changes in data recovery that are required by data
sharing, including data affected by the failure of the coupling facility or structures
within the coupling facility.
The procedures for data recovery are fundamentally the same for data sharing as
for non-data-sharing. Data sharing involves one catalog, but there are now many
logs and BSDSs. In addition to disk and cache controllers, a new medium, the
coupling facility, is introduced. This adds a possible point of failure and
necessitates appropriate procedures for data recovery. In planning for data sharing,
it is important to consider having more than one coupling facility. Should a
structure failure occur, recovery for the SCA and lock structure can proceed
automatically if a second coupling facility is available.
Now, assume you want to recover TS1 to time 9. The full image copy taken at T0
is used as the recovery base. All the SYSLGRNX records mentioned above are
selected to determine the log ranges of each system for the log scan. Updates U1
through U9 are applied in order.
The log record header contains a log record sequence number (LRSN). The LRSN
is a 6-byte value that is equal to or greater than the timestamp value truncated to 6
bytes. This value also appears in the page header. During recovery, DB2 compares
the LRSN in the log record to the LRSN in the page header before applying
changes to disk. If the LRSN in the log record is larger than the LRSN on the data
page, the change is applied.
Use the guideline below for each member of the data sharing group. Use the
output of the print log map utility (DSNJU004) for each member.
1. Find the starting timestamp of the active log data set with the lowest
STARTRBA.
2. Find the ending timestamp of the active log data set with the highest ENDRBA.
3. Calculate the time interval:
time_interval = end_TIMESTAMP − start_TIMESTAMP
4. Calculate the interval at which to perform incremental image copies:
interval of copy = time_interval * (n-1) / n
Where n is the number of active log data sets.
5. Take the smallest interval for the group and, to account for fluctuations of log
activity, decrease the interval by 30 percent. (30 percent is an arbitrary figure;
you might have to adjust this interval based on your system’s workload.)
This is the recommended interval for doing incremental image copies. If the
interval is too small to be realistically accomplished, consider increasing the
size or number of active log data sets.
Provide storage for this process using the LOG APPLY STORAGE field of
installation panel DSNTIPL.
Recovery to currency
This process is used to recover from damaged data by restoring from a backup and
applying all logs to the current time. The recovery process operates similarly in the
data sharing and non-data-sharing environments. Image copies are restored and
subsequently updated based on changes recorded in the logs. In the data sharing
group, multiple member logs are read concurrently in log record sequence.
Point-in-time recovery
This process discards potentially corrupt data by restoring a database to a prior
point of consistency. Such problems with the data might result from a logical error.
The following point-in-time recovery options are available:
TORBA This option is used to recover to a point on the log defined by an
RBA. In a data sharing environment, TORBA can only be used to
recover to a point prior to defining the data sharing group.
TOLOGPOINT
This option is used to recover to a point on the log defined by a
log record sequence number (LRSN). The TOLOGPOINT keyword
must be used when you recover to a point on the log after the data
sharing group was defined. However, you can also use
TOLOGPOINT in a non-data-sharing environment.
The LRSN is a 6-byte hexadecimal number derived from a store
clock timestamp. LRSNs are reported by the DSN1LOGP
stand-alone utility.
TOCOPY This option is used to recover data or indexes to the values
contained in an image copy without subsequent application of log
changes.
Successful recovery clears pending recovery conditions and brings data to a point
of consistency. In a data sharing environment, all pages associated with the
recovered data entity are removed from the group buffer pool and written to disk.
“Recovery procedure differences” on page 151 is the procedure you use to prepare
the data sharing group at the recovery site for a group restart.
Using a tracker site for disaster recovery: As an alternative, you can set up the
remote data sharing group as a tracker site. The advantage of a tracker site is that
it dramatically reduces the amount of time needed for takeover should a disaster
occur at the primary site. The disadvantage is that the tracker site must be
dedicated to shadowing the primary site. You cannot use the tracker site to
perform transactions of its own. See Part 4 (Volume 1) of DB2 Administration Guide
for more information about setting up and using a tracker site.
You can run the data sharing group on as few or many MVS systems as you want.
Obviously, you lose the availability benefits of the Parallel Sysplex, but the
single-system data sharing group has fewer hardware requirements:
– The Sysplex Timer is not needed; the time-of-day clock of the CPC can be
used.
– You can use any available coupling facility configuration for the recovery site
system, including Integrated Coupling Facilities (ICFs).
With a single-system data sharing group, there is no longer inter-DB2 R/W
interest, and the requirements for the coupling facility are as follows:
- A lock structure (which can be smaller)
- An SCA
Group buffer pools are not needed for running a single-system data sharing
group. However, you do need to have at least small group buffer pools for the
initial startup of the group so that DB2 can allocate them and do its damage
assessment processing. When you are ready to do single-system data sharing,
you can remove the group buffer pools by stopping all members and then
restarting the member that is handling the workload at the disaster recovery site.
For more information about ICF, see Enterprise System/9000 and Enterprise
System/3090 Processor Resource/System Manager Planning Guide.
Compare the ending LRSN values for all members’ archive logs, and choose the
lowest LRSN as the truncation point; for the two members here, the lowest
LRSN is AE3C45273A77. To get the last complete log record, you must subtract 1
from that value, so you would enter AE3C45273A76 as your ENDLRSN value in
the CRESTART statement of the change log inventory utility for each of the
members at the remote site. All log records with a higher LRSN value are
discarded during the conditional restart.
| v Use the command SET LOG SUSPEND if you are using IBM’s RAMAC Virtual
| Array (RVA) storage control with the peer-to-peer remote copy (PPRC) function
| or Enterprise Storage Server Flashcopy to create point-in-time backups of entire
| DB2 subsystems for faster recovery at a remote site. Using either of these
| methods to create a remote copy requires the suspension of logging activity,
| which prevents database updates. The SUSPEND option of the SET LOG
| command suspends logging and update activity until a subsequent SET LOG
| command with the RESUME option is issued. For more information about using
| RVA Snapshot or Enterprise Storage Server Flashcopy for remote site recovery,
| see Part 4 (Volume 1) of DB2 Administration Guide.
Attention: Make sure that all members of the group are active when you archive
the logs. If you have a quiesced member whose logs are necessary for a recovery
base at the disaster recovery site, you must start that member with
ACCESS(MAINT) to archive its log.
For read-only members, DB2 periodically writes a log record to prevent those
members from keeping the LRSN value too far back on the log.
None of the items in the above list work if there are retained locks held on the
object. You must restart any failed DB2 that is holding those locks.
This section also includes information about allocation failure and problems caused
by not enough storage.
Careful preparation can greatly reduce the impact of coupling facility outages on
your end users. To best prepare yourself for both types of failures, you must have
the following:
# v Group buffer pool duplexing enabled
# Duplexing group buffer pools assures minimal impact to performance and can
# avoid hours of recovery time.
v Alternative coupling facility information provided on the preference list of each
of the structures in the CFRM policy
# v For simplexed coupling facility structures:
# – An active system failure management (SFM) policy with system weights
# specified
# This is strongly recommended for simplexed coupling facility structures.
# Descriptions of failure scenarios in this section assume you have done this. If
# you have not, it is not possible to automatically rebuild simplexed coupling
# facility structures. If the SCA and lock structure cannot be rebuilt, DB2
# abnormally terminates the members affected by the loss of those structures, or
# the loss of connectivity to those structures. If the group buffer pool cannot be
# rebuilt, which is only attempted when a subset of members lose connectivity,
# then those members disconnect from the group buffer pool.
# – A REBUILDPERCENT value specified in the CFRM policy for all DB2-related
# structures
# In general, it is best to have a low REBUILDPERCENT value specified to
# allow for automatic rebuild when a member loses connectivity.
# – Adequate storage in an alternate coupling facility to rebuild or reallocate
# structures as needed
# For rebuild, MVS uses the current size structure of the CFRM policy on the
# alternate coupling facility to allocate storage. If MVS cannot allocate enough
# storage to rebuild the SCA or lock structure, the rebuild fails. If it cannot
# allocate enough storage for the group buffer pool, DB2 must write the
# changed pages to disk instead of rebuilding them into the alternate group
# buffer pool. For more information about how structure allocation works, see
# OS/390 MVS Programming: Sysplex Services Guide.
For more information about planning, see “Coupling facility availability” on page
35.
For more information about specific recovery scenarios, see “Coupling facility
recovery scenarios” on page 156.
Connectivity failure for lock structure and SCA: Table 31 on page 154
summarizes what happens when there are connectivity failures to the lock
structure or SCA.
Automatic rebuild.
DXR146I
Automatic rebuild
DSN7503I
Lock structure DXR143I None needed.
Automatic rebuild
DXR146I
Group buffer pool DSNB228I None needed if the
that is defined with DSNB314I rsn=STRFAIL group buffer pool is
GBPCACHE(YES) defined with
Add pages to LPL, if necessary. AUTOREC(YES) and
DSNB250E DB2 successfully
recovers the page set.
Damage assessment, GRECP page sets. Otherwise, enter
START DATABASE
DSNB304I commands.
DSNB320I
DSNB321I
DSNI006
DSNI021
DSNB305I
Summary of failure scenarios for duplexed group buffer pools: For duplexed
group buffer pools, a failure response is the same for both structure failures and
for lost connectivity.
Table 34. Summary of scenarios for both structure failure and lost connectivity for duplexed
group buffer pools
Failed structure DB2 response Operational response
Primary Switch to secondary in simplex If the system did not automatically
mode reduplex, correct the problem with
DSNB744I the failed coupling facility. If you
DSNB745I want to restart duplexing, use the
SETXCF command.
If DUPLEX(ENABLED) then
reduplexing is attempted.
Secondary Revert to primary in simplex If the system did not automatically
mode reduplex, correct the problem. If
DSNB743I you want to restart duplexing, use
DSNB745I the SETXCF command.
If DUPLEX(ENABLED) then
reduplexing is attempted.
Both (structure Damage assessment, GRECP None needed if the group buffer
failure or 100% page sets. pool is defined with
LOSSCONN) AUTOREC(YES) and DB2
successfully recovers the page set.
Otherwise, enter START
DATABASE commands.
System action: When all active members lose connectivity to the SCA or lock
structure, these structures are rebuilt:
DSN7503I is issued for a successful rebuild of the SCA.
DXR146I is issued for a successful rebuild of the lock structure.
Important: If the lock structure or SCA cannot be rebuilt, the lost connectivity
causes the members of the group to abend with abend code 00E30105 or 00F70600.
If they cannot be rebuilt, such as if both coupling facilities are volatile and lose
power, a group restart is required. Group buffer pools cannot be automatically
recovered during group restart, and you have to recover those group buffer pools
with START DATABASE commands.
For the lost connectivity to the group buffer pools, applications needing access to
group buffer pool data are rejected with a -904 SQL return code and can see any of
the following reason codes:
00C20204
00C20205
00C20220
v DB2 puts the group buffer pool in “damage assessment pending” status. The
following message appears:
DSNB304I -DB1G csect-name GROUP BUFFER POOL
gbpname WAS SET TO ’DAMAGE ASSESSMENT PENDING’ STATUS
v DB2 adds entries to the logical page list, if necessary.
System programmer action: The problem causing the loss of connectivity must be
fixed. If the problem is not an obvious one (such as a power failure), call IBM
service. After the problem is fixed, restart any failed members as quickly as
possible to release retained locks.
v For the SCA or lock structure, if the automatic rebuild occurred normally,
processing can continue while you wait for the coupling facility problem to be
fixed.
v For lost connectivity to group buffer pools, DB2 automatically recovers data that
was in any group buffer pool defined with AUTOREC(YES). If the automatic
recovery is not successful or if any pages remain in the LPL after recovery, issue
START DATABASE commands for all affected page sets. You must issue separate
START DATABASE commands in the following order.
1. DSNDB01
2. DSNDB06
# If any table or index space that is required for authorization checking is
# unavailable, Installation SYSADM or Installation SYSOPR authority is
# required to issue the START DATABASE commands.
Operator intervention is usually not required unless DB2 is required to add pages
to the LPL for some reason while the rebuild occurs. In this case, a START
DATABASE command is needed recover the pages on the LPL.
System action: For a loss of connectivity to the SCA or lock structure, DB2
abnormally terminates on the members affected by the loss of connectivity. Either
abend code 00E30105 or 00F70600 is issued for those members.
System programmer action: The problem causing the loss of connectivity must be
fixed. If the problem is not an obvious one (a disconnected link, for example), call
IBM service. After the problem is fixed, restart any failed members as quickly as
possible to release retained locks.
System action: A group buffer pool failure restricts access to the data assigned to
that group buffer pool; it does not cause all members of the group to fail.
Applications needing access to group buffer pool data are rejected with a -904 SQL
return code and can see any of the following reason codes:
00C20204
00C20205
00C20220
See “Problem: all members have lost connectivity” on page 157 for a description of
what DB2 does during automatic recovery.
System programmer action: Correct the coupling facility failure. For any page
sets that were not automatically recovered by DB2, notify the database
administrator to recover the data from the group buffer pool by using the
command START DATABASE (dbname) SPACENAM (spacename) to remove the
GRECP status.
System action: A group buffer pool failure restricts access to the data assigned to
that group buffer pool; it does not cause all members of the group to fail.
Applications needing access to group buffer pool data are rejected with a -904 SQL
return code and can see any of the following reason codes:
00C20204
00C20205
00C20220
System programmer action: Correct the coupling facility failure. For any page
sets that were not automatically recovered by DB2, notify the database
administrator to recover the data from the group buffer pool by using the
command START DATABASE (dbname) SPACENAM (spacename) to remove the
GRECP status.
System action: If the structure cannot be rebuilt, all active members of the group
terminate abnormally with a 00E30105 abend code.
System programmer action: See message DXR135E for the root cause of the
problem and the corrective procedure.
DB2 suspends processing until the SCA is rebuilt, using information contained in
DB2’s memory.
System action: If the rebuild is unsuccessful, all DB2 subsystems in the group
terminate abnormally.
System programmer action: Check the termination code for the reason the rebuild
was unsuccessful. Correct the problem and then restart the members of the group.
System action: Applications needing access to group buffer pool data are rejected
with a -904 SQL return code (reason code 00C20204).
If you don’t do anything to relieve the shortage, the following message appears
when the group buffer pool is 90 percent full:
DSNB325A -DB1G csect-name THERE IS A CRITICAL SHORTAGE OF
SPACE IN GROUP BUFFER POOL gbpname
If the group buffer pool is full, DB2 cannot write to the group buffer pool, and the
following message appears:
DSNB228I csect-name GROUP BUFFER POOL gbpname
CANNOT BE ACCESSED FOR function
MVS IXLCACHE REASON CODE=xxxx0C17
Performance problems are evidence that the group buffer pool is not large enough.
See “Group buffer pool size is too small” on page 245 for more information about
such symptoms and how to avoid having writes to the group buffer pool fail
because of a lack of storage.
System action: DB2 initiates castout processing if it isn’t already in progress. DB2
then tries again to write to the group buffer pool. For simplexed group buffer
pools, or for the primary of a duplexed group buffer pool, pages that cannot be
written to the group buffer pool are added to the logical page list and message
DSNB250E is issued.
If it is the secondary group buffer pool that is too full, DB2 does not add pages to
the logical page list; instead, it takes the structure out of duplexing mode.
System programmer action: If you cannot increase the size of the group buffer
pool, use the ALTER GROUPBUFFERPOOL command to decrease the castout
thresholds. If decreasing the castout threshold negatively impacts performance, this
should be used as a temporary solution.
If you don’t do anything to reclaim space, such as recovering pages from the LPL,
the following message appears when the SCA is 90 percent full:
System action: Some critical functions that cannot be completed can cause one or
more members of the group to come down with reason code 00F70609.
If your actions do not free up enough space, or if this problem continues to occur,
you have the following options, depending on what level of MVS and coupling
facility you have.
v If all of the following conditions are true:
– All members of the group are running with MVS Version 5 Release 2 or above
– The SCA is allocated in a coupling facility with a CFLEVEL greater than 0
– The currently allocated size of the SCA is less than the maximum structure
size as defined by the SIZE parameter of the CFRM policy
Then you can enter the following command to increase the size of the SCA (this
example assumes the group name is DSNDB0G):
SETXCF START,ALTER,STRNAME=DSNDB0G_SCA,SIZE=newsize
This example assumes that newsize is less than or equal to the maximum size
defined in the CFRM policy for the SCA structure.
v If any of the following conditions are true:
– Any member of the group is not running with MVS Version 5 Release 2 or
above
– The SCA is allocated in a coupling facility with CFLEVEL=0
– The allocated size of the structure is already at the maximum size defined by
the SIZE parameter in the CFRM policy
Then you must:
1. Increase the storage for the SCA in the CFRM policy SIZE parameter
2. Use the MVS command SETXCF START,POLICY to start the updated policy
3. Use the following MVS command to rebuild the structure:
SETXCF START,REBUILD,STRNAME=DSNDB0G_SCA
v If all members are down, and you cannot alter the SCA to a larger size, you
must do the following:
1. Delete the SCA structure by using the following command:
SETXCF FORCE,STRUCTURE,STRNAME=DSNDB0G_SCA
2. Increase the size of the SCA in the CFRM policy.
3. Restart DB2 to rebuild the SCA using group restart, as described in “Group
restart” on page 167.
System action: DB2 continues processing, but some transactions might obtain a
“resource unavailable” code because they are unable to obtain locks.
System programmer action: First, make sure no DB2 subsystems are down and
holding retained locks. Restarting any failed DB2 subsystems can remove the locks
retained in the coupling facility lock structure and release that space.
If a failed DB2 is not the problem, you have two courses of action:
v Lower the lock escalation values to get fewer locks. You do this either by
lowering the value on the LOCKS PER TABLE(SPACE) of installation panel
DSNTIPJ or by using the LOCKMAX clause of CREATE TABLESPACE.
v Increase the size of the lock structure, as described in “Changing the size of the
lock structure” on page 216.
When you forcibly deallocate an SCA or lock structure, it causes a group restart on
the next startup of DB2. DB2 can then reconstruct the SCA or lock structure from
the logs during group restart.
To deallocate structures, you must use MVS SETXCF FORCE commands to delete
persistent structures or connections. Each DB2 structure requires a different set of
commands.
v For the group buffer pools:
SETXCF FORCE,CONNECTION,STRNAME=strname,CONNAME=ALL
v For the SCA:
SETXCF FORCE,STRUCTURE,STRNAME=strname
v For the lock structure:
SETXCF FORCE,CONNECTION,STRNAME=strname,CONNAME=ALL
SETXCF FORCE,STRUCTURE,STRNAME=strname
# Important! If your site is running z/OS with APAR OA02620 applied, you cannot
# delete failed-persistent connections to the lock structure unless you also deallocate
# the lock structure. Deleting failed persistent connections without also deallocating
# the associated structure can result in a loss of coupling facility data. This situation
# can, in turn, cause undetectable losses of data integrity. APAR OA02620 protects
# your site from data corruption problems that can occur as a result of deleting
# retained locks. In doing so, the APAR also prevents extended outages that would
# result from long data recovery operations.
# APAR OA02620 makes deleting persistent connections and structures easier. When
# you forcibly deallocate the lock structure, the operating system deletes
# failed-persistent connections to the structure for you. Instead of issuing the
# SETXCF FORCE command twice (once for failed-persistent connections to the lock
# structure and once for the lock structure itself), you need issue it only one time:
# SETXCF FORCE,STRUCTURE,STRNAME=strname
During restart, DB2 resolves inconsistent states. Restart is changed for data sharing
because of the following:
v Database exception states, which exist solely on the log in a non-data-sharing
environment, are on both the SCA and the log in data sharing.
v Locks that are retained in the event of a failure must be processed.
v If the SCA or the lock structure is lost and cannot be rebuilt on another coupling
facility, all members of the group come down. If this unlikely event occurs, then
DB2 must perform group restart. Group restart is distinguished from normal
restart by the activity of rebuilding the information that was lost from the SCA
or lock structure. Group restart does not necessarily mean that all DB2
subsystems in the group start up again, but information from all non-starting
DB2 subsystems must be used to rebuild the lock structure or SCA.
In this section:
v “Normal restart for a data sharing member”
v “Group restart” on page 167
v “Phases of group restart” on page 168
v “Protecting retained locks: failed-persistent connections” on page 171
v “Postponing backout processing” on page 173
v “Restarting a DB2 member with conditions” on page 174
v “Deferring recovery during restart” on page 175
Retained locks: The particular concern for availability is what happens to locks
when a DB2 subsystem fails. For data sharing, active locks used to control updates
to data (modify locks) become retained in the event of a failure. This means that
information about those locks is stored in the coupling facility until they are
released during restart. Retained locks are necessary to protect data in the process
of being updated from being accessed by another active DB2 member of the group.
See “Protecting retained locks: failed-persistent connections” on page 171 for
information about the failed-persistent connections associated with retained locks.
In the case of a page set P-lock, it is conceivable that an entire page set could be
unavailable (an X mode page set P-lock is retained if the page set was
non-GBP-dependent at the time of the failure). Incompatible lock requests from
other members can be processed after the retained locks are removed, which
occurs during restart. To keep data available for all members of the group, it is
important to restart failed DB2 members as soon as possible, either on the same
or another MVS.
| You can restart a failed DB2 in “light” mode to quickly recover the locks held by a
| failed DB2 member. Restarting in a light mode is primarily intended for a
| cross-system restart in the event of a failed MVS system. For more information, see
| “Restart light” on page 167.
This process of reacquiring or purging locks can happen at different times in the
restart process, depending on the type of retained lock as shown in Table 35.
Table 35. Restart processing for locks
Lock type Processing
Page set P-lock Reacquired when page sets are opened for log apply. This
generally happens during forward recovery or before restart
completes.
Note: The earliest that a page set P-lock can become negotiable is at the end of forward
recovery. See “Page set P-Locks” on page 225 for more information about negotiation. If no
log apply is needed, it can happen later, such as the end of restart processing.
Page P-lock Purged at the end of forward recovery.
L-lock Purged at the end of restart processing.
If the DB2 requesting a lock which is incompatible with a retained lock has a
non-zero value for RETAINED LOCK TIMEOUT, its applications can be suspended
waiting for those retained locks. Those requests can go through as soon as the
retained locks are purged or become negotiable. For example, if an application is
suspended because of an incompatible retained page set P-lock, that retained lock
most likely becomes active and available for negotiation at the end of forward log
recovery.
Group restart
Group restart requires scanning the logs of each member to rebuild the SCA or
retained lock information. This is why we recommend that you have an alternate
coupling facility on which these vital structures can be automatically rebuilt in the
event of a coupling facility failure. That automatic rebuild that occurs during a
coupling facility failure does not require the log scans that group restart does.
During group restart, all restarting DB2 subsystems update the SCA or lock
structure from information contained on their logs. If you don’t enter a START DB2
command for all members of the group, then the started DB2 subsystems carry out
group restart on behalf of the non-starting subsystems by reading their logs.
Although one DB2 can perform restart on behalf of the group, we recommend that
you restart all of the non-quiesced members together, perhaps by using an
automated procedure. This shortens the total restart time. Also, because retained
locks are held for non-starting DB2 subsystems, it is best for data availability to
start all members of the group.
Because all members must synchronize at the end of current status rebuild (CSR)
and at the end of forward log recovery, the time taken for group restart done in
parallel is determined by the member that has the longest CSR and, if the lock
structure is lost, by the member that has the longest forward log recovery.
Once the members are synchronized after forward log recovery, backward log read
proceeds in parallel for the started subsystems.
In the message output shown in this section, we are showing a group restart
controlled by member DB3G on behalf of members DB2G and DB1G.
DB2 initialization
This phase verifies BSDSs, logs and the integrated catalog facility catalog. The RBA
of the last log record is retrieved and logging is set to begin at the next CI
following the last RBA. Also during this phase, DB2 determines if the lock
structure or SCA is lost and needs to be recovered.
When a restarting member has completed its own CSR, it checks and waits for
every other DB2 member to finish CSR. If there are non-starting DB2 subsystems,
then peer CSR is performed.
Peer CSR (used only when some DB2 subsystems are not
starting)
This activity is skipped unless it is necessary to perform group restart on behalf of
non-starting members. (Peer CSR is not used when the non-starting DB2
subsystems are normally quiesced.)
When all members have completed current status rebuild, either by doing it on
their own or by having a peer do it for them, the SCA has been rebuilt, and page
set and partition P-locks have been reacquired.
During peer current status rebuild, you see messages similar to these:
If there is a problem applying a log record for an object (such as if the disk version
of the data could not be allocated or opened), or if the page set is deferred, DB2
adds the relevant pages and page ranges to the logical page list. Only pages
affected by the error are unavailable.
When each restarting member has completed its own forward log recovery, it
checks and waits for every other DB2 member to finish. If there are non-starting
DB2 subsystems, then peer forward log recovery is performed.
At the end of forward log recovery, the rebuild of the lock structure is complete.
During peer forward log recovery, you see messages similar to these:
Any updates that cannot be externalized to the group buffer pool or disk cause the
affected pages to be added to the logical page list.
Backward log recovery can occur in parallel for all the started subsystems. There is
no peer backward log recovery; all members must be started to complete backward
log recovery and release the locks held by in-flight and in-abort transactions.
During backward log recovery, you see messages like the following:
The backward log recovery messages for the other members do not appear until
those members are actually started.
# RLM and XES use failed-persistent connections to the lock structure to track
# retained lock information. Retained locks may be lost and data integrity exposed
# by arbitrarily deleting a failed-persistent lock structure connection.
# Failed-persistent lock structure connections should be deleted only in the following
# situations:
# v Disaster recovery. All DB2 and IRLM-related failed-persistent connections and
# structures must be deleted before restarting the DB2 group at the remote site.
# During the restart, DB2 uses the group restart process to rebuild the retained
# locks from the logs.
# v A sysplex-wide outage when the lock structure is forced. Failed-persistent
# connections can be safely forced when all DB2 group members are down and
# the lock structure is also forced. As in disaster recovery, during the restart, DB2
# uses the group restart process to rebuild the retained locks from the logs.
# v After a hard failure occurs, such as a check-stop or abnormal re-IPL of an
# OS/390 or z/OS image containing an active DB2 member and the DB2 or IRLM
# member has not been restarted.
# When a DB2 group member is shut down while holding retained locks, those
# retained locks are transferred to another group member to hold until the original
# holding member is restarted. Therefore, although a normally quiesced member
# does not hold retained locks for itself, it may hold retained locks for another
# member that was shut down. The following situations can cause a transfer of
# retained locks:
# v Member failure. Assume that three DB2 members, DB1G, DB2G, and DB3G are
# running normally. If OS/390 incurs a hard failure that takes down DB2G, DB2Gs
# retained locks are transferred to one of the other members, in this case let’s
# assume it was DB1G. If DB1G is subsequently shut down normally, it might be
# assumed that there are no locks held by DB1G and that it is safe to delete
# DB1Gs failed-persistent connection. In actuality, because DB1G is holding the
# retained locks from DB2G, deleting DB1Gs failed-persistent connection deletes
# DB2Gs retained locks and exposes the DB2 data to potential data integrity
# errors.
# v A lock structure rebuild when one or more members are down and holding
# retained locks. This could be caused by either the OS/390 SETXCF command or
# a coupling facility-related failure.
To summarize, there are two options that let you enable and control postponed
backout. Both of these options are on installation panel DSNTIPN:
v LIMIT BACKOUT
YES or AUTO enables postponed backout. AUTO is the recommended value,
because you do not have to remember to issue commands to start the backout
processing.
v BACKOUT DURATION
A multiplier that indicates how much log to process for backout. This option is
valid only when you have specified YES or AUTO for LIMIT BACKOUT.
For more information about these options, see Part 2 of DB2 Installation Guide.
In data sharing, no restrictive status is set. Access to data with backout work
pending is blocked by transaction locks that persist restart. The following retained
locks persist through restart when postponed backout processing is active:
v Retained transaction locks held on page sets or partitions for which backout
work has not been completed
v Retained transaction locks held on tables, pages, rows, or LOBs of those table
spaces or partitions
The retained transaction locks on any particular page set or partition are freed
when all URs using that page set or partition have completed their backout
processing. Until that happens, the page set or partition is placed in an advisory
status called advisory restart pending (AREST).
To narrow down whether the pending work is indoubt URs or postponed backout
URs, enter DISPLAY THREAD TYPE(POSTPONED) and DISPLAY THREAD
TYPE(INDOUBT).
v To recover indoubt URs, use the RECOVER INDOUBT command.
v To recover postponed abort URs, use RECOVER POSTPONED. (If you specify
AUTO for LIMIT BACKOUT, DB2 recovers the postponed URs after restart, and
you do not have to enter a command.)
To determine what objects have backout work pending, use the DISPLAY
DATABASE command. Objects with backout work pending are displayed with a
status of AREST. The AREST status is removed when the backout processing is
complete for the object. You cannot use the command START DATABASE with
ACCESS(FORCE) to remove the advisory status.
Utility access to objects in AREST status: Utilities are not restricted by the AREST
status, but any write claims held by postponed abort URs on the objects in AREST
status prevent draining utilities from accessing that page set.
Some installations use conditional restart to bypass a long active UR backout, such
as might occur when a long-running batch job fails without having issued interim
commits. In data sharing, this use of conditional restart is not recommended. It is
safer and you have better availability, to reroute work to another DB2 or by
postponing backout processing rather than suffering the total outage necessary for
a conditional restart.
If you do use conditional restart, it is necessary to stop all members of the group
other than the one that is conditionally restarting to ensure that applications on
those other members do not change the data that is not locked by the restarting
member.
You have to use the START DATABASE command with the SPACENAM option to
make those pages available after DB2 has restarted.
Starting duplexing
# When duplexing starts, there is a period in which activity to the structure is
quiesced. Thus, it is best to start duplexing during a period of low activity in the
system.
# If the structure is not currently allocated, wait until it is allocated before starting
the duplexing rebuild.
Stopping duplexing
# To stop duplexing, you must first decide which instance of the structure is to
# remain as the surviving simplexed structure. If you have a choice in the matter, it
is preferable to use the primary structure as the surviving structure. For example,
the primary group buffer pool has intact page registration information. If the
system switches to the secondary group buffer pool, which does not have intact
page registration information, all this information is lost. Therefore, all locally
cached pages revert to an invalid state and must be refreshed from the group
buffer pool or disk.
# If you do not plan on reestablishing duplexing for the structure in the near future,
then activate a new CFRM policy specifying DUPLEX(DISABLED) for the
structure.
DB2 gives you the power of data sharing while avoiding overhead whenever
possible for such things as global locking and data caching. However, there are
also actions you can take to reduce the performance cost of data sharing. The
purpose of this chapter is to describe briefly how data sharing locking and buffer
management work and to offer some guidance about how to improve performance
in the group.
In this section, we describe some additional activities that DB2 performs for data
sharing, and to which address space you can expect to see the cost of those
activities charged:
v ssnmMSTR
Activities that occur under the DB2 master address space include commit
processing after updates, inserts, and deletes; logging; backout processing; and
archiving. With data sharing, writes to the group buffer pool and the global
unlocking that occurs during commit processing happen under SRBs in this
address space.
v ssnmDBM1
Activities that occur under this address space include prefetching, space
management, and deferred write. With data sharing, castouts, prefetch
interactions with the coupling facility, P-lock negotiation, updates to SYSLGRNX,
and group buffer pool checkpoints occur under SRBs in this address space.
v IRLMPROC
For data sharing, additional activities that occur under IRLM’s address space
include global lock conflict resolution. When a system is running normally,
IRLM’s SRB time is substantially lower than either ssnmDBM1 or ssnmMSTR.
Monitoring tools
This section describes the following tools:
“Using resource measurement facility (RMF®) reports”
“Using DB2 trace”
“Using DB2 PM” on page 181
A single DB2 trace does not gather information about all the members of the
group. All the trace commands (such as START TRACE and MODIFY TRACE) take
effect only on the DB2 subsystem on which they are issued; they do not affect
tracing activity on any other DB2 subsystems. In addition, the statistics interval for
each subsystem is set by each member and the interval is not synchronized across
the members of the group.
# You can gather trace information about all members of the group by specifying
# SCOPE(GROUP) on the START TRACE, STOP TRACE, and DISPLAY trace
# commands.
# If you start a trace with SCOPE(GROUP) specified, you can issue IFI READS and
# READA requests to gather data from all data sharing group members or from a
# specific member. For more information about using a monitor program to gather
# trace data from a data sharing group, see Appendix E in DB2 Administration
# Guide.
To gather data about group activity, as when auditing access to a particular table
or detecting locking contention from processes on different DB2 subsystems, you
must merge trace records in time sequence. To do this, use the value of the Sysplex
Timer store clock contained in the standard header. Every trace record from a
member of a data sharing group includes a data sharing header, which gives the
DB2 group name and member name. This header is mapped by mapping macro
Using DB2 PM
DB2 PM can monitor the use of shared DB2 resources such as the catalog and
directory, group buffer pools, and databases for entire data sharing groups as well
as for individual members of the group.
v Reports and traces with member scope present a group’s instrumentation data
member by member, without merging the data. These reports and traces are
similar to those generated in a non-data-sharing environment, where each report
or trace is produced for an individual DB2 subsystem.
v Reports and traces with group scope merge instrumentation data for individual
members and present it for the entire group. The traces show events in
chronological order and indicate which member is reporting the event, and the
reports show events summarized for the entire group.
The following report sets provide both group-scope and member-scope reporting:
v Accounting
v Locking
v Statistics
v Audit
With DB2 PM, you can have processor times reported in service units. This allows
times from different CPC models in the group to be normalized before they are
reported.
See Figure 57 on page 214 and Figure 58 on page 215 for examples of DB2 PM
reports.
However, if the processing speed of the CPU is slower than that on which you are
currently running, be sure to plan carefully for applications or DB2 utility
processes where processor resource consumption represents the significant part of
the elapsed time. Some examples are some batch applications, complex queries,
and many DB2 utilities. This section describes ways to make these
resource-intensive applications run at their best in the Parallel Sysplex. The topics
are:
“General recommendation” on page 182
“Migrating batch applications to data sharing” on page 182
“Migrating online applications” on page 183
“Running utilities” on page 183
“Using the resource limit facility (governor)” on page 183
General recommendation
We suggest that you take advantage of data partitioning and that you design for
parallel processing whenever possible. DB2 can use parallel processing effectively
only when the data is partitioned. See Part 5 (Volume 2) of DB2 Administration
Guide for more information about parallel processing for queries and utilities.
Parallel scheduling
If the significant portion of the elapsed time of a long-running batch application is
because of processor resource consumption and for which you are currently having
scheduling problems, consider running more than one copy of the same program
in parallel. Each copy can be run on a different key range, typically the
partitioning key of the main table.
To avoid disk contention, make sure the data partitions are placed on DASD
devices with separate I/O paths. Consider using the PIECESIZE option of CREATE
or ALTER INDEX to give you more control over the data set size of
nonpartitioning indexes. See Chapter 5 of DB2 SQL Reference for more information
about the PIECESIZE option.
The MEMBER CLUSTER option: If your application does heavy sequential insert
processing from multiple members in the group, consider putting the data in a
table space that is defined with the MEMBER CLUSTER option. The MEMBER
CLUSTER option causes DB2 to insert the data based on available space rather
then respecting the clustering index or the first index. For sequential insert
applications, specifying MEMBER CLUSTER can reduce P-lock contention and give
better insert performance at the cost of possibly higher query times. See “Reducing
space map page contention” on page 227 for more information about the MEMBER
CLUSTER option of CREATE TABLESPACE.
The release of MVS and coupling facility level can affect performance of
applications that use sequential or list prefetch. See “Prefetch processing” on page
229 for more information.
Running utilities
For most DB2 utilities, processor resource consumption represents the significant
portion of the elapsed time when running on an early generation of S/390
microprocessors. Two of the most significant examples are:
LOAD with many columns
RUNSTATS with non-index column statistics
Consider using the SAMPLE option of RUNSTATS to reduce processing costs. The
key to letting processor-intensive utilities perform well is to partition the data. For
more information about running utilities on separate partitions of data, see DB2
Utility Guide and Reference.
Where partitioning the data is not an option, consider running utilities on a CPC
with a faster single-CP speed.
Terminology: The DB2 that is attached to the application that issued the query is
the parallelism coordinator. A member who helps process one of these parallel
queries is an assisting DB2 or parallelism assistant.
To set workload management goals for parallel queries that this DB2 assists, you
must:
1. Define a service class that is used for queries that run on an assistant. This
service class can have the same goals as those for the coordinator, but the name
must be different unless you are running with OS/390 Release 3 or subsequent
releases. Alternatively, you can apply modified goals to the assistants to take
into account the numerous amount of enclaves per assistant for a single query.
See “Example: setting goals for the parallelism assistants” on page 186 for
information about defining a service class.
2. If you run in compatibility mode, use the IEAIPSxx PARMLIB member to
indicate which performance group should control the query work. Also, use the
IEAICSxx PARMLIB member to set the SRVCLASS parameter to the service
class defined in the policy, and associate it with a performance group. The
subsystem type you use is DB2.
As described in “How period switches work on parallelism assistants” on page
186, any work coming into an assistant starts in period 1.
3. Install the service definition and activate the service policy.
With Sysplex query parallelism, the query work for a particular query always
starts out in the first period on each assistant with no accumulated service units.
Recommendation: Initially, we recommend that you classify work for the assistants
using only one performance period. You can add more performance periods after
you monitor the system.
***********************************************************************
Subsystem-Type Xref Notes Options Help
-----------------------------------------------------------------------
Modify Rules for the Subsystem Type Row 1 to 5 of 5
Command ===> ____________________________________________ SCROLL ===>
Subsystem Type . : TSO Fold qualifier names? Y (Y or N)
Description . . . Decision support TSO
Action codes: A=After C=Copy M=Move I=Insert rule
B=Before D=Delete row R=Repeat IS=Insert Sub-rule
-------Qualifier------------- -------Class--------
Action Type Name Start Service Report
DEFAULTS: RTDISC ________
____ 1 UI EMMES ___ RTVEL ________
____ 2 AI D44* ___ ________ PROJ1
____ 2 AI D88* ___ ________ PROJ2
____ 1 UI BRYAN ___ RTONLY ________
____ 2 AI P73* ___ ________ PROJ1
****************************** BOTTOM OF DATA *************************
Figure 37. Defining workload management information for the parallelism coordinator
The service classes shown in Figure 37 are used for queries that originate and run
on a particular DB2. If you are running on a release of OS/390 before release 3,
any part of the same query that is shipped to another DB2 must use a different
service class name, because WLM cannot manage enclave work and address space
work with the same name. Report classes can be the same.
Figure 38. Classifying query work on the assistants. The DB2 in the SUBSYSTEM TYPE field
specifies that these classifications are for query work originating from another member of the
data sharing group.
Figure 39 shows another way that work can be classified. It more clearly illustrates
the relationship between the work classified on the coordinator in Figure 37 on
page 186 and work classified on the assistant. The SUBSYSTEM TYPE is DB2 and
the service class names are different.
*************************************************************************
Subsystem-Type Xref Notes Options Help
-------------------------------------------------------------------------
Modify Rules for the Subsystem Type Row 1 to 7 of 7
Command ===> ____________________________________________ SCROLL ===> PAGE
Subsystem Type . : DB2 Fold qualifier names? Y (Y or N)
Description . . . Participants in complex queries
Action codes: A=After C=Copy M=Move I=Insert rule
B=Before D=Delete row R=Repeat IS=Insert Sub-rule
-------Qualifier------------- -------Class--------
Action Type Name Start Service Report
DEFAULTS: Z ________
____ 1 SI TSO ___ ZRTDISC ________
____ 2 UI EMMES ___ ZRTVEL ________
____ 3 AI D44* ___ ________ PROJ1
____ 3 AI D88* ___ ________ PROJ2
____ 2 UI BRYAN ___ ZRTONLY ________
____ 3 AI P73* ___ ________ PROJ1
____ 1 SI JES ___ ZRTDISC_ PROJ2___
****************************** BOTTOM OF DATA **************************
Not all queries are eligible: Even if you turn on parallelism, not all read-only
queries are eligible. For example, queries must be bound with isolation UR or CS.
Queries with result sets that contain LOBs are also not eligible for sysplex query
parallelism. To get the effect of RR or RS isolation with Sysplex query parallelism,
bind with CS or UR and use a LOCK TABLE table-name IN SHARE MODE
statement before the query.
See Part 5 (Volume 2) of DB2 Administration Guide for more information about
restrictions on queries.
At run time, assistants must have buffer pools defined to allow parallelism, or DB2
does not send work to those members.
Easy way to see coordinators and assistant parameters: The command DISPLAY
GROUP now has a DETAIL option that allows you to see the COORDINATOR and
ASSISTANT subsystem parameters for all active members of the group. For
example, the following command:
-DB1G DISPLAY GROUP DETAIL
Sample configurations: Let’s look at how the buffer pool parallel allocation
threshold values might be set up for two different configurations.
Figure 42 on page 191 shows how the online systems (IMS and CICS) are
configured to send all of their parallel queries to the query processor subsystems
on CPC7 and CPC8, but they do not assist other members.
v The COORDINATOR subsystem parameter is YES
v The ASSISTANT subsystem parameter is NO
The TSO and BATCH systems can run their own queries in parallel and can send
query work to the query processors, but they do not assist other members.
v The COORDINATOR subsystem parameter is YES
v The ASSISTANT subsystem parameter is NO
The query processors have both ASSISTANT and COORDINATOR set to YES.
Figure 43 shows a data sharing group in which all members can coordinate and
assist with parallel queries. All COORDINATOR and ASSISTANT subsystem
parameters are set to YES.
Figure 43. Dedicated query processor configuration. In this configuration, the entire data
sharing group is a set of “query processors.” The virtual pool sequential threshold (VPSEQT)
is presumably set very high (perhaps 100).
Figure 44. Displaying buffer pool thresholds.. In this particular buffer pool, 50 percent of the
buffer space is available for parallel processing. All of that parallel space is available to assist
with processing queries from other members of the data sharing group.
See Chapter 2 of DB2 Command Reference for information about the syntax of the
command DISPLAY THREAD.
The access path that DB2 plans to use is shown in the EXPLAIN output. The
PARALLELISM_MODE column contains “X” to indicate that Sysplex query
parallelism is chosen for the explainable statement. If only one member of the data
sharing group is active at bind time, then it is still possible for DB2 to choose
Sysplex query parallelism. This lets any assistants that are active at run time help
with processing the query.
To determine whether work was sent to assisting DB2s, use the accounting trace.
(See A in Figure 47 to see how DB2 PM displays that information.)
To determine the actual degree that was used to process a specific query, use
IFCID 0221 in performance trace class 8 (same as with CP parallelism). The
QW0221XC field of IFCID 0221 indicates on how many members the parallel
group executed, and it also indicates when a particular buffer pool is constrained
on a particular member. IFCIDs 0222 and 0231 now include DB2 member names
for members that participated in processing that parallel group.
When a member does not have enough buffer pool resources to participate in
processing a query, the coordinator must “skip” that member when it distributes
work around the group. For more information, see “Is the buffer pool too small?”
on page 195.
Figure 47. Partial accounting trace that shows Sysplex query parallelism
Is the buffer pool too small?: An indicator of buffer pool shortages are non-zero
values in the QXREDGRP (B in Figure 47 on page 194) and QXDEGBUF (D)
fields in the statistics or accounting trace record. If response time goals are not
being met, further analysis can help you determine which buffer pools are causing
the problems. Use performance class 8 and inspect the IFCID 0221 trace record to
pinpoint which buffer pools are too small. It might be necessary to increase the
size of the buffer pools or increase the number of buffers available to assist with
processing query work.
For more information about determining buffer pool size for parallel work, see
Part 5 (Volume 2) of DB2 Administration Guide.
Reformulating the degree: When buffer pool resources are scarce, DB2 reformulates
the parallel degree (indicated in G) and comes up with a distribution scheme that
works best with the reformulated degree. G is incremented once for each parallel
group that had to be reformulated.
The percentage of members that were unable to perform some or all of the work
that was originally planned for is indicated in E.
The interaction of these two fields is best illustrated by an example. Assume that
you have a 4-member data sharing group of similar processor models with a
planned degree of 40. In this case, DB2 might send 10 parallel tasks to each
member. However, if buffer pool resources are scarce on two of the members and
can only process 5 parallel tasks each, DB2 can reduce the parallel degree to 30,
incrementing G once and setting E to 50%.
Work file buffer pools: Don’t forget to set the parallel sequential threshold for work
file buffer pools. DB2 assumes that you have all your work files of the same size (4
KB or 32 KB) in the same buffer pool number on all DB2 subsystems and makes
run time decisions based on a single buffer pool. A lack of buffer pool resources
for the work files can lead to a reduced degree of parallelism or cause the query to
run sequentially.
Is there I/O contention?: One possible cause of poor response time is contention
for I/O resources. Contention can occur in any place in the I/O subsystem. Here
are some ways to determine if and where I/O contention is causing the problem:
1. Monitor
Where to place data sets: In general, you want frequently used data sets or
partitions to be allocated across your available disks so that I/O operations are
distributed as evenly as possible. Make sure that device and control unit utilization
is balanced. This helps balance I/O operations across the I/O configuration and
takes maximum advantage of parallel I/O operations.
The IFCID 0221 record describes how the tables within a parallel group are
partitioned by specifying the key range or page range for each partition. The IFCID
0222 record shows the elapsed time statistics for each parallel operation. The
elapsed time for each parallel operation within a parallel group should be
comparable. An operation with a much higher elapsed time means that DB2 is
doing more than desirable I/O operations on a particular logical partition, or there
is significant contention on the disk volume or channel path.
If the elapsed times of the parallel tasks are comparable but are still too high,
consider repartitioning the table space to more parts, assuming that processor time
is not a bottleneck.
Is there lock contention?: To avoid lock contention, run with an isolation level of
UR, if that is possible. If it is not possible to run with UR, the next best thing is to
take advantage of lock avoidance by running with ISOLATION(CS) and specifying
CURRENTDATA(NO). This can minimize the locking effect.
IRLM will report the number of retries in case it cannot deliver a message for
Sysplex query parallelism via XCF. This information is reported in the IRLM
Exception (EXP) trace and can be used to tune XCF performance.
For more information about monitoring XCF activity, see OS/390 MVS Setting Up a
Sysplex.
Is there inter-DB2 read/write interest?: Because DB2 can split query processing
onto different DB2 subsystems, updates of the same page set cause inter-DB2
read/write interest as part of the normal data sharing integrity process. To ensure
that updates on a page set are seen by the query, DB2 flushes all changed pages
from the virtual pool before processing the query on other DB2 members.
Inter-DB2 read/write interest can also cause additional locking overhead. Child
locks (page or row) are propagated to XES and the coupling facility based on the
inter-DB2 interest on the parent (table space or partition) lock. If all the TS locks
are IS, then no child locks are propagated. However, if there is an IX lock on the
table space, which indicates read/write interest, all the child locks must be
propagated. To avoid locking overheads, use isolation level UR, or try to limit the
table space locks to IS on all data sharing members to avoid child lock
propagation.
For partitioned table spaces, DB2 can avoid locking all partitions in a table space,
thus reducing the number of child locks that must be propagated. To take
advantage of this, you must define the table space with LOCKPART YES and bind
the plan or package with ACQUIRE(USE). For more information, see “Using the
LOCKPART option for partitioned table spaces” on page 207.
Amount of buffer space allocated for parallel processing: You can control how
much of your total buffer pool space can be used for parallel processing in general,
and for Sysplex query parallelism specifically.
v The parallel threshold (VPPSEQT), determines the amount of space for all
parallel processing.
v The assisting parallel sequential threshold (VPXPSEQT) determines what subset
of the parallel space can be used to assist queries originating from another
member of the data sharing group.
Figure 48. Governing a dynamic query running on four members. This examples assumes
that all members share the same RLST. Statement X is not allowed to consume over 200000
service units on any DB2.
Governing statements with more than one parallel group: If more than one parallel
group processes the work for a query on a member, each parallel group can run up
the service unit limit set for that member. On the coordinator, things work
differently because all parallel groups, including the originating task, are governed
by the limit on the coordinating member. Figure 49 shows how this works.
Figure 49. A query with two parallel groups running at the same time. This example assumes
that members are sharing the same RLST. No parallel group that is part of statement Y can
run beyond the limit of 200000 service units. On the parallelism coordinator, all tasks in all
parallel groups run up to the limit specified for the statement.
You can also disable Sysplex query parallelism for a single dynamic query by
using a value of ’5’ for the resource limit facility (governor).
Improving concurrency
This section describes briefly how transaction locking works in DB2 data sharing
and some actions you can take to reduce locking overhead:
v “Global transaction locking”
v “Tuning deadlock and timeout processing” on page 208
v “Tuning your use of locks” on page 204
v “Monitoring DB2 locking” on page 211
v “Changing the size of the lock structure” on page 216
Data sharing also introduces a new type of lock, called a physical lock (P-lock). But,
P-locks are related to caching, not concurrency, and they use different mechanisms
than the transaction locks you are familiar with in DB2. See “P-locking” on page
225 for information about P-locks. Transaction locks are often called logical locks
(L-locks) in data sharing.
Locking optimizations
DB2 has optimizations in place to reduce the necessity to go beyond the local
IRLM whenever possible:
v Explicit hierarchical locking, described in “Explicit hierarchical locking” on page
202 makes certain optimizations possible. When there is no inter-DB2 R/W
interest in an object, it is possible to avoid processing certain locks beyond the
local IRLM.
v If there is a single DB2 with update interest and multiple DB2 subsystems with
read-only interest, DB2 propagates fewer locks than when all DB2 subsystems
have update interest in the page set.
v All locks (except LLOCKS) that go beyond the local IRLM are owned by the
subsystem, not by an individual work unit. This allows for another optimization.
Only the most restrictive lock mode for an object on a given subsystem must be
propagated to XES and the coupling facility. A new lock that is equal to or less
restrictive than one currently being held is not propagated. “A locking scenario”
on page 203 gives an example of this type of optimization.
v When the lock structure is allocated in a coupling facility of CFLEVEL=2 or
higher, IRLM can release many locks with just one request to XES. This can
occur after a transaction commits and has two or more locks that need to be
unlocked in XES. It also can occur at DB2 shutdown or abnormal termination
when the member has two or more locks that need to be unlocked.
The top object in the hierarchy is a parent, and everything below a parent is a child.
(A child can be the parent of another child.) While the lock is held, the first lock on
the top parent is always propagated to XES and the lock structure. Thereafter, only
more restrictive locks are propagated. When the lock is released, the process begins
again. For partitioned table spaces, if you use LOCKPART YES, each locked
partition is a parent of the child locks held for that partition. If you use
LOCKPART NO (the default), the last data partition is the parent lock for all child
locks. For more information about using the LOCKPART clause, see“Using the
LOCKPART option for partitioned table spaces” on page 207.
Relationship between L-locks and P-locks: L-locks and P-locks are managed
independently of one another. It is possible to have inter-DB2 interest on an L-lock
but not on a P-lock that is held on the same object, and it is also possible to have
inter-DB2 interest on the P-lock but not the L-lock. The inter-DB2 interest on the
parent L-lock controls the propagation of the child L-locks. The inter-DB2 interest
on the page set P-lock controls GBP-dependency.
A locking scenario
Figure 50 shows an example of locking activity between two members of a data
sharing group.
In the figure:
1. Transaction 2’s L-lock on TS1 is not propagated because that DB2 already holds
a lock on that object of an equal restriction. (Transaction 3’s L-lock on TS1 is
propagated, because that lock is from another DB2 subsystem.)
2. Transaction 1’s child L-lock on Page 1 is not propagated at the time it was
requested because its parent lock is IS on both subsystems. That is, there is no
inter-DB2 R/W interest on the parent.
3. When Transaction 4 upgrades its lock to IX on TS1, its X lock on Page 2 must
be propagated because there is now inter-DB2 R/W interest on the parent.
Also, Transaction 1’s child lock on Page 1 must be propagated.
Transaction 1’s child lock is propagated under an IRLM SRB, not the
transaction’s TCB. This propagation is counted in the statistics report as an
# asynchronous propagation, as shown in D in Figure 57 on page 214.
General recommendations
To reduce locking contention, use the same tuning actions that are in place for
single-DB2 processing today, as described in Part 5 (Volume 2) of DB2
Administration Guide. Here is a summary:
v Use partitioned table spaces.
v Use page locking.
Although row locking can be used to increase concurrency in some cases, you
must weigh that benefit against the increase in locking overhead that row
locking might incur. (The amount of overhead depends on how well your
application can avoid taking locks.)
One way to achieve the concurrency of row locking but to avoid the additional
data sharing lock overhead is to define the table space with MAXROWS 1. See
DB2 SQL Reference for more information.
v If your applications can tolerate reading uncommitted data, use an ISOLATION
level of uncommitted read (UR).
v If you cannot use ISOLATION(UR), take advantage of lock avoidance whenever
possible by binding with an isolation level of cursor stability (CS) and
CURRENTDATA(NO). These are not the defaults.
v Reduce the scope of BIND operations by using packages. This reduces DB2
catalog and directory contention.
v Design for thread reuse and choose the RELEASE option carefully.
If you use the BIND option RELEASE(DEALLOCATE) for objects that don’t
have a lot of concurrent activity within a member, you can avoid the cost of
releasing and reacquiring the same parent locks again and again. It can also
reduce the amount of false contention, described in “Avoid false contention” on
page 205 for those transactions that use the thread.
To achieve a good balance between storage and processor usage, use the bind
option RELEASE(DEALLOCATE) for plans or packages that are frequently used.
To avoid increasing the EDM pool storage too much, use RELEASE(COMMIT)
for plans or packages that are not as frequently used.
IRLM assigns locked resources to an entry value in the lock table. This is how it
can quickly check to see if a resource is already locked. If the lock structure is too
small (thereby making the lock table portion too small), many locks can be
represented by a single value. Thus, it is possible to have “false” lock contention.
This is where two different locks on different resources hash to the same lock
entry. The second lock requester is suspended until it is determined that there is no
real lock contention on the resource.
False contention can be a problem for work loads that have heavy inter-DB2 R/W
interest.
Monitoring for false contention: You can determine the amount of false
contention by using the RMF Coupling Activity reports as described in “Using the
coupling facility structure activity report of RMF” on page 213. DB2 also provides
necessary information in its accounting and statistics trace classes. See “Using the
DB2 statistics trace” on page 213 and “Using the DB2 accounting trace” on page
215 for more information. More detailed information can be found in the
performance trace, as shown described in “Using the DB2 performance trace” on
page 216.
How much contention is acceptable: For the best performance, you want to
achieve the least possible amount of global lock contention, both real and false.
Aim for total global lock contention of less than 5 percent, preferably less than 1
percent. In the descriptions of the various reports, we show you how to figure out
the contention percentages.
# IRLM automatically rebuilds the structure when it needs to. For example, if
# MAXUSRS=7, when the seventh member joins the group, IRLM automatically
# rebuilds the lock structure to create the 4-byte lock entries. This prepares the
# lock structure to handle an eighth member joining the group.
# For this reason, even if you anticipate your group growing beyond seven
# members, you can start out with a lock entry size of two to make the most
# efficient use of lock structure storage.
# Recommendation: Set MAXUSRS for all IRLM instances to an appropriate value
# for the number of members that you will have in a data sharing group. For
# example, if you plan to have between seven and 22 members in your data
# sharing group on a regular basis, you should set MAXUSRS=23 in the
# IRLMPROC procedure for the IRLM instance that is associated with each
# member of the data sharing group. Alternatively, you can set the LOCK ENTRY
# SIZE field value to 4 in installation panel DSNTIPJ when you install each
# member of the data sharing group. Doing this causes the DB2 installation
# process to set the MAXUSRS value to 23 in the associated IRLMPROC
# procedures. Lock structure allocation occurs when the first member joins the
# data sharing group after an IPL of the operating system, or after any situation
# that causes the lock structure to be deallocated.
# If you initially set MAXUSRS=23 for all IRLM instances, the lock structure size is
# already adequate for up to 22 members, no matter which IRLM is the first to
# connect. A lock structure rebuild is not necessary when the seventh member
# joins the group.
# If you increase the lock entry size (and thereby increase MAXUSRS), you should
# increase the lock structure size, to maintain the number of lock table entries and
# record list entries. If you do not increase the lock structure size, IRLM obtains
# the storage that it needs for the increased lock entry size from storage for lock
# table entries or record list entries.
How to decrease lock entry size: IRLM does not automatically rebuild if the
number of members goes down such that a smaller lock entry size is optimal. To
decrease the lock entry size, you must:
1. Quiesce all members of the group, using the following command:
-DB1G STOP DB2 MODE(QUIESCE)
A group restart occurs when you restart the members. Because you quiesced work
before changing the lock entry size, the group restart should be relatively quick.
Nonetheless, this is a disruptive procedure. Consider decreasing the lock entry size
only in situations when it is set too high for the number of members in the group,
and you cannot alleviate the false contention within the storage boundaries you
have.
With LOCKPART NO, the default, DB2 uses the table space L-lock as the lock
parent in the locking hierarchy (the table space lock is represented by a single lock
on the last partition of the table space). With LOCKPART YES, each locked
partition is a separate lock parent; therefore, DB2 and IRLM can detect when no
inter-DB2 R/W interest exists on that partition and thus does not propagate child
L-locks unnecessarily.
With LOCKPART YES, you have the option of using the LOCK TABLE with the
PART option to exclusively lock individual partitions. See Part 5 (Volume 2) of DB2
Administration Guide for more information about the LOCK TABLE statement.
Figure 52 shows partition locks when LOCKPART YES. A partition lock is taken
only when the partition is accessed.
The duration of a partition lock: Partition locks follow the same rules as table
space locks, and all partitions are held for the same duration. Thus, if one package
is using RELEASE(COMMIT) and another is using RELEASE(DEALLOCATE), all
partitions use RELEASE(DEALLOCATE). A partition lock can be held past commit
points if using CURSOR WITH HOLD.
The mode of a partition lock: Partition locks have the same possible states as table
space locks (IS, IX, S, U, SIX, and X).
Lock escalation: Lock escalation occurs when the number of locks per table space
exceeds the threshold specified at installation or on the LOCKMAX clause of
CREATE or ALTER TABLESPACE. Lock counts are not kept on a partition basis.
When the maximum number of locks for a table space is reached, the locks on all
partitions are escalated to S or X. Partitions that have not yet been locked are not
affected by lock escalation; they remain unlocked. Any partitions already holding
S, U, or X locks remain unchanged.
After lock escalation occurs, any unlocked partitions that are subsequently accessed
use a gross lock.
Use performance trace class 6 (IFCID 0020) to see whether you have taken
advantage of selective partition locking for your partitioned table spaces. If you are
using DB2 PM, you can see this in the locking summary portion of the SQL
Activity Report.
In this section:
v “Global deadlock processing” on page 209
208 Data Sharing: Planning and Administration
v “Global timeout processing” on page 210
v “Recommendations” on page 211
where
x The number of seconds between two successive scans for a local deadlock
(DEADLOCK TIME value on installation panel DSNTIPJ). The default is 5
and can be no larger than 5.
y The number of local scans that occur before a scan for global deadlock
starts (DEADLOCK CYCLE value on install panel DSNTIPJ). The value
that is always used by IRLM is 1.
Global deadlock detection requires the participation of all IRLM members in the
data sharing group. Each IRLM member has detailed knowledge of the locks that
are held and being waited for by the transactions on its associated DB2 member.
However, to provide global detection and timeout services, each IRLM is told
about all requests that are waiting globally so that the IRLM can provide
information about its own blockers. That IRLM also provides information on its
own waiters. The IRLM members use XCF messages to exchange information so
that each member has this global information.
The local deadlock detector: Each IRLM member in the group must participate in
the global deadlock detection process. Each IRLM member (including the one
designated as the global deadlock manager) has the role of local deadlock detector.
Relationship between local and global deadlock detection: There are four XCF
messages required to gather and communicate the latest information from the local
deadlock detectors:
1. The local deadlock detector sends its information about lock waiters to the
global deadlock manager.
2. The global deadlock manager gathers that information from all local deadlock
detectors and then sends messages to each of the IRLMs in the group. (Because
the global deadlock manager is also a local deadlock detector, it receives the
same information, although somewhat quicker than the rest of the IRLMs do.)
3. Each local deadlock detector looks at the global view of resources and
determines if it has blockers for other waiters. It passes that information along
to the global deadlock manager with its list of waiters.
4. The global deadlock manager, from the information it receives from the local
deadlock detectors, determines if a global deadlock or timeout situation exists.
If a global deadlock situation exists, it chooses a victim for the deadlock. The
These four messages represent one global detection cycle, and it usually takes 2-4
x-second intervals to complete (where x is local cycles). Figure 53 illustrates an
example where the deadlock time value is set to 5 seconds.
Deadlock detection might be delayed if any of the IRLMs in the group encounter
any of the following conditions:
v XCF signalling delays
v IRLM latch contention (could be encountered in systems with extremely high
IRLM locking activity)
v A large number of global waiters
For example, if the timeout period for a given transaction is 60 seconds and the
DEADLOCK TIME value is 5 seconds, then the transaction waits between 60 and
65 seconds before timing out, with the average wait time being about 62.5 seconds.
This is because timeout is driven by the deadlock detection process, which is
activated on a timer interval basis.
Elapsed time until timeout, non-data-sharing: The actual time a process waits
until timing out usually falls within the following range:
However, the maximum or average values can be larger, depending on the number
of waiters in the system or if there is a heavy IRLM workload.
Elapsed time until timeout, data sharing: In a data sharing environment, because
the deadlock detection process sends inter-system XCF messages, a given
transaction typically waits somewhat longer before timing out when compared to
what you might normally experience in a non-data-sharing environment. How
much longer a transaction waits depends on where in the global deadlock
detection cycle that the timeout period actually expired. However, the length of
time a process waits until timing out generally falls within the following range:
MIN GLOBAL TIMEOUT = timeout period + DEADLOCK TIME value
MAX GLOBAL TIMEOUT = timeout period + 4 * DEADLOCK TIME value
AVERAGE GLOBAL TIMEOUT = timeout period + 2 * DEADLOCK TIME value
Recommendations
Quick detection of deadlocks and timeouts is necessary in a data sharing
environment to prevent a large number of waiters on each system. These large
numbers of waiters can cause much longer wait times for timeouts and deadlocks.
Based on this assumption, here are two recommendations:
v If your DB2 non-data-sharing subsystem has a problem with deadlocks, consider
reducing the deadlock time to prevent these long lists of waiters from
developing. (If you don’t have a problem with deadlocks, it is likely that you
won’t have to change any parameters for data sharing.)
v If you have stringent timeout limits that must be honored by DB2, consider
decreasing the deadlock time before moving to data sharing, as illustrated in this
example:
Assume that you have set your timeout period for your non-data-sharing DB2 to
55 seconds because you want the wait time for timeout to be at or before 60
seconds. (This assumes that your deadlock time value is 5.) In a data sharing
environment, reduce the value of DEADLOCK TIME so that the timeout period
is 40 seconds. This makes it more likely that your actual wait time for timeouts
is at or before 60 seconds.
This section describes the following ways to watch locking activity and lock
structure activity:
“Using the command DISPLAY DATABASE” on page 212
“Using the coupling facility structure activity report of RMF” on page 213
“Using the DB2 statistics trace” on page 213
“Using the DB2 accounting trace” on page 215
“Using the DB2 performance trace” on page 216
If the table space is defined with LOCKPART NO, the display looks like Figure 54.
The LOCKINFO field shows a value of S, indicating that this is a table space lock.
Figure 56. Partial RMF Coupling Facility Activity Report for lock structure
See Figure 57 on page 214 to see what kind of information you can get from a
statistics trace.
Explanation of fields:
## A The global contention rate.
# B The false contention rate.
# C These counters indicate the total number of lock, change, and unlock requests
# (including L-locks and P-locks) that were propagated to XES synchronously.
# D The number of resources (including L-locks and P-locks) that were propagated to
# XES asynchronously.
# DB2 uses the term asynchronous to mean that the request was done under a system
# execution unit, asynchronous to the allied work unit.
# This particular counter can be incremented when, for example, one DB2 has an IS
# lock on a particular table space and another DB2 requests an IX lock. The S child
# locks held by the first DB2 must be propagated under a system execution unit to
# XES and the coupling facility. See Figure 50 on page 203 for an example of this.
# IRLM has knowledge of more lock types than XES. Thus, IRLM often resolves
# contention that XES cannot. The most common example of XES-level contention is
# usually the intent locks (IS and IX) on the parent L-locks. IS and IX are compatible
# to IRLM but not to XES. Another common example is the U and S page L-locks; U
# and S are compatible to IRLM, but not to XES.
# G The number of false contentions.
#
# In this particular work load of 100 percent R/W sharing, 23 percent of LOCK
requests were not propagated to XES and the coupling facility because of locking
optimizations.
This trace causes DB2 to write a trace record every time a lock is suspended and
every time it is resumed. Part of the data that is recorded is the resource name that
is experiencing the contention. By determining which shared resources are
experiencing the lock contention, you might be able to make some design changes
or other tuning actions to increase concurrency. Check for contention within IRLM,
because IRLM indicates true contention over resources.
See DB2 PM for OS/390 Report Reference Volume 2 for more information about the
data shown in IFCID 0045.
| When you change the size of the lock structure dynamically, only the modify lock
| list portion of the structure is changed immediately. The size of the lock table
| portion remains unchanged until the structure is rebuilt. When the structure is
| rebuilt, the structure is reallocated at the changed size, with the storage divided
Then you can enter the following command (this example assumes the group name
is DSNDB0G):
SETXCF START,ALTER,STRNAME=DSNDB0G_LOCK1,SIZE=newsize
This example assumes that newsize is less than or equal to the maximum size
defined the CFRM policy for the lock structure.
If the maximum size (SIZE in the CFRM policy) is still not big enough, you must
increase the lock storage in the CFRM policy and rebuild the lock structure.
# For a duplexed lock structure, you are changing the size of both the primary and
# secondary structure with a single command.
| Because the dynamic method affects only the record table entries portion of the
| lock structure, the impact of changing the lock size can have a disproportionately
| large effect on the record table list portion of the structure. For example, if you
| halve the size of the lock structure, it can result in all of the available record table
| entries being taken away — probably not the result you want. For the same reason,
| if you double the lock structure size, the increased storage space is used entirely by
| the record table unless a rebuild occurs or the group is shut down, the structure is
| forced, and the group is restarted. If either of these are done after the size is
# changed, then the split of the new structure is determined by the number of lock
# table entries requested by the first IRLM to connect to the group.
| This method increases the number of record table entries, since the
| INITSIZE is not altered.
| b. If your contention rates are high and you want more lock table entries, then:
| 1) If you are letting IRLM control the number of lock entries to request,
| you should increase the INITSIZE by a power of 2. This also doubles the
| size of the record table.
| 2) If you want to control the number of hash entries to request, then issue
# the MODIFY SET,LTE= command, where the LTE= value used increases
| the current number of lock entries by powers of two. For example, if
| you currently have 8MB of lock entries, then specify:
# F irlmproc,SET,LTE=16
| Warning: This method decreases the number of record table entries if
| the INITSIZE is not altered.
| If the INITSIZE is not large enough to provide the lock table storage and
| adequate record table storage, you will experience failures trying to
| write RLE to the coupling facility. If you do not want the record table
| size to change, you must increase the INITSIZE by the same amount of
| storage that will be used by the additional lock table entries. For
| example, if you currently have 8MB of lock table entries and you issue:
# F irlmproc,SET,LTE=16
| with an INITSIZE of 32MB, you will not have any storage left for record
| table entries. Determine the additional storage needed with the formula:
| lock table entries (new) - lock table entries (old) x 2byte = additional
| storage for lock table entries
With data sharing, group buffer pools are a key component of cache coherency as
are the subsystem locking mechanisms, the P-locks, used in that process. Your
understanding of these processes is helpful when tuning the data sharing group
for best performance.
It is also possible to cache clean pages in the group buffer pool as a mutually
exclusive alternative to hiperpools.
The group buffer pool contains information necessary for maintaining cache
coherency. Pages of GBP-dependent page sets are registered in the group buffer
pool. When a changed page is written to the group buffer pool, all DB2 subsystems
that have this page cached in their buffer pools are notified that the page has been
invalidated (this notification does not cause a processing interruption on those
systems). This is called cross-invalidation. When a member needs a page of data and
finds it in its buffer pool, it tests to see if the buffer contents are still valid. If not,
then the page must be refreshed, either from the group buffer pool or DASD.
The above procedure works only when you are altering a table space to a buffer
pool with the same page size. For information about changing an existing page
size, see Part 2 (Volume 1) of DB2 Administration Guide.
Defining private data: If you want access to table space named NOSHARE
limited only to DB2C, you could assign NOSHARE to a previously unused buffer
pool, such as BP25, using the ALTER TABLESPACE statement. Do not define a
group buffer pool that corresponds to BP25, and assign BP25 a size of zero on any
other DB2 in the group. This prevents the other members of the group from
attempting to use this buffer pool and therefore from accessing table space
NOSHARE.
Although you do not have as much control over physical locks as over transaction
locks, they play an important part in how DB2 tracks inter-DB2 interest. Page set
and page P-locks are described in more detail in “P-locking” on page 225.
Page set P-lock operations occur on each member, and reflect that member’s level
of interest in a page set. Even if only one data sharing member is active, page set
P-lock operations still occur. Table 41 shows when those operations occur on each
member.
Table 41. When page set P-lock operations occur on each member
Event Page set P-lock operation
Page set or partition data sets are physically Page set P-lock is obtained in a read-only
opened. state.
Page set or partition is first updated. Page set P-lock is changed to a read-write
state.
In addition to the events mentioned in Table 41 on page 221, there is also a special
case that occurs in the following conditions:
v There is a single DB2 with R/W interest and any number of DB2 subsystems
with R/O interest.
v All members have R/O interest and the page set or partition has been
GBP-dependent since the time it was physically opened.
In those conditions, if the R/O DB2 subsystems do not reference the page set again
in a certain amount of time, DB2 physically closes the page set for the R/O DB2
subsystems to remove the inter-DB2 R/W interest. See Figure 60 on page 223 for
an example of this.
Figure 59. P-lock operations between two members. The arrows indicate that the members
are negotiating P-lock modes.
Figure 60 on page 223 shows what happens when a single update remains.
Tuning recommendation
To avoid having DB2 go in and out of GBP-dependency too often, tune the
subsystem parameters that affect when data sets are switched to a different state.
These parameters are found on installation panel DSNTIPN:
v CHECKPOINT FREQ
v RO SWITCH CHKPTS
v RO SWITCH TIME
See Part 5 (Volume 2) of DB2 Administration Guide for more information about
these parameters.
Figure 61. Sample DISPLAY DATABASE output showing the amount of inter-system sharing
Figure 62. Sample DISPLAY DATABASE output showing GBP-dependent table spaces
Page set P-locks are identified by a member name rather than a correlation ID.
They are also identified by ’PP’ as the lock unit. If any of the P-locks shown in the
output have a lock state of NSU, SIX, or IX, then the identified page set is
GBP-dependent. Thus, the above output shows that DSN8S71D is GBP-dependent.
End of General-use Programming Interface
Figure 63. Sample DISPLAY BUFFERPOOL output indicating page sets and partitions are
group-buffer-pool-dependent
P-locking
This section describes P-locks on page sets and on pages, and it describes how to
monitor and tune those locks.
P-locks do not control concurrency but they do help DB2 track the level of interest
in a particular page set or partition and determine the need for cache coherency
controls.
P-locks differ from L-locks (transaction locks) in the following important ways:
Chapter 6. Performance monitoring and tuning 225
v P-locks are owned by a subsystem. After a P-lock is obtained for the subsystem,
later transactions accessing the locked data do not have to incur the expense of
physical locking.
v The mode of a P-lock can be negotiated. If one DB2 subsystem requests a P-lock
that another DB2 holds in an incompatible mode, the existing P-lock can be
made less restrictive. The negotiation process usually involves registering pages
or writing pages to the GBP, and then downgrading the P-lock to a mode that is
compatible with the new request.
Use the DISPLAY DATABASE command with the LOCKS option to determine if
there are retained locks on a table space, index, or partition. An “R” in the
LOCKINFO column indicates that a lock is retained.
Table 42 shows the possible modes of access for a page set and the P-lock state that
is retained should DB2 fail.
Table 42. Determining retained P-lock state
Other DB2 subsystems’
Your DB2’s interest interest Retained P-lock states of your DB2
R/O None, R/O None
R/O R/W None
R/W None X or NSU
Note: NSU stands for “non-shared update”. It acts like an X lock, but is only used during
P-lock negotiation from an X to an SIX.
R/W R/O IX
Note: The P-lock is retained in SIX mode if the page set or partition is an index that is not
on a DB2 catalog or directory table space.
R/W R/W IX
Page P-locks
There are times when a P-lock must be obtained on a page to preserve physical
consistency of the data between members. These locks are known as page P-locks.
Page P-locks, are used, for example, when two subsystems attempt to update the
same page of data and row locking is in effect. They are also used for
GBP-dependent space map pages and GBP-dependent leaf pages for indexes,
regardless of locking level. Page P-locks can also be retained if DB2 fails.
If an index page set or partition is GBP-dependent, DB2 does not use page P-locks
for that index page set or partition if all of the following are true:
v Only one DB2 member is updating the index page set or partition
v There are no repeatable read claimers on the read-only DB2 members for the
index page set or partition
v The index is not on a DB2 catalog or directory table space
To decrease the possible contention on those page P-locks, consider using page
locking and a MAXROWS value of 1 on the table space to simulate row locking.
You can get the benefits of row locking without the data page P-lock contention
that comes with it. A new MAXROWS value does not take effect until you run
REORG on the table space.
Monitoring P-locks
There is more overhead when there is inter-DB2 R/W interest in a page set than
when there is not. Although DB2 does dynamically track inter-DB2 R/W interest,
which helps avoid data sharing overhead when it is not needed, you will pay
some cost for the advantages of data sharing.
Monitoring P-lock activity, especially page P-locks, can help you determine if it is
necessary to take steps to control inter-DB2 R/W interest. If there is excessive
global contention that cannot be resolved by any tuning measures, it might be
necessary to reduce the locking overhead by keeping some transactions and data
together on a single system.
How to find information about page set P-locks: You can use the DISPLAY
DATABASE command with the LOCKS option to find out information about page
set P-locks, including what DB2 subsystem is holding or waiting for P-locks, and
whether there are P-locks being held because of a DB2 failure. Figure 62 on page
224 has a sample of output obtained from the command. A “PP” in the
LOCKINFO field of the output indicates that a particular lock is a page set or
partition P-lock.
Information about P-locks can be obtained by the statistics and accounting traces,
along with information about transaction locking. Performance class 20 (IFCID
0251) also contains information about P-lock negotiation requests. IFCID 0251 is
mapped by DSNDQW04.
How to find information about page P-locks: Page P-locking activity is recorded
along with the rest of the data sharing locking information in the statistics and
accounting trace classes. You can find more detail about those page P-locks in
performance trace class 21 (IFCID 0259). IFCID 0259 allows you to monitor page
P-locking without having to turn on a full DB2 lock trace. IFCID 0259 is mapped
by DSNDQW04.
If longer copy times means you must take fewer incremental copies, monitor your
active log data sets to ensure that you do not have to go to a tape archive data set
to do recovery. You might need to make the active log data sets larger, specify
more active log data sets, or archive to DASD to avoid this possibility.
Read operations
This section describes how the process of reading data is changed for data sharing.
Note that for duplexed group buffer pools, read activity occurs only against the
primary structure.
For duplexed group buffer pools, only the primary structure is used for
cross-invalidations.
Table 43. Determining when page validity must be tested
Other DB2 subsystems’
Your DB2’s interest interest Test page validity?
R/O None, R/O No
R/O R/W Yes
R/W None No
R/W R/O No
R/W R/W Yes
Prefetch processing
DB2’s prefetch processing for GBP-dependent page sets and partitions varies
depending on what release of MVS you are running and what level (CFLEVEL) of
coupling facility the group buffer pool is allocated in.
When the group buffer pool is allocated in a coupling facility with CFLEVEL=2 or
higher, DB2 can register the entire list of pages that are being prefetched with one
request to the coupling facility. This can be used for sequential prefetch (including
sequential detection) and list prefetch.
DB2 does not include on the list any valid pages that are found in the local virtual
buffer pool or hiperpool.
For those pages that are cached as “changed” in the group buffer pool, or those
that are locked for castout, DB2 still retrieves the changed page from the group
buffer pool one at a time. For large, sequential queries, there most likely won’t be
any changed pages in the group buffer pool.
However, when there is only a single DB2 that has exclusive R/W interest in the
page set (that is, only one DB2 has the page set open for update), pages are not
cached in the group buffer pool when they are read in. They can, however, be
cached in the hiperpool, if one exists.
Choosing GBPCACHE ALL does not prevent DB2 from continuing to cache
changed pages in the group buffer pool before writing them to DASD (the function
provided by the default GBPCACHE CHANGED).
Example:
Here is an example of using the GBPCACHE clause to cache read-only page sets in
the group buffer pool:
ALTER TABLESPACE DSN8D71A.DSN8S71D
GBPCACHE ALL;
See Chapter 5 of DB2 SQL Reference for more information about the GBPCACHE
clause.
End of General-use Programming Interface
Why choose GBPCACHE ALL?: GBPCACHE ALL avoids having several different
members read the same page in from DASD. It is most useful for workloads where
there is primarily inter-DB2 read interest. To prevent double buffering for clean
pages, hiperpools are not used for page sets or partitions that are defined with the
GBPCACHE ALL option unless the DB2 is an exclusive updater (no other DB2
subsystems have the page set open). In a non-data-sharing environment,
hiperpools are still used regardless of the GBPCACHE option.
Planning consideration: If you use the GBPCACHE ALL option, it increases the
need for coupling facility resources: processing power, storage, and channel
utilization. If you cannot afford the additional strain on coupling facility resources,
consider using a 3990 Model 6 cache controller that exploits record and track level
caching to achieve caching benefits for a read-intensive work load.
Recommendation: For LOB table spaces, use GBPCACHE SYSTEM, which is the
default for LOB table spaces. If you use GBPCACHE ALL or GBPCACHE
CHANGED for a LOB table space that is defined with LOG NO and the coupling
Write operations
With data sharing, DB2 usually writes changed data to the group buffer pool
before writing that changed data to DASD.
GBPCACHE NONE: For GBPCACHE NONE page sets, or for page sets defined
in a group buffer pool defined as GBPCACHE(NO), no pages are written to the
group buffer pool. The group buffer pool is used solely for the purpose of buffer
cross-invalidation. At every COMMIT, any pages that were updated by the
transaction and still have not yet been written are synchronously written to DASD
during commit processing. This can have a severe impact on performance for most
types of transactions.
One potential advantage of not caching in the group buffer pool is that data does
not have to be recovered from the log if the coupling facility fails. However,
because DB2 still depends on the cross-invalidation information that is stored in
the group buffer pool, a coupling facility failure still means some data might not
be available. That is why it is recommended to specify an alternate coupling
Advantage of specifying GBPCACHE(NO) for group buffer pools: You can specify
GBPCACHE(NO) on the group buffer pool level instead of on the page set level. It
is usually less disruptive to change the group buffer pool attribute than the page
set attribute. Because the GBPCACHE(NO) attribute takes precedence over the
GBPCACHE option on the page set, you could plan for using different types of
processing at different times of day. For example, assume that you want to run
transactions or queries during the day, but you want to do batch updates at night.
Assume also that your batch updates would benefit from no group buffer pool
data caching. You could do the following:
1. Define the table space as GBPCACHE CHANGED and put it into its own
buffer pool.
2. Define the corresponding group buffer pool as GBPCACHE(YES) for daytime
processing.
3. At night, use the ALTER GROUPBUFFERPOOL command to change the group
buffer pool to GBPCACHE(NO).
# 4. Set the SETXCF START,REBUILD,STRNAME=strname command to enable the
new attribute.
5. In the morning, use the ALTER GROUPBUFFERPOOL command to change the
group buffer pool back to GBPCACHE(YES).
# 6. Issue the SETXCF START,REBUILD,STRNAME=strname command to enable the
new attribute.
Is there ever any reason not to cache? It is possible to obtain a performance benefit
for applications in which an updated page is rarely, if ever, referenced again, such
as a batch job that sequentially updates a large table. By not caching, you save the
costs of transferring data to the group buffer pool and casting out from the group
buffer pool. Again, this benefit is at the cost of synchronous DASD I/O at
COMMIT. To reduce the amount of synchronous DASD I/O at COMMIT, you can
lower the deferred write thresholds so that DB2 writes more pages asynchronously
prior to COMMIT.
If you use GBPCACHE NONE, enable DASD Fast Write and set the vertical
deferred write threshold (VDWQT) to 0. By setting this threshold to 0, you let
deferred writes happen continuously before the COMMIT, thus avoiding a large
surge of write activity at the COMMIT.
When a page of data is written to the group buffer pool, all copies of that page
cached in other members’ buffer pool are invalidated. This means that the next
time one of those members needs that page, the page must be refreshed from the
group buffer pool (or DASD).
Before an updated page is written to the group buffer pool or DASD, DB2 also
ensures that the last update log record for that page is externalized to the active
log. This is necessary to ensure that updates can be backed out when necessary.
When committing an updating transaction, pages that were updated but not yet
written to the group buffer pool are synchronously written to the group buffer
pool. If a group buffer pool is required and unavailable (because of a channel or
hardware failure) at the time the transaction commits, DB2 places all the
transaction’s updated pages on the logical page list (LPL) associated with each
page set. After the problem is fixed, use a START DATABASE command with the
SPACENAM option to recover the pages on the LPL.
Instead, DB2 writes changed pages for the transaction directly to DASD at or
before COMMIT. DB2 batches up to 32 pages in a single I/O.
When DB2 writes a changed page to DASD, DB2 cross-invalidates the page using
the group buffer pool. These cross-invalidations are called explicit
cross-invalidations. These explicit cross-invalidations are reported in statistics
separately from cross-invalidations caused by directory reclaims or by writes of a
changed page to a group buffer pool.
Writing to a duplexed group buffer pool: When a group buffer pool is duplexed,
the following events occur:
1. For some fixed number of pages that must be written, do the following for
each page:
Other DB2 subsystems can write this page to the group buffer pool even as the
page is being cast out. Some events explicitly cause pages to be cast out to DASD,
such as the STOP DATABASE command.
Pages that are cast out as a result of meeting a threshold remain cached in the
group buffer pool, and the buffers are available for stealing. Pages that are cast out
because there is no more shared interest in the page set are purged from the group
buffer pool.
Casting out from a duplexed group buffer pool: DB2 casts out data to DASD
only from the primary structure. After a set of pages has been cast out, the same
set of pages is deleted from the secondary structure. See the DELETE NAME LIST
counter in the DISPLAY GROUP BUFFERPOOL MDETAIL report for how many
times this event occurs. DB2 ensures that any pages that might have been written
to the group buffer pool during castout processing are not deleted from the
secondary structure.
Use the DISPLAY DATABASE command with the LOCKS option to display the
current castout owner for a given page set:
Display the castout owner for a particular page set or partition with (CO) by the
member name, as shown in Figure 64.
.
.
.
TBS43 TS 01 RW H-SIX,PP,I
- MEMBER NAME DB2G (CO)
TBS43 TS 02 RW BATCH SELEC H-IS,P,C
. - MEMBER NAME DB1G
.
.
Figure 64. Partial DISPLAY DATABASE output showing castout owner for a partition
Use the DISPLAY BUFFERPOOL command with the CASTOWNR keyword to see
which page sets or partitions the members hold castout ownership for:
-DIS BUFFERPOOL(BP0) CASTOWNR(Y)
The output will list the members that hold the page set or partition p-lock in ″U″
state.
Figure 65. Partial DISPLAY DATABASE output showing the list of members that hold the
page set or partition p-lock in ″U″ state
The group buffer pool checkpoint is triggered by the structure owner. The structure
owner is usually the first DB2 that connects to this group buffer pool, although the
ownership can change over time. Message DSNB798I in the DISPLAY
GROUPBUFFERPOOL output shows which DB2 is the current structure owner.
Tuning the group buffer pool checkpoint interval: At the group buffer pool
checkpoint, the structure owner records, in the SCA and in its own BSDS, the
LRSN from which group buffer pool recovery should take place, if necessary. This
LRSN is displayed in the DISPLAY GROUPBUFFERPOOL output.
If the resource consumption of the group buffer pool checkpoint is higher than you
prefer:
If the checkpoint is not moving the recovery LRSN forward fast enough, decrease
the checkpoint interval. You can determine the LRSN by periodically issuing the
–DIS GBPOOL command.
The following instrumentation helps you more effectively monitor and tune the
group buffer pool checkpoint:
v DISPLAY GROUPBUFFERPOOL shows which member is the structure owner
and also shows the group buffer pool checkpoint recovery LRSN:
DSNB798I -DB1G LAST GROUP BUFFER POOL CHECKPOINT 17:23:21 MAY 9, 1996
GBP CHECKPOINT RECOVERY LRSN = ACD74C01EE30
STRUCTURE OWNER = DB1G
Figure 66. Partial DISPLAY GROUPBUFFERPOOL output showing which member owns the
structure and the group buffer pool checkpoint recovery LRSN
v IFCID 0261, which gives summary statistics for each group buffer pool
checkpoint. You can use this record to estimate the processor cost and to monitor
the coupling facility interactions for each group buffer pool checkpoint.
v IFCID 0263, which gives summary statistics for the castouts. You can use this
record to monitor the castout activity that is caused by each group buffer pool
checkpoint (or castout that’s triggered for any other reason).
Figure 68. Group buffer pool castout thresholds. Both thresholds are expressed as
percentages of the total number of pages in the group buffer pool.
When DB2 writes changed pages to the group buffer pool, it determines how
many changed pages are on a particular class castout queue. If the number of
changed pages on a specified castout class queue exceeds the threshold, DB2 casts
out a number of pages from that queue.
Default group buffer pool class castout threshold: The default for the class
castout is 10, which means that castout is initiated for a particular page set or
partition when 10 percent of the group buffer pool contains changed pages for the
class.
How DB2 determines the group buffer pool castout threshold for a duplexed group
buffer pool: For duplexed group buffer pools, DB2 uses the smaller of the number
of data entries in the primary and secondary group buffer pools. For example, if
the primary contains 5000 data entries and the secondary contains 1000 data
entries, and GBPOOLT is 50%, then DB2 sets GBPOOLT to 500 pages (50% of 1000
pages).
Default group buffer pool castout threshold: The default value for the group
buffer pool castout threshold is 50, which means that when the group buffer pool
is 50 percent full of changed pages, castout is initiated.
Guidelines
In most cases, we suggest you use the CLASST and GBPOOLT thresholds to be the
corresponding VDWQT and DWQT thresholds for the local bufferpools if these
values perform well locally. Otherwise, you can use the default values (10 percent
for the class threshold and 50 percent for the group buffer pool threshold).
Depending on your work load, these values help reduce DASD contention during
castout.
If you find that some writes to the group buffer pool cannot occur because of a
lack of storage in the group buffer pool, increase the group buffer pool size, or
decrease the group buffer pool castout thresholds. One way to tell if this is
happening is to see the detail report of DISPLAY GROUPBUFFERPOOL. An
example report is shown in Figure 72 on page 246. The field indicated by E is the
one to watch for this type of problem.
Tuning the castout thresholds: The following can help you more effectively
monitor the group buffer pool castout thresholds:
v The DISPLAY GROUPBUFFERPOOL command with the MDETAIL option.
v The DB2 statistics trace.
v IFCID 0262, which gives summary statistics for each time that the GBPOOLT
threshold is reached. You can use this record to monitor how efficiently the
GBPOOLT threshold is handling the castout work.
v IFCID 0263, which gives summary statistics for the castouts done by the page set
and partition castout owners. All castout work for a given page set or partition
is done by the castout owner. You can use this record to monitor the efficiency
with which the page set or partition castout owners are doing their work.
The UNLOCK CASTOUT counter should always be significantly less than the
PAGES CASTOUT counter. If it is not (for example, if ″unlock castout″ is more
than half of ″pages cast out″), then the castout write I/O is not being done
efficiently (the number of pages written per I/O is normally close to the number
you get by dividing PAGES CASTOUT by UNLOCK CASTOUT). This is probably
because you have random update patterns on the DB2 data.
End of General-use Programming Interface
Effect of GBPCACHE ALL on guidelines: If you are using a group buffer pool to
cache pages as they are read in from DASD (GBPCACHE ALL page sets), then
consider lowering the threshold values to allow more space for caching those clean
pages.
This particular group buffer pool is duplexed, so you see information about both
allocations of the structure (the old structure is the primary structure, and the new
structure is the secondary one). Output similar to the following is produced:
Figure 69. MVS Command D XCF showing group buffer pool information
For more information about the D XCF command, see OS/390 MVS System
Commands.
Here is what the display might look like, assuming that the group buffer pool is
duplexed:
See Chapter 2 of DB2 Command Reference for more information about the syntax of
the command.
# You can also monitor Delete Name requests by using the DB2 PM Statistics Detail
# report or IFCID 263 (Page set castout detail). See Figure 74 on page 249 for an
# example of a DB2 PM Statistics Detail report, which contains Delete Name
# information.
End of General-use Programming Interface
Hint: For an easy way to collect interval statistics for performance analysis, create
a batch job that issues the following command periodically:
-DB1G DISPLAY GROUPBUFFERPOOL(*) GDETAIL(INTERVAL)
The first time you run the batch job is the base which purges existing statistics and
resets the interval. If you run the job the second time 5 minutes after the first, you
can continue running the job every 5 minutes to gather meaningful statistical data
on group buffer pool activity.
Statistics reporting intervals are not synchronized across the members of the data
sharing group. For counters that are pertinent to the entire data sharing group, like
group buffer statistics, DB2 PM group-scope statistics reports combine the data of
the individual members and present it to for the entire group. The member data is
apportioned to the same user-specified interval. DB2 PM presents the
synchronized statistics intervals for each member, adds up the counters across all
members and presents them as statistics on a per-group basis.
For more information about using the statistics report, see “What to look for in a
DB2 PM statistics report” on page 248.
The number of directory entries and data entries in the coupling facility structure
is determined by the size specified in the coupling facility policy and the ratio of
directory entries to data pages. The ratio is automatically defined for each group
buffer pool at the time the first member of the DB2 group is installed. The default
value used is 5 directory entries per data page.
For secondary group buffer pools, the ratio is the same as that for the primary.
For formulas to help you choose a ratio, see “Group buffer pool sizes” on page 44.
After installation, you can change the ratio with the ALTER GROUPBUFFERPOOL
command. However, the change does not take effect until the next time the group
buffer pool is allocated.
The following sections describe the symptoms of values that are not ideal for best
performance and how you can fix the problems.
In any event, pages in the group buffer pool have to be refreshed from DASD
more often because they are not in the group buffer pool. You can use the
Here is what the detail portion of the report output looks like:
DSNB783I -DB1G CUMULATIVE GROUP DETAIL STATISTICS SINCE 15:35:23 Mar 17, 1994
DSNB784I -DB1G GROUP DETAIL STATISTICS
READS
DATA RETURNEDA = 3845
DSNB785I -DB1G DATA NOT RETURNED
DIRECTORY ENTRY EXISTEDB = 27
DIRECTORY ENTRY CREATEDC = 28336
DIRECTORY ENTRY NOT CREATEDD = 332, 0
What you need to determine is the read hit percentage. To calculate this value, you
need to determine how many of the total number of reads were successful in
returning data. Use the following formula:
(A ⁄ (A + B + C + D(first number)))× 100
Data was returned in approximately 12 percent of the read requests to the group
buffer pool. This low percentage of “read hits” might indicate that the average
residency time for a cached page in group buffer pool is too short. You might
benefit from altering the group buffer pool to increase the total size, as described
in “Changing the size of the group buffer pool” on page 252.
To determine if the low read hit percentage is a problem, see the field indicated by
B in the statistics report, shown in Figure 74 on page 249. (The same counter also
exists in the accounting report.) Ideally, that field contains 0. A non-zero value
there in conjunction with a low read hit percentage can indicate that your group
buffer pool is too small.
“Too few directory entries” and “Too few data entries” on page 248 describe how
to determine if the problem is caused by a suboptimal ratio of directory entries to
data entries.
End of General-use Programming Interface
By monitoring the storage use of the group buffer pool, you can avoid data
outages caused by a serious lack of storage in the group buffer pool.
Figure 73. Partial output of DISPLAY GROUPBUFFERPOOL command. Make sure the
SNAPSHOT value (C) does not rise significantly above (B × A).
When existing directory entries are being reclaimed to handle new work,
cross-invalidation must occur for all the DB2 subsystems that have the particular
data pages in their buffer pools, even when the data hasn’t actually changed.
If there is a high value in G, check the group buffer pool hit percentage
(described in “Group buffer pool size is too small” on page 245) to see if the lack
of directory entries might be causing an excessive number of reads from DASD.
To increase the number of directory entries in the group buffer pool, you can do
one of the following:
v Increase the total size of the group buffer pool, as described in “Changing the
size of the group buffer pool” on page 252.
v Use the ALTER GROUPBUFFERPOOL command to adjust the ratio in favor of
directory entries, as described in “Changing the ratio of directory to data
entries” on page 254.
If a group buffer pool does not have enough data entries, then castout to DASD
occurs more frequently. You can see the number of pages cast out by using the
GDETAIL option of the DISPLAY GROUPBUFFERPOOL command.
A more serious data entry shortage is indicated by the field denoted by E in the
DISPLAY GROUPBUFFERPOOL GDETAIL report shown in Figure 72 on page 246.
A value in this field indicates that the data page resources of the coupling facility
are being consumed faster than the DB2 castout processes can free them.
To increase the number of data entries in the group buffer pool, you can do one of
the following:
v Increase the total size of the group buffer pool, as described in “Changing the
size of the group buffer pool” on page 252.
v Use the ALTER GROUPBUFFERPOOL command to adjust the ratio in favor of
data entries, as described in “Changing the ratio of directory to data entries” on
page 254.
F
CLEAN PAGES SYNC.WRITTEN 0.00 0.00 0.00 0.00
CHANGED PAGES SYNC.WRITTEN 66058.00 6604.48 1785.35 2.42
G
CLEAN PAGES ASYNC.WRITTEN 0.00 0.00 0.00 0.00
CHANGED PAGES ASYNC.WRITTEN 722.00 72.19 19.51 0.03
E
Explanation of fields:
A The number of reads to the group buffer pool that were required because
the page was invalidated in the member’s buffer pool. The member did
find the needed data in the group buffer pool.
B The number of reads to the group buffer pool that were required because
the page was invalidated in the member’s buffer pool. The member did not
find the needed data in the group buffer pool and had to go to DASD to
retrieve the page.
This section describes how you can change attributes of the group buffer pool. The
following tasks are described:
v “Changing the castout threshold values”
v “Changing the checkpoint frequency”
v “Changing the size of the group buffer pool”
v “Changing the ratio of directory to data entries” on page 254
If you want to start or stop duplexing for a group buffer pool, see “Starting and
stopping duplexing for a structure” on page 175. If you want to make hardware
changes to the coupling facility or move a group buffer pool from one coupling
facility to another, see “Shutting down the coupling facility” on page 176.
changes the class castout threshold to 15 percent and the group buffer pool
threshold to 55 percent. These changes take effect immediately.
Then you can enter the following command (this example assumes the group name
is DSNDB0G):
SETXCF START,ALTER,STRNAME=DSNDB0G_GBPn,SIZE=newsize
This example assumes that newsize is less than or equal to the maximum size
defined the CFRM policy for the group buffer pool.
If the maximum size (SIZE in the CFRM policy) is still not big enough, you must
use the method described in “Static method” on page 253.
And then you enter the following MVS command to increase the size:
SETXCF START,ALTER,STRNM=DSNDB0G_GBP1,SIZE=1536
Here’s what the DISPLAY GROUPBUFFERPOOL command output might look like
after you alter the size:
.
.
.
DSNB757I -DB1G MVS CFRM POLICY STATUS FOR DSNDB0G_GBP1 = NORMAL
MAX SIZE INDICATED IN POLICY = 4096 KB
ALLOCATED = YES
DSNB758I -DB1G ALLOCATED SIZE = 1536 KB
VOLATILITY STATUS = VOLATILE
REBUILD STATUS = NONE
DUPLEXING STATUS = SIMPLEXED
CFNAME, CFLEVEL = LF01, 5
DSNB759I -DB1G NUMBER OF DIRECTORY ENTRIES = 1426
NUMBER OF DATA PAGES = 284
. NUMBER OF CONNECTIONS = 2
.
.
Notice that the allocated size has increased and the numbers of directory entries
and data pages have increased as well. The existing ratio is maintained.
You must use the following procedure. Because the group buffer pool must be
rebuilt, use this procedure when there is little activity in the group.
# 1. Increase the storage for the group buffer pool in the CFRM policy, and use
# DUPLEX(ENABLED).
2. Use the following MVS command to start the updated policy:
SETXCF START,POLICY,TYPE=CFRM,POLNAME=policyname
# 3. Use the following command to stop duplexing:
# SETXCF STOP,REBUILD,DUPLEX,STRNAME=strname,KEEP=OLD
# 4. Use the following command to rebuild the group buffer pool:
SETXCF START,REBUILD,STRNAME=strname
# 5. Use the DISPLAY GROUPBUFFERPOOL command to determine whether the
# rebuild caused duplexing to restart.
6. If duplexing did not restart on its own, use the following command to restart it:
For the change to take effect, you must rebuild the group buffer pool by using the
# SETXCF START, REBUILD,STRNAME=strname command.
For duplexed group buffer pools, you must stop duplexing before you can rebuild
the group buffer pool. The procedure, then, is this:
1. Stop duplexing, as described in “Stopping duplexing” on page 176 to revert the
group buffer pool to simplex mode.
2. Alter the group buffer pool ratio and issue the SETXCF
# START,REBUILD,STRNAME=strname command.
3. Start duplexing, as described in “Starting duplexing” on page 175.
DB2 does let you duplex a GBPCACHE(NO) group buffer pool. If the group buffer
pool is currently GBPCACHE(YES) but the NO attribute is pending, then if you
start a duplexing rebuild, DB2 ignores the pending GBPCACHE(NO) attribute.
When you bind your application from one of the members, DB2 chooses the best
access path, given the catalog statistics, CPC model, buffer pool sizes, among other
things. Suppose, though, that the selected access path is optimal for the one
member, but is a relatively poor choice for a different member in the same group.
Because the group shares the catalog and directory, the same plan (and hence the
same access paths) are used regardless of member, after the application is bound.
Where to bind in a mixed data sharing configuration: If your data sharing group
consists of mixed CPC models, be aware that the speed of a central processor (CP)
might change your access path. This effect is more likely with long-running queries
than with fast-running transactions.
EXPLAIN informs you about access paths that DB2 chooses. Because EXPLAIN can
be run on one DB2 subsystem and a plan can be bound and executed on other
DB2 subsystems in a data sharing group, it is important to know which member
performed the EXPLAIN. The PLAN_TABLE column GROUP_MEMBER contains
the member name of the DB2 that performed the EXPLAIN. The column is blank if
the DB2 subsystem was not in a data sharing environment when the EXPLAIN
was performed.
End of Product-sensitive Programming Interface
IRLM names
Each DB2 subsystem in the data sharing group has an associated IRLM. Each
member’s IRLM and its associated procedures must be named. The IRLM group
name, subsystem name, and member ID are parameters on the IRLM proc. This
requires a separate IRLM proc for every IRLM in the group.
Table 46. IRLM names. There is one set of names per DB2 member.
Name Length Example Format Comments
IRLM group name 8 xxxxxxxx This is a parameter on issnIRLM proc. It must be
unique across the Sysplex, to avoid name conflicts.
IRLM subsystem name 4 issn This is a parameter on the issn IRLM procedure.
This subsystem name must be unique within the
data sharing group to avoid the problem of DB2
connecting to the wrong IRLM.
IRLM procedure name 8 mssnIRLM Each DB2 member knows its IRLM by the
procedure and subsystem name saved in that
member’s subsystem parameter load module.
IRLM member ID 3 This is a number between This ID uniquely names an IRLM within a group. It
1 and 255 (inclusive). is a parameter on issnIRLM procedure and must be
unique within the data sharing group.
In Version 7, some utility functions are available as optional products; you must
separately order and purchase a license to such utilities. Discussion of utility
functions in this publication is not intended to otherwise imply that you have a
license to them. See DB2 Utility Guide and Reference for more information about
utilities products.
Appendix B. Summary of changes to DB2 for OS/390 and z/OS Version 7 263
Improved connectivity
Version 7 offers improved connectivity:
v Support for COMMIT and ROLLBACK in stored procedures lets you commit or
roll back an entire unit of work, including uncommitted changes that are made
from the calling application before the stored procedure call is made.
v Support for Windows Kerberos security lets you more easily manage
workstation clients who seek access to data and services from heterogeneous
environments.
v Global transaction support for distributed applications lets independent DB2
agents participate in a global transaction that is coordinated by an XA-compliant
transaction manager on a workstation or a gateway server (Microsoft Transaction
Server or Encina, for example).
v Support for a DB2 Connect Version 7 enhancement lets remote workstation
clients quickly determine the amount of time that DB2 takes to process a request
(the server elapsed time).
v Additional enhancements include:
– Support for connection pooling and transaction pooling for IBM DB2 Connect
– Support for DB2 Call Level Interface (DB2 CLI) bookmarks on DB2 UDB for
UNIX, Windows, OS/2
To learn about all of the migration considerations from Version 5 to Version 7, read
the DB2 Release Planning Guide for Version 6 and Version 7; to learn about content
information, also read appendixes A through F in both books.
Appendix B. Summary of changes to DB2 for OS/390 and z/OS Version 7 265
266 Data Sharing: Planning and Administration
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product,
program, or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106-0032, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
Trademarks
The following terms are trademarks of the IBM Corporation in the United States,
in other countries, or both:
AD/Cycle eNetwork
AIX Enterprise System/3090
APL2 Enterprise System/9000
AS/400 IBM
BookManager IMS
C/370 MVS/DFP
CICS MVS/ESA
CICS/ESA Net.Data
CICSPlex OS/2
DATABASE 2 OS/390
DataHub Parallel Sysplex
DataPropagator QMF
DB2 PR/SM
DB2 Connect RACF
DB2 Universal Database RAMAC
DFSMS RMF
DFSMSdfp SAA
DFSMSdss SecureWay
DFSMShsm Sysplex Timer
DFSMS/MVS System/370
DFSORT System/390
Distributed Relational Database S/390
Architecture System/390
DRDA VTAM
z/OS
Other company, product, and service names may be trademarks or service marks
of others.
Tivoli and NetView are trademarks of Tivoli Systems, Inc. in the United States,
other countries, or both.
Notices 269
The Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and/or in other
countries.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft™ Corporation in the United States and/or other countries.
UNIX is a registered trademark of The Open Group in the United States and other
countries.
active log. The portion of the DB2 log to which log central processor complex (CPC). A physical
records are written as they are generated. The active collection of hardware (such as an ES/3090) that
log always contains the most recent log records, consists of main storage, one or more central
whereas the archive log holds those records that are processors, timers, and channels.
older and no longer fit on the active log.
CFRM policy. A declaration by an MVS administrator
active member state. A state of a member of a data regarding the allocation rules for a coupling facility
sharing group. An active member is identified with a structure.
group by XCF, which associates the member with a
particular task, address space, and MVS system. A character large object (CLOB). A sequence of bytes
member that is not active has either a failed member representing single-byte characters or a mixture of
state or a quiesced member state. single- and double-byte characters where the size of the
value can be up to 2 GB−1. In general, character large
archive log. The portion of the DB2 log that contains object values are used whenever a character string
log records that have been copied from the active log. might exceed the limits of the VARCHAR type.
castout owner. The DB2 member that is responsible cross-system extended services (XES). A set of MVS
for casting out a particular page set or partition. services that allow multiple instances of an application
or subsystem, running on different systems in a Sysplex
Glossary 273
that a particular DB2 data sharing group generates physically complete. The state in which the
form a strictly increasing sequence for each DB2 log concurrent copy process is completed and the output
and a strictly increasing sequence for each page across data set has been created.
the DB2 group.
P-lock. Physical lock.
log truncation. A process by which an explicit starting
RBA is established. This RBA is the point at which the policy. See CFRM policy.
next byte of log data is to be written.
primary group buffer pool. For a duplexed group
LPL. Logical page list. buffer pool, the structure used to maintain the
coherency of cached data. This structure is used for
LRSN. Log record sequence number. page registration and cross-invalidation. The OS/390
equivalent is old structure. Compare with secondary
group buffer pool.
M
member name. The MVS XCF identifier for a Q
particular DB2 subsystem in a data sharing group.
quiesced member state. A state of a member of a data
modify locks. An L-lock or P-lock with a MODIFY sharing group. An active member becomes quiesced
attribute. A list of these active locks is kept at all times when a STOP DB2 command takes effect without a
in the coupling facility lock structure. If the requesting failure. If the member’s task, address space, or MVS
DB2 fails, that DB2 subsystem’s modify locks are system fails before the command takes effect, the
converted to retained locks. member state is failed.
N R
negotiable lock. A lock whose mode can be result table. The set of rows that are specified by a
downgraded, by agreement among contending users, to SELECT statement.
be compatible to all. A physical lock is an example of a
negotiable lock. retained lock. A MODIFY lock that a DB2 subsystem
was holding at the time of a subsystem failure. The
nonpartitioning index. Any index that is not a lock is retained in the coupling facility lock structure
partitioning index. across a DB2 failure.
P S
page version number. A 6-byte field in a page header SCA. Shared communications area.
that is strictly increasing.
secondary group buffer pool. For a duplexed group
parallelism assistant. In Sysplex query parallelism, a buffer pool, the structure that is used to back up
DB2 subsystem that helps to process parts of a parallel changed pages that are written to the primary group
query that originates on another DB2 subsystem in the buffer pool. No page registration or cross-invalidation
data sharing group. occurs using the secondary group buffer pool. The
OS/390 equivalent is new structure.
parallelism coordinator. In Sysplex query parallelism,
the DB2 subsystem from which the parallel query shared communications area (SCA). A coupling
originates. facility list structure that a DB2 data sharing group uses
for inter-DB2 communication.
Parallel Sysplex®. A set of MVS systems that
communicate and cooperate with each other through share lock. A lock that prevents concurrently
certain multisystem hardware components and executing application processes from changing data,
software services to process customer workloads. but not from reading data. Contrast with exclusive lock.
physical lock (P-lock). A lock type that DB2 acquires SQL function. A user-defined function in which the
to provide consistency of data that is cached in CREATE FUNCTION statement contains the source
different DB2 subsystems. Physical locks are used only code. The source code is a single SQL expression that
in data sharing environments. Contrast with logical lock evaluates to a single value. The SQL user-defined
(L-lock). function can return only one parameter.
physical lock contention. Conflicting states of the
requesters for a physical lock. See negotiable lock.
T
table space. A page set that is used to store the
records in one or more tables.
Glossary 275
276 Data Sharing: Planning and Administration
Bibliography
DB2 Universal Database Server for OS/390 and DB2 DataPropagator™
z/OS Version 7 product libraries: v DB2 UDB Replication Guide and Reference,
SC26-9920
DB2 for OS/390 and z/OS
v An Introduction to DB2 for OS/390, SC26-9937 Net.Data®
v DB2 Administration Guide, SC26-9931
The following books are available at this Web site:
v DB2 Application Programming and SQL Guide, www.ibm.com/software/net.data/
SC26-9933 v Net.Data Library: Administration and
v DB2 Application Programming Guide and Reference Programming Guide for OS/390 and z/OS
for Java, SC26-9932 v Net.Data Library: Language Environment Interface
v DB2 Command Reference, SC26-9934 Reference
v Net.Data Library: Messages and Codes
v DB2 Data Sharing: Planning and Administration,
v Net.Data Library: Reference
SC26-9935
v DB2 Data Sharing Quick Reference Card, DB2 PM for OS/390
SX26-3846
v DB2 PM for OS/390 Batch User's Guide,
v DB2 Diagnosis Guide and Reference, LY37-3740 SC27-0857
v DB2 Diagnostic Quick Reference Card, LY37-3741 v DB2 PM for OS/390 Command Reference,
v DB2 Image, Audio, and Video Extenders SC27-0855
Administration and Programming, SC26-9947 v DB2 PM for OS/390 Data Collector Application
v DB2 Installation Guide, GC26-9936 Programming Interface Guide, SC27-0861
v DB2 Licensed Program Specifications, GC26-9938 v DB2 PM for OS/390 General Information,
v DB2 Master Index, SC26-9939 GC27-0852
v DB2 Messages and Codes, GC26-9940 v DB2 PM for OS/390 Installation and
Customization, SC27-0860
v DB2 ODBC Guide and Reference, SC26-9941
v DB2 PM for OS/390 Messages, SC27-0856
v DB2 Reference for Remote DRDA Requesters and
Servers, SC26-9942 v DB2 PM for OS/390 Online Monitor User's Guide,
SC27-0858
v DB2 Reference Summary, SX26-3847
v DB2 PM for OS/390 Report Reference Volume 1,
v DB2 Release Planning Guide, SC26-9943
SC27-0853
v DB2 SQL Reference, SC26-9944
v DB2 PM for OS/390 Report Reference Volume 2,
v DB2 Text Extender Administration and SC27-0854
Programming, SC26-9948
v DB2 PM for OS/390 Using the Workstation Online
v DB2 Utility Guide and Reference, SC26-9945 Monitor, SC27-0859
v DB2 What's New? GC26-9946 v DB2 PM for OS/390 Program Directory, GI10-8223
v DB2 XML Extender for OS/390 and z/OS
Administration and Programming, SC27-9949 Query Management Facility (QMF™)
v DB2 Program Directory, GI10-8182 v Query Management Facility: Developing QMF
Applications, SC26-9579
DB2 Administration Tool v Query Management Facility: Getting Started with
QMF on Windows, SC26-9582
v DB2 Administration Tool for OS/390 and z/OS
v Query Management Facility: High Peformance
User’s Guide, SC26-9847
Option User’s Guide for OS/390 and z/OS,
SC26-9581
DB2 Buffer Pool Tool
v Query Management Facility: Installing and
v DB2 Buffer Pool Tool for OS/390 and z/OS User’s Managing QMF on OS/390 and z/OS, GC26-9575
Guide and Reference, SC26-9306
Bibliography 279
v Open Group Technical Standard v IMS Application Programming: Database Manager,
The Open Group presently makes the following SC26-9422
DRDA® books available through its Web site at: v IMS Application Programming: Design Guide,
www.opengroup.org SC26-9423
– DRDA Version 2 Vol. 1: Distributed Relational v IMS Application Programming: Transaction
Database Architecture (DRDA) Manager, SC26-9425
– DRDA Version 2 Vol. 2: Formatted Data Object v IMS Command Reference, SC26-9436
Content Architecture v IMS Customization Guide, SC26-9427
– DRDA Version 2 Vol. 3: Distributed Data v IMS Install Volume 1: Installation and Verification,
Management Architecture GC26-9429
v IMS Install Volume 2: System Definition and
Domain Name System Tailoring, GC26-9430
v DNS and BIND, Third Edition, Paul Albitz and v IMS Messages and Codes, GC27-1120
Cricket Liu, O’Reilly, ISBN 1-56592-512-2 v IMS Open Transaction Manager Access Guide and
Reference, SC18-7829
Education v IMS Utilities Reference: System, SC26-9441
v IBM Dictionary of Computing, McGraw-Hill, ISBN
0-07031-489-6 ISPF
v 1999 IBM All-in-One Education and Training v ISPF V4 Dialog Developer's Guide and Reference,
Catalog, GR23-8105 SC34-4486
v ISPF V4 Messages and Codes, SC34-4450
Enterprise System/9000® and Enterprise v ISPF V4 Planning and Customizing, SC34-4443
System/3090™ v ISPF V4 User's Guide, SC34-4484
v Enterprise System/9000 and Enterprise
System/3090 Processor Resource/System Manager Language Environment®
Planning Guide, GA22-7123 v Debug Tool User's Guide and Reference, SC09-2137
Bibliography 281
v OS/390 UNIX System Services Planning, v ESA/370 Principles of Operation, SA22-7200
SC28-1890 v ESA/390 Principles of Operation, SA22-7201
v OS/390 UNIX System Services User's Guide, v System/390 MVS Sysplex Hardware and Software
SC28-1891 Migration, GC28-1210
v OS/390 UNIX System Services Programming:
Assembler Callable Services Reference, SC28-1899 System Network Architecture (SNA)
v OS/390 V2R10.0 IBM CS IP Configuration v SNA Formats, GA27-3136
Reference, SC31-8726 v SNA LU 6.2 Peer Protocols Reference, SC31-6808
v Program Directory for OS/390 V2 R8/R9/R10 v SNA Transaction Programmer's Reference Manual
support for Unicode, GI10-9760 for LU Type 6.2, GC30-3084
v z/OS Support for Unicode: Using Conversion v SNA/Management Services Alert Implementation
Services, SA22-7649 Guide, GC31-6809
Printed in USA
SC26-9935-06