Db2 Integrated Cluster Environment Deployment Guide Ibm Redbooks instant download
Db2 Integrated Cluster Environment Deployment Guide Ibm Redbooks instant download
https://ebookbell.com/product/db2-integrated-cluster-environment-
deployment-guide-ibm-redbooks-51841908
https://ebookbell.com/product/db2-table-editor-tool-version-42-ibm-
redbooks-51388442
https://ebookbell.com/product/db2-web-query-tool-version-12-ibm-
redbooks-51388448
https://ebookbell.com/product/db2-udbs-highfunction-business-
intelligence-in-ebusiness-ibm-redbooks-51388450
https://ebookbell.com/product/db2-udb-ebusiness-guide-ibm-
redbooks-51388454
Db2 Udb Exploitation Of The Windows Environment Ibm Redbooks
https://ebookbell.com/product/db2-udb-exploitation-of-the-windows-
environment-ibm-redbooks-51841914
https://ebookbell.com/product/db2-developers-guide-includes-index-5th-
ed-mullins-craig-s-21983612
Db2 9 For Linux Unix And Windows Dba Guide Reference And Exam Prep 6th
Ed Baklarz
https://ebookbell.com/product/db2-9-for-linux-unix-and-windows-dba-
guide-reference-and-exam-prep-6th-ed-baklarz-22042666
Db2 Purexml Cookbook Master The Power Of The Ibm Hybrid Data Server
Matthias Nicola
https://ebookbell.com/product/db2-purexml-cookbook-master-the-power-
of-the-ibm-hybrid-data-server-matthias-nicola-2525416
https://ebookbell.com/product/db2-developers-guide-a-
solutionsoriented-approach-to-learning-the-foundation-and-
capabilities-of-db2-for-zos-craig-mullins-4072294
Front cover
Configuration examples
and scenarios
Whei-Jen Chen
Rav Ahuja
Yong Jun Bi
Robert Borovsky
Patrik Fürer
Craig Maddux
Ichiro Ohta
Mark Talens
ibm.com/redbooks
International Technical Support Organization
October 2004
SG24-6376-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page xv.
This edition applies to DB2 Universal Database Version 8.2 for use with SuSE Linux Enterprise
Server (SLES) 8 and later and Red Hat Linux Enterprise Linux (RHEL) 3 and later operating
system.
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Acknowledgement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Why DB2 on Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 DB2 + Linux = Versatility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.2 Versatility + eServers = Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 What is a cluster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2.1 Cluster types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.2 DB2 partitioned databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 The DB2 Integrated Cluster Environment solution . . . . . . . . . . . . . . . . . . . 7
1.3.1 The ingredients for success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 Benefits of DB2 Integrated Cluster Environment. . . . . . . . . . . . . . . . . . . . . 9
1.4.1 Scalability pays great returns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.2 Proven performance at a low cost. . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.3 High levels of availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4.4 Easily managed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4.5 Seamless interoperability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 DB2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5.1 DB2 database access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Contents v
6.1.3 High availability in clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
6.1.4 Failover in a highly available cluster . . . . . . . . . . . . . . . . . . . . . . . . 314
6.1.5 High-availability clustering configurations . . . . . . . . . . . . . . . . . . . . 315
6.1.6 High-availability software solutions . . . . . . . . . . . . . . . . . . . . . . . . . 318
6.1.7 Automatic Client Reroute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
6.2 TSA implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
6.2.1 TSA fundamentals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
6.2.2 TSA installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
6.2.3 TSA resource planning for an HA DB2 cluster . . . . . . . . . . . . . . . . 325
6.2.4 Basic implementation with the regdb2salin script . . . . . . . . . . . . . . 327
6.2.5 Advanced implementation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
6.2.6 Scaling out your HA DB2 clusters . . . . . . . . . . . . . . . . . . . . . . . . . . 345
6.2.7 Notes on Logical Volume Manager . . . . . . . . . . . . . . . . . . . . . . . . . 346
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Figures ix
5-46 Troubleshoot health alert notification - Delete orphaned contacts . . . . 243
5-47 Troubleshoot health alert notification - Summary . . . . . . . . . . . . . . . . 243
5-48 Troubleshoot health alert notification - Resolve orphaned contacts . . 244
5-49 Troubleshoot health alert notification - Resolve orphaned contacts . . 245
5-50 Change Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
5-51 Manage contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
5-52 Troubleshoot health alert notification - Resolved contacts . . . . . . . . . 246
5-53 Troubleshooting health alert notification - Summary resolved contacts247
5-54 Troubleshoot health alert notification - Import contacts . . . . . . . . . . . . 248
5-55 Troubleshoot health alert notification - Summary import contacts . . . . 249
5-56 Contacts did not get the appropriate health alert notification - Action . 250
5-57 Contacts did not get appropriate health alert notification - Summary . 250
5-58 SMTP server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
5-59 SMTP Server - Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
5-60 Configure database logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
5-61 Circular logging - Choosing type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
5-62 Circular logging - Number and size of log files . . . . . . . . . . . . . . . . . . 254
5-63 Circular logging - Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
5-64 Circular logging - Scheduling function . . . . . . . . . . . . . . . . . . . . . . . . . 256
5-65 Circular logging - Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
5-66 Archival logging - Choosing the type . . . . . . . . . . . . . . . . . . . . . . . . . . 258
5-67 Archival logging - Archiving method. . . . . . . . . . . . . . . . . . . . . . . . . . . 259
5-68 Archival logging - Number and size of log files . . . . . . . . . . . . . . . . . . 260
5-69 Archival logging - Location of logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
5-70 Archival logging - Backup image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
5-71 Archival logging - Backup partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
5-72 Archival logging - Backup options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
5-73 Archival logging - Enabling scheduling . . . . . . . . . . . . . . . . . . . . . . . . 265
5-74 Archival logging - Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
5-75 Archival logging - Backup message . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
5-76 Archival logging - Success message . . . . . . . . . . . . . . . . . . . . . . . . . . 267
5-77 Activity monitor - Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
5-78 Activity monitor set up - Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 283
5-79 Activity monitor set up - Monitoring task . . . . . . . . . . . . . . . . . . . . . . . 284
5-80 Activity monitor set up - Filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
5-81 Activity monitor set up - Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
5-82 Activity monitor - New monitoring task . . . . . . . . . . . . . . . . . . . . . . . . . 286
5-83 Activity monitor set up - User-defined monitoring task. . . . . . . . . . . . . 287
5-84 Activity monitor set up - Category for user-defined task . . . . . . . . . . . 288
5-85 Activity monitor set up - Filter for user-defined task . . . . . . . . . . . . . . . 288
5-86 Activity monitor set up - Application report for user-defined task . . . . . 289
5-87 Activity monitor set up - SQL report for user-defined task . . . . . . . . . . 290
5-88 Activity monitor set up - Transaction report for user-defined task . . . . 291
Figures xi
xii DB2 Integrated Cluster Environment Deployment Guide
Tables
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.
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.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
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.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
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:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM's application
programming interfaces.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, and service names may be trademarks or service marks of others.
This IBM Redbook is an informative guide for deploying a DB2 Integrated Cluster
Environment on Linux. This book is organized as follows:
Chapter 1, “Introduction” on page 1, provides a general overview of DB2
Integrated Cluster Environment and discusses the fundamentals of DB2 in a
Linux cluster environment.
Chapter 2, “Selecting your cluster” on page 33, discusses options for cluster
ingredients that constitute DB2 Integrated Cluster Environment and
considerations for their selection.
Chapter 3, “Planning and design” on page 63, goes over simple planning and
design considerations to assist you with building your first DB2 partitioned
database that is both flexible and scalable.
Chapter 4, “Implementation” on page 125, describes our lab environment for
DB2 Integrated Cluster Environment. This chapter guides you through
implementing DB2 Linux clusters focusing on a multiple-partition
environment.
Chapter 5, “Operations and administration” on page 201, describes the new
autonomic features of DB2 UDB V8.2 and some of the tools on the system
that can be used for monitoring.
Chapter 6, “High availability” on page 309, describes components and
possible configurations of a high-availability solution. It also gives a detailed
description of an implementation of a failover protection in a DB2 Integrated
Cluster Environment.
Chapter 7, “Scaling” on page 349, discusses scalability in the DB2 Integrated
Cluster Environment. It includes some guidance in planning for the growth of
a business and database. This chapter also examines a number of scaling
strategies in more detail and provides the steps involved in scaling a
database.
Rav Ahuja is the Worldwide Product Manager for DB2 on Linux and is based out
of the IBM Toronto Lab. He has been working with DB2 on distribution platforms
since Version 1 days. He is a vocal advocate for Linux clusters and frequently
contributes to articles and books related to databases on Linux. Rav can be
reached at [email protected]®.
Acknowledgement
Thanks to the following people for their contributions to this project:
Amy C. Freeman
IBM WW Brand Manager - xSeries® Linux Marketing
Preface xix
Grant Hutchison
DB2 Linux/Windows Solution Center manager, IBM Toronto Software
Laborotory
Conor Malone
Advanced Micro Devices
Ben Eiref
TopSpin Communications, Inc.
Al Kliethermes
IBM Global Business Intelligence Solutions, West, Software Technical
Sales
Stuart Alexander
IBM Linux Cluster Marketing Manager, Linux Cluster, IBM eServer xSeries
Monty Wright
IBM America Advanced Technical Support - Software, DB2, Content
Management
Emma Jacobs
International Technical Support Organization, San Jose Center
Julie Czubik
International Technical Support Organization, Poughkeepsie Center
Your efforts will help increase product acceptance and customer satisfaction. As
a bonus, you'll develop a network of contacts in IBM development labs, and
increase your productivity and marketability.
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html
Preface xxi
xxii DB2 Integrated Cluster Environment Deployment Guide
1
Chapter 1. Introduction
Organizations today face the challenging job of integrating technologies to pull
together a comprehensive solution that fits their business needs and IT budgets.
As a result, IBM is the market leader on Linux for relational database systems.
The reasons why major companies and governments around the globe choose
to deploy DB2 for Linux in the enterprise setting are quite simple. The DB2
system's rich set of features has been running on Linux for almost six years and
during this time, while the Linux kernel matured through the efforts of thousands
of programmers and volunteers, the IBM teams were busy further hardening the
kernel and DB2 on Linux for enterprise workloads.
Clusters of computers must be somewhat self-aware, that is, the work being
done on a specific server often must be coordinated with the work being done on
other servers. This can result in complex connectivity configurations and
sophisticated inter-process communications between the servers of a cluster. In
addition, the sharing of data between the servers (or nodes) of a cluster through
a common file system is almost always a requirement. There are many other
complexities that are introduced by clusters, such as the operational
considerations of dealing with a potentially large number of computers as a
single resource.
http://www.pc.ibm.com/ww/eserver/xseries/clustering/info.html
Chapter 1. Introduction 3
1.2.1 Cluster types
As just described, clusters may exist in many different forms. The most common
cluster types are:
High availability (HA)
High performance computing (HPC)
Horizontal scaling (HS)
Database cluster (DBC)
It should be noted that the boundaries between these cluster types are
somewhat indistinct and often an actual cluster may have properties or provide
the function of one or more of these cluster types.
Of course, this kind of cluster also provides significant redundancy. If one server
out of a large farm fails, it will likely be transparent to the users. Therefore, this
model also has many of the attributes of a high-availability cluster. Likewise,
because of the work being shared among many nodes, it also is a form of
high-performance computing.
The driving force behind using Linux clusters is that by distributing the load over
several low-cost servers running an open-source operating system, a larger task
can be accomplished faster, more reliably, and a lot more economically. And if
the load increases, the cluster can be extended for managing the additional
demand without compromising on performance. DB2 was the first commercial
database on Linux to provide built-in capabilities for clusters. That is, DB2 can be
deployed across a Linux cluster right out of the box, without the need for
additional clustering software.
Chapter 1. Introduction 5
Prior to DB2 V8, a database partition was often referred to as a database node.
Sometimes this introduced some confusion, because the computer hardware
industry often refers to a server as a node. In DB2 V8.1 we use database
partition instead of database node. You may find references to a database node
in text and in some DDL, but this remains to make it easier for those transitioning
from prior releases of DB2. In this book, and in practice, an individual DB2
partition is called a database partition. The term node should only be used in
reference to hardware and servers.
The fact that databases are partitioned across several database partitions is
transparent to users and applications. User interaction occurs through one
database partition, known as the coordinator partition for that user; see
Figure 1-1 on page 7. Any database partition can be used as a coordinator
partition. The database partition that a client or application connects to becomes
the coordinator partition. You should consider spreading out users across
database partition servers to distribute the coordinator function.
Coordinator
Chapter 1. Introduction 7
The core solution is based on IBM DB2 Universal Database and IBM Linux
Cluster 1350 (xSeries, 325, and Blade Center). Figure 1-2 shows a sample DB2
Integrated Cluster Environment configuration. The other components in a DB2
Integrated Cluster Environment can include (but are not limited to):
SuSE or Red Hat Linux
IBM Tivoli System Automation software
IBM WebSphere® Application Server
IBM TotalStorage®
IBM Global Services
TopSpin InfiniBand
IBM Storage
Gigabit, Infiniband or
Fiber Channel
Autonomic database
The benefits of Linux clusters, including superior performance at a low cost, are
well known. When you add to the mix the built-in clustering capabilities of IBM
Powerful hardware
IBM has extensive and proven experience with clustered UNIX® computers. IBM
xSeries® has applied that knowledge to produce servers that are armor-plated
for Linux, optimized for database work loads, and deliver tremendous power at a
fraction of the price.
Demanding applications
The combination of DB2 UDB and Linux on IBM eServer xSeries, with the latest
Intel® and AMD® processors, is powerful enough to run highly demanding
business applications, including SAP R/3, mySAP Customer Relationship
Management (CRM), mySAP Business Intelligence (BI), and IBM WebSphere
Application Server.
Reliable management
Managing a clustered environment is easy using autonomic capabilities built into
DB2 software and xSeries hardware along with management tools from IBM®
Tivoli® software. The availability of the solution is further enhanced using Tivoli
System Automation for Linux.
High-speed network
Gigabit Ethernet is the standard network connection in most servers and would
suffice in most DB2 Integrated Cluster Environment implementations. However,
if high bandwidth, low latency, and low overhead is required, then infiniband can
be used as both server and storage interconnect.
Chapter 1. Introduction 9
yet flexible enough to deliver exceptional value to small businesses, often
evaluate technologies based on the following criteria:
Scalability
Price/performance
Availability
Manageability
Interoperability
The possibilities are indeed empowering. You can build powerful clusters using
IBM xSeries servers running Linux. IBM DB2 Universal Database Enterprise
Server Edition provides a single database that can be distributed across such a
cluster. You can easily scale up by adding a new machine to the cluster, and
trigger DB2 to automatically redistribute data to the new partition.
IBM eServer offers a reliable foundation for leading Linux-based computing. With
the IBM X-Architecture™ advantage, you can feel confident about the availability
of the hardware running your core business applications.
The Tivoli System Automation (TSA) for Linux increases the availability of DB2
operating environments on xSeries hardware by effectively monitoring system
and application health. In the event of an outage, TSA allows applications to
automatically fail over to other servers in the cluster, providing continuous
access to DB2 and restored data. TSA is based on autonomic research inside
IBM, long-standing experience with IBM cluster technology, and is specifically
designed for the benefits of enterprise class solution stacks. The tight integration
with DB2 for Linux offers smooth and seamless production operation with highest
levels of availability.
Chapter 1. Introduction 11
The right products working in harmony enhance productivity, reduce costs of
deployment, and simplify management of critical e-business applications. In
other words, they empower you to focus on your business rather than the
technology on which it runs.
Network
Netbios shared memory
SNA TCP/IP named pipes
internode communication
Catalog
Access Services
Plan SQL Compiler
Manager Runstats
Data
Protection
Utilities Services Common Services
Run-time Interpreter
Import relational operations System
Export aggregation Data Management Services Locks Monitor
group by Index Manager
Load hash join Sort Transaction Configuration
Long and Large Object Management Services
UDF Manager
Backup etc..
Restore Table Manager Logging Data
Rollforward Services
Buffer Pool Manager
From a client-server view, the client code and the server code are separated into
different address spaces. The application code runs in the client process, while
the server code runs in separate processes. The client process can run on the
same machine as the database server or a different one, accessing the database
server through a programming interface. The memory units are allocated for
database managers, databases, and applications.
Chapter 1. Introduction 13
To enable access to a special database, the DB2 instance process responsible
for the database must be running on the DB2 server. When an instance process
is started, several processes are created and interact with each other, to
maintain connected applications and the database. There are several
background processes in DB2 that are pre-started; others start on a need-only
basis. This section explains some of the important background processes.
Per Instance
Per Application Per Database
db2agent db2pfchr db2pclnr
db2ipccm
db2agent db2dlock
db2agent db2dlock
Some DB2 background processes are started with the instance, and others are
initialized when the database is activated by a connection. Figure 1-4 shows the
necessary background processors of the DB2 UDB server at the instance,
application, and database level. In the following sections, we discuss some of the
important processes on the respective levels.
Database-level processes
The following background processes are started when a connection activates the
database:
DB2 log reader (db2loggr)
This process reads the log files during transaction rollback, restart recovery,
and roll-forward operations.
DB2 log writer (db2logw)
This is the log writer process that flushes the database log from the log buffer
to the transaction log files on disk.
DB2 page cleaner (db2pclnr)
An asynchronous process to make room in the buffer pool by writing changed
pages to disk, before pre fetchers read pages on disk storage and move into
the buffer pool.
DB2 prefetcher (db2pfchr)
This process retrieves data from disk asynchronously and moves it into the
buffer pool before the application requested the data.
Chapter 1. Introduction 15
DB2 deadlock detector (db2dlock)
This is the database deadlock detector process. It scans the lock list (the lock
information memory structure of DB2) and looks for deadlock situations.
Application-level processes
These processes are started for each application connecting to the database:
DB2 communication manager (db2ipccm)
This is the inter-process communication (IPC) process started for each
application connecting locally. This process communicates with the
coordinating agent to perform database tasks.
DB2 TCP manager (db2tcpcm)
This is the TCP communication manager process. This process is started
when the remote client or applications connect to the database using TCP/IP
communication. This process communicates with the coordinating agent to
perform database tasks.
DB2 coordinating agent (db2agent)
This process handles requests from applications. It performs all database
requests on behalf of the application. There will be one db2agent per
application unless the connection concentrator is established. If intra-partition
parallelism is enabled, the db2agent will call DB2 subagents to perform the
work.
DB2 subagent (db2agnta)
Subagent, which works with the db2agent process when intra-partition
parallelism is enabled.
Active subagent (db2agntp)
This is the active subagent that is currently performing work. This process is
used when enabling SMP parallelism, which means having more processes
achieving the same task. In order to enable this feature in DB2, we must set
the intra-parallelism database parameter to YES.
Instance(s)
Tab
Database(s)
Tab
DB Partition(s)
Tab
Table space(s)
tables
Tab
index(es)
long data
Instances
An instance is DB2 code that manages data. It controls what can be done to
the data, and manages system resources assigned to it. Each instance is a
complete, independent environment. It contains all the database partitions
defined for a given parallel database system. An instance has its own
databases (which other instances cannot access directly), and all its
database partitions share the same system directories. It also has separate
security from other instances on the same machine (system), allowing, for
example, both production and development environments to be run on the
same machine under separate DB2 instances without interfering with each
other.
Databases
A relational database presents data as a collection of tables. Each database
includes a set of system catalog tables that describe the logical and physical
structure of the object in the database, a configuration file containing the
parameter values configured for the database, and a recovery log. An
Chapter 1. Introduction 17
application or a user connects to a specified database to read or manipulate
data in tables.
Figure 1-6 shows the relationship between instances, databases, and tables.
Server system
User,
Application
Database Database
Database Partition Partition
Database Partion Group 2
Partion Group 1
Database
Partition
Database
Partition
Database
Partion Group 3
Database
Partition
Chapter 1. Introduction 19
Table spaces reside in database partition groups if they were created. Table
space definitions and attributes are maintained in the database system
catalog. Containers are assigned to table spaces. A container is an allocation
of physical storage (such as a file or a device).
A table space can be either system managed space (SMS) or database
managed space (DMS). For an SMS table space, each container is a
directory in the file system of the operating system, and the operating
system's file manager controls the storage space. For a DMS table space,
each container is either a fixed size pre-allocated file, or a physical device
such as a disk, and the database manager controls the storage space.
Schemas
A schema is an identifier, by default the user ID, that qualifies tables and other
database objects. A schema can be owned by an individual, and the owner
can control access to the data and the objects within it. A schema name is
used as the first part of a two-part object name. For example, a schema
named Smith might qualify a table named SMITH.PAYROLL.
Tables
A relational database presents data as a collection of tables. Data in a table
are arranged in columns and rows. The data in the table is logically related,
and relationships can be defined between tables. Table data is accessed
through Structured Query Language (SQL), a standardized language for
defining and manipulating data in a relational database. A query is used in
applications or by users to retrieve data from a database. The query uses
SQL to create a statement in the form of:
SELECT <data_name> FROM <table_name>
Views
A view provides a different way of looking at data in one or more tables; it is a
named specification of a result table. The specification is a SELECT
statement that runs whenever the view is referenced in a SQL statement. A
view has columns and rows just like a base table. All views can be used just
like base tables for data retrieval. Figure 1-8 on page 21 shows the
relationship between tables and views.
View A View AB
Indexes
An index is a set of keys, each pointing to rows in a table. For example, table
A has an index based on the first column in the table (Figure 1-9 on page 22).
This key value provides a pointer to the rows in the table: Value 19 points to
record KMP. An index allows efficient access when selecting a subset of
rows in a table by creating a direct path to the data through pointers.
The DB2 SQL Optimizer chooses the most efficient way to access data in
tables. The optimizer takes indexes into consideration when determining the
fastest access path.
Chapter 1. Introduction 21
Index Table A
17 47 ABC
19 17 QRS
47 85 FCP
81 81 MLI
85 93 CJP
87 87 DJS
93 19 KMP
Containers
A container is a physical storage device. It can be identified by a directory
name, a device name, or a file name. A container is assigned to a table
space. A single table space can span many containers, but each container
can belong to only one table space, as shown in Figure 1-10 on page 23.
Tablespace
/dev1/dbase1
/dev3/dbase1
container 0 container 2
/dev2/dbase1 /dev4/dbase1
container 1 container 3
Buffer pools
A buffer pool is the amount of memory allocated to cache table and index
data pages. The purpose of the buffer pool is to improve system performance.
Data can be accessed much faster from memory than from disk; therefore,
the fewer times the database manager needs to read from or write to a disk
(I/O) synchronously, the better the performance of the application. The size of
the buffer pool is the single most important performance tuning area, because
you can reduce the delay caused by synchronous I/O.
Chapter 1. Introduction 23
the instance home directory, which has a symbolic link to the DB2 installation
directory.
Database
Directory
DB2 Instance
Name
NODE0000 The partition number of the db, 0 for a non partitioned database
SQL00001 The db id starts at 1 and increases for all subsequent databases
SQLOGDIR The directory for default log files
sqllib
symbolic link
DB2 installation path
adm
adsm
bin
bnd
cfg
conv
...
Figure 1-11 DB2 directory structure
DB2 catalog
In DB2 UDB, the metadata is stored in a set of base tables and views called the
catalog. The catalog contains information about the logical and physical
structure of the database objects, object privileges, integrity information, etc.
The catalog is automatically created with the database. The base tables are
owned by the SYSIBM schema and stored in the SYSCATSPACE table space.
On top of the base tables, the SYSCAT and SYSSTAT views are created. SYSCAT
views are the read-only views that contain the object information and are found in
the SYSCAT schema. SYSSTAT views are updateable views containing statistical
information that are found in the SYSTAT schema. The complete DB2 UDB
catalog views can be found in DB2 UDB SQL Reference Volume 1 and 2,
SC09-4484 and SC09-4485.
DB2 clients
To access a DB2 UDB database a DB2 client has to be installed on the client
system. IBM offers four types of DB2 clients:
Run-Time Client
This client provides you access to DB2 UDB servers with application
interfaces, such as JDBC, SQLJ, ODBC, CLI and OLE DB. This client can be
used if no DB2 server administration has to be done from this client.
Run Time Client Lite
This is a new addition in DB2 UDB Version 8.2. Run-time Client Lite is a
smaller footprint version of the DB2 Run-Time Client and is available only on
Windows environments. It provides basic functions that allow your
applications to access a DB2 UDB server. The DB2 Run-Time Client Lite also
contains support necessary for JDBC, SQLJ, ODBC, CLI, OLE DB, and .NET,
similar to the DB2 Run-Time client. With its reduced installation image size,
the DB2 Run-Time Client Lite is ideal for mass deployment or for bundling
with your applications.
Administration Client
The Administration Client has all features of the DB2 Run-Time client plus
tools to administer a DB2 Server.
Application Development Client
This client provides a collection of graphical and non-graphical tools for
developing applications. It includes all components of the DB2 Administration
Client.
Chapter 1. Introduction 25
To update this information in the database manager the following command is
used:
db2 UPDATE DBM CFG USING SVCENAME db2icdb2
These tasks can also be performed using the DB2 configuration assistant utility.
At the client, the database information is configured using either the CATALOG
command or using the configuration assistant. The database is configured under
a node that describes the host information like protocol and port, etc. To
configure a remote TCP/IP node the following command is used:
db2 CATALOG TCPIP NODE node-name REMOTE host-name SERVER service-name
The service name registered in the server or the port number can be specified in
the SERVER option. To catalog a database under this node the command used
is:
db2 CATALOG DATABASE database-name AS alias-name AT NODE node-name
When using the Configuration Assistant GUI tool to add a database connection,
a database discovery can be started to find the desired database.
Note: The DB2 Discovery method is enabled at the instance level using the
DISCOVER_INST parameter, and at the database level using the
DISCOVER_DB parameter.
Application access
When deploying applications with DB2 UDB, different methods can be used:
Single-tier
In this configuration the application and the database reside on the same
system. In enterprise environments, it may be rare to see such a
configuration, because remote access to a database server is typically
required. Nonetheless, this is quite common for developing applications that
can later be deployed transparently in a multi-tier DB2 environment without
any changes or batch applications.
Client/server or 2-tier
The application and the database reside on separate systems. The machines
where the application runs typically have a DB2 client installed, which
communicates over the network to a database server. For the application, the
physical location of the data is transparent. The application communicates
with the DB2 client using a standard interface (for example, ODBC) and the
DB2 client takes over the task of accessing the data over the network. In
some cases, such as browser- or Java-based access, it is not necessary to
have the DB2 client running on the same machine where the application
executes.
SUSIE’S SHARE.
Susie had never been so much made of, so watched over and attended to, all
her life.
She did not quite know what to make of it all. First there was John
arriving like a whirlwind, rushing upstairs to pack up his things, telling her
he was going away at once, with Elly following, wistful, not quite
understanding, it seemed, yet full of suppressed excitement. Susie suspected
how it was, though she had not been told, and she had all a young woman’s
interest in her brother’s love-story, and did not see any incompatibility as
Percy and Mrs. Egerton did, but thought it very natural, as they had known
each other all their lives. She was too kind to question Elly when she came
into the parlour while John rushed upstairs. The girl it was evident was
much excited, sitting down one moment, getting up again, turning over the
books on the table, looking out of the window, distracted, and not knowing
what to do with herself, listening to the sound of his movements upstairs.
Susie felt that he must be throwing his things into his portmanteau in the
most dreadful confusion, and longed to run up and pack them for him, but
did not venture to leave her visitor, or indeed to interfere. And it was not till
some time had passed, and the tramping overhead became more and more
lively, as if John was stamping upon his portmanteau to get it to close
(which was exactly what he was doing) that Susie took it upon her to
inquire.
‘I wonder why he is going away in such a hurry. Do you know, Miss
Spencer, if he has had any telegram, any news?—if he is wanted at the
office?’
‘Oh, Susie,’ said Elly, bursting forth all at once, ‘don’t call me Miss
Spencer. I’m going to marry him as soon as we can; and it is because of that
and Aunt Mary that he is going away.’
‘Because of that; but I should have thought—’ Here Susie paused in
some perplexity, and looked her young companion in the face.
‘You should have thought he would have stayed longer, instead of
hurrying away? Oh, so should I! but boys understand each other, it appears,
just as you and I would do. It was Percy who said something to him. Percy
is not a bit clever; and it was slangy and only half intelligible to me. “There
are some things a fellow can do, and some he can’t,” that was all Percy
said; and Jack just jumped up as if he had been stung and darted away. Aunt
Mary was scolding, indeed,’ said Elly, glad of the opportunity of
unburdening herself; ‘but what of that? she would have come round in
time.’
‘Perhaps he thought they did not like it,’ Susie said.
‘What of that?’ said Elly, ‘when I tell you they would have come round
in time!’ Then she cried, ‘Oh, forgive me, Susie, if I am not civil. I am so
mixed up! So happy one moment, and then so perplexed, and not knowing
anything about it. I thought I had it all in my own hands. So I have, with a
little time. Papa never resists me long, and as for Aunt Mary, she was
coming round even when she was making the most fuss. When all at once
this thing happens between the boys, and Jack pays no more attention to
me.’
With this she began to cry a little, merely by way of distraction to fill up
the time, for Elly was not at all given to crying. There was a sound in the
midst of it as if John were coming downstairs, and then Elly immediately
cried, ‘Hush!’ as if Susie had been the guilty person, and dried her eyes. But
John did not come downstairs. He was still to be heard stamping and
moving about overhead. And presently Elly resumed.
‘He must be making a dreadful mess of his things,’ she said, with a tone
of resignation. ‘So does Dick when he packs for himself, but Percy never.
Percy is always neat—and yet to think it was he who said that!’ There was
again a little pause, both listening to every sound upstairs, Susie, puzzled
and disturbed, not knowing what to say, while Elly, altogether absorbed in
this new relationship, which was at once authoritative and subject, could
neither think nor speak of anything but Jack. There was not much of the
confused rapture of a newly-developed love about her. Even at the first
moment there had been something of the familiar sway of a sister in Elly’s
treatment of John, and now she was anxious, bewildered, not knowing what
to make of him, feeling that he had gone out of her ken into a region
influenced by a man’s motives, not a woman’s, which are different. Elly
gave presently a glance at the clock, and took out her watch and compared
it, then gave a sigh of relief. ‘He is too late,’ she said, ‘thank goodness, for
this train. He must wait till night now,’ whereupon she became more
composed, and her excitement calmed down.
But Susie did not know what to say in this curious position of affairs. To
take this pretty young stranger into her arms and talk to her of all John’s
excellencies, and kiss her and cry over her with pleasure, as is the wont of a
young man’s admiring and sympathetic sister with his love, seemed out of
place with Elly, whom she scarcely knew, who seemed to know John better
than she did, and who, in place of the emotional stage, was in the anxious
one, rather regarding John as a wife does who is concerned about how her
husband is going to act in a certain position of affairs which affects their
well-being, than as a rapturous girl ready to find everything her lover does
half divine. There was care instead of ecstacy on Elly’s brow, and that little
conflict of opinion which must take place sometimes between all properly
endowed minds, even in the closest relationship, was in full force. She
resumed after a time the discussion in which Susie could not take an active
part.
‘Don’t you think,’ she said, ‘that instead of starting off like this, to make
his fortune—as if a fortune could be made in a day!—it would have been
more sensible to wait and give them a little time?’
‘I am sure I don’t know,’ said Susie, diffidently. ‘You are so young. You
didn’t mean to—— to marry all at once, even if your papa gave his
consent.’
‘Oh, no,’ cried Elly, with a blush and a laugh. ‘Oh, no; why, Jack’s only
just come of age.’
Susie accepted this information meekly.
‘Then, he had got your consent?’ she said.
‘Oh, yes,’ cried Elly, with fervour, ‘of course he had that all the time.’
And then the girl was seized with a little fit of that laughter which is so near
tears. She grasped Susie suddenly by the arm. ‘Do you know,’ she cried,
flaming celestial rosy red, ‘what happened when he went away? We kissed
each other! I was only sixteen. It was four years ago. And I have sometimes
thought that he never understood what had happened. But, of course, after
that, when Jack asked me——’ She could not grow more crimson than she
had done before, and her eyes filled with that golden dew of happiness and
tears which makes the dullest eyes swim in light. This lovely softening and
revolution in the girl’s face touched Susie. She put her arms timidly round
her and kissed her cheek, to which Elly replied by flinging herself upon the
conforting bosom of this new friend to whom she had now a right.
‘We’re sisters, don’t you know,’ she said. ‘I’ve only had Aunt Mary till
now, and Aunt Mary’s so much older. Yes, of course, of course, he had my
consent.’
‘Then what did he want more?’ said Susie, in her ear. ‘Dear, I’m of Mr.
Percy’s opinion too. He has got to go away and do what he can to make it
agreeable to your people. That is the only thing he could do—unless he had
kept away altogether,’ Susie added, ‘which would perhaps have been the
wisest way.’
At which Elly sprang up, and, seizing her comforter by both arms, shook
her, first with wild indignation, then bursting again into the agitated
laughter which belonged to her state.
‘Oh, you cruel—oh, you barbarous——’ she cried, and kissed her
between. Then they started apart and turning round appeared demurely,
seated close to each other in silence and attention, when John came in
hurriedly with a bag in his hand pushing open the door.
It was of no use, however, as he was obliged to acknowledge. The night
train which did not pass till midnight was the only one possible. As a matter
of fact he did not go till next morning, subdued in his ardour of departure
by a whole afternoon spent in the society of Elly, with whose freedom for
that day nobody interfered. And indeed the afternoon was passed in a
somewhat strange way, in the parlour which was so connected with all the
associations of John’s youthful life, where he and she bending over the table
with their heads close together went over the plans, of which John made a
sketch for Elly’s benefit, of the great scheme which he was convinced was
to make his fortune. It was, let us say, the drainage of the Thames valley,
than which there is no more urgently wanted piece of engineering, nor one
which would bring a young man more fame and money.
John drew rude plans and diagrams of all kinds, while Elly looked on.
He became enthusiastic in his descriptions, laying out everything before
her, the manner in which the waste was to be carried away so as to do good
and not harm, how floods were to be prevented, how the low-lying lands
near the river were to be protected and utilised. John’s eyes glowed as he set
it all forth, and Elly said, ‘I see!’ ‘I understand,’ with sympathetic emotion
and many a lyric of praise; but whether she did really see so clearly as she
said, remains, perhaps, open to doubt. She believed, at all events, which
comes to the same thing, and without being at all humbled or troubled by
her inability to fathom the expedients or comprehend the calculations. At
sixteen she would not have given in so easily. She would have worked out
the diagrams, and compelled herself to know what it was all about. But now
she saw, after a sort, through John’s eyes and was satisfied. He got perhaps
more applause than was good for him from Elly, who he honestly believed
followed all his elucidations, and from Susie, who understood none of
them, and did not pretend to know anything save that he was very clever,
the cleverest of engineers, a conclusion which, with deprecations, John was
not perhaps altogether unwilling to accept. In this way they spent a few
hours of such happiness as comes but rarely in youthful life. It was better
than the more emotional rapture of the young lover’s paradise, for it had so
many finer elements in it to their own happy consciousness. Their life was
to be built upon this grand work, which was a work which would save life,
which would increase comfort, which would make wealth, not only to
themselves but to others. It was the plan which had ‘pleased their childish
thought.’ It was Elly’s dream, which she had transferred with all her girl’s
enthusiasm to the steady working brain, full of impulses more lasting than
hers, and a training infinitely stronger, which had made that suggestion into
a reality.
Thus the personality of each was flattered and charmed with the scheme
that seemed to be in some sort the production of both. And Susie, who
could not possibly claim any share, sat by and admired and applauded. She
was as much delighted as they were. She had the additional advantage of
being able to feel how clever they both were, how good it was that John
was to have a wife who understood him, who would go with him in
everything. Susie sat and beamed upon them from the heights of unselfish
enthusiasm and delight, not with any effort to understand. Her mind had no
need of that. Her part was to admire and love, which was easy, and suited
her best.
Susie made no objections about remaining behind, when John thus
rushed away. She was pleased with the village, the quietness, the retirement,
the new friends; and, as has been said, she had never been so much made
of, never met with so many attentions all her life. The old gardener and his
wife whom John had managed to pick up again, and instal as guardians of
the house, according to his old dream, were in the first place her devoted
servants, telling her all manner of stories about her grandparents, which
were very pleasant to Susie; and then she had visits from everybody to
comfort or to explain to her. Mrs. Egerton came, full of anxiety, appealing
to her as a person of sense to say whether she did not think her brother far
too young to take the serious engagements of life upon him—whether it
was not a pity for a young man to tie a millstone round his own neck—
whether she had ever seen an engagement turn out well that had been
formed so indefinitely, where there was no likelihood of a conclusion to it
for years? This was the tone Mrs. Egerton had now taken up: and indeed
she was too much of a gentlewoman at any time to have troubled Susie with
any hint of the inequality in family and circumstances, which she had
pointed out so distinctly to John. And then Elly would come with her letters,
to ask what news Susie had, and to talk about Jack and herself—herself and
Jack, and what they had done when they were ‘young,’ and what now they
meant to do.
Percy too had got a habit of ‘looking in’ when he came in from his
rounds in the parish. He tried to interest Susie in parish work, and, indeed,
did get from her a wonderful deal of information and help in the matter of
the cottage hospital which he and the parish doctor were so anxious to get
up— Percy, in order to get the sick poor to some small extent provided for,
the doctor with perhaps the less virtuous motive of studying disease. She
gave him a great deal of help, but that did not altogether account for the
constant visits he paid her, nor the deferential tone in which he spoke, and
the respect with which he received all her little opinions. On the subject of
hospitals, it was true, Susie knew more than anyone else in the whole
parish: but on others her opinions were timid and not at all self-assured. Yet
with what respect this young man, who put aside Elly’s much more
convinced and enlightened views, listened to the little which Miss Sandford
had to say! He almost frightened Susie by the earnestness of his attention,
frightened her, flattered her, in the end amused her very much, and made
her laugh to herself in private at the new position she held, quoted and
looked up to as in all her life she had never been before. Susie could not tell
why. She was older than he was, and she understood his kind better than he
understood hers, and had not in reality as much reverence for the type of
curate as he had. But yet he came every day, and told her more about
himself and his own life and thoughts than any one else knew, and brought
her books which he was anxious she should read and tell him her opinion
of, even going so far as to mark passages, in the eagerness of his desire to
know what she thought on this and that point. It was not possible that Percy
should refrain from all remark about John in these many and prolonged
interviews, but the tenderness with which he treated Susie’s brother was
very different from the uncompromising views he had held on that subject
before Susie appeared at Edgeley. He gave her to understand that if he
interfered at all it was wholly in John’s interest.
‘They would never be allowed to marry now; indeed, I don’t suppose
they ever thought of that; and it seemed best for them not to let him lose his
time here, and disturb his mind—don’t you think so, Miss Sandford? A fine
fellow like Jack, with everything before him.’
‘But they say,’ said Susie, in her modest way, ‘that nothing is so good for
a young man. It gives him something to look forward to, and a motive in his
work. John is so much younger than I am. I feel more like a mother to him
—’
‘And so do I to Elly,’ said the young man, with great gravity, ‘who is just
like that, much younger than I. And next to our own family I take an interest
in Jack. He has done so well, and will do still better, I feel sure. And then he
will understand what I meant. Miss Sandford, won’t you come to the edge
of the common and see the sunset? It is going to be glorious. I’ll bring you
home afterwards, and then, perhaps you will give a look at this which I
brought to show you. I should so much like to know what you think.’
Sometimes Susie assented to this proposal, and would walk out
pleasantly in the light of the declining sun, to see the sky all golden and
purple over the common, and all those peaceful sights of a country life,
which are so wonderful and delightful to town-bred folk. She had no lack of
companions, of escorts, of attendants at any time, and the air, that was so
sweet and fresh, blowing over miles of green and blossoming country, and
the friendly life of the village, and the tranquillity of the little house, and its
sweet old-fashioned garden, was a refreshment to her beyond anything that
heart could conceive. She thought regretfully of her mother, going on all the
time with that stern routine which was all charity and succour yet at the
same time business of the severest and most uncompromising kind. But
Susie knew that the sweet rest she was taking would not be a possibility to
her mother, and that the hospital was what suited Mrs. Sandford best. And
she could not but think of John, whose name was on everybody’s lips, and
who had gone off with such an impulse of energy and faith in himself and
his future: but afterwards returned again with a great deal of pleasure to the
life around, which breathed so full of quiet and friendliness, and every
pleasant thing.
She had another frequent visitor whom she received with almost more
pleasure and sense of grateful esteem than any, and that was Mr. Cattley,
who had not half so much to say as Percy, and yet seemed to feel in Susie’s
parlour—the room which he had known so well in other times, when it was
full of the ways of the old people, but which now was Susie’s parlour as if it
never had belonged to anyone else—something of the same sweet calm and
refreshment which the village life and quiet brought to her. Mr. Cattley
knew the village as well as Susie knew the hospital: he wanted something
more to refresh his spirit: and on the eve of going away from Edgeley, and
breaking up all the old habits which had been his life for years, this new
habit and association were more pleasant to him than it was easy to believe
anything could be. He liked to sit and watch her, moving about, or sitting at
work, or perhaps only looking up with a little interchange of simple talk. He
told her when he got more familiar how long he had been here, and how
little inclination he had to go away; and then he told her of his new parish,
and its great unlikeness to this, and how reluctant he was to plunge into it,
feeling as if he were about to plunge into a new world.
‘It will not seem so when you get used to it,’ Susie would say.
‘No, most likely not. It is the getting used to it that is the difficulty,’ he
would reply: and looked at her in an anxious way, as if the sight of her
made a difference. He did not himself understand yet what the difference
was.
When Percy came and found Mr. Cattley there, the new curate made it
apparent in his manner that he thought the old one very much out of place.
He would say,
‘Oh, I thought this was your day for the schools: but, of course, it is not
important to keep that up now you are going away;’ or ‘I thought you said
you would take the almshouses this evening. If I had known you were not
going I should have gone, for the old people don’t like to be disappointed:’
which was half-amusing to Mr. Cattley, but not pleasant, as the pupil’s
attempts to instruct his former master seldom are. But what the old curate
felt most of all was when the young man said to him: ‘I thought you had
some business with Aunt Mary! I know she was looking for you.’
When this was said, Mr. Cattley took up his hat and rose from his chair,
giving Susie a glance which she did not understand—and perhaps neither
did he: and Percy would settle himself in his chair to remain, while Mr.
Cattley went away.
CHAPTER XVII.
JOHN’S RESOLUTION.
A PHILOSOPHER.
The two men came in, the first with a somewhat downcast shamefaced air,
the other with the impassiveness of the man who cannot be less thought of
than he is, and who has neither pretensions nor hopes; yet it was Joe who
was the first, and who encouraged his apparently uncongenial companion to
enter.
‘Don’t you funk it,’ said Joe, ‘if any one’ll help you, he’ll do it. This
gentleman,’ he added, addressing John, who was looking at them across the
table covered by his papers, with a slightly impatient look, ‘is my mate, sir,
as I told you on; him as you was so kind to, t’other night. He wanted for to
thank you for all your kindness: and there’s—there’s another thing or two
——’
‘I suppose he can tell me himself what he wants,’ said John.
The other man stood crushing his hat between his hands, looking at John
with deprecating eyes, in which there lurked a smile, as though he was
conscious how ludicrous it was that he should be thus introduced under the
patronage of this strange companion. He said now,
‘That might be a little hard. But I can at least thank you, sir, for the
kindness of the other night.’
‘It was nothing,’ said John, confusedly. ‘Won’t you sit down? It was very
surprising to see a—a person like you——’
‘In such circumstances and such company, you would say? For the
circumstances—yes; but, for the company, it’s the best this world can give
any man, the company of a faithful friend. Joe’s not very polished, and if
he’s clever it’s perhaps not in a laudable way: but he’s faithful. I believe
he’ll never forsake me, sir. He’s as faithful as if I were a prince and he a
knight. A poor pair of nobilities we’d make. You needn’t say so. I can see it
in your eyes.’
‘I hope he is as faithful as you think,’ said John, ‘but——’
‘But me no buts,’ said the stranger, ‘if I give up Joe, I give up
everything. I have nothing but Joe to trust to. Oh, yes, he’s faithful: for if he
weren’t I should sink into ruin altogether. Don’t say anything against him—
he’s all I have.’
The speaker gave John a look—which he thought more pathetic than
anything he had ever seen, and which went at once to his heart—a look
which betrayed a knowledge of Joe and of all that was in John’s mind
concerning him, and of the unstable foundation on which his confidence
reposed. The pathos and the wistfulness and the humour that were in it
betrayed to John’s mind the existence of a sort of passionless self-conscious
despairing, such as he had never glimpsed at before, or believed in the
possibility of. Joe was this poor wretch’s only prop, but in his heart he knew
Joe better than anyone else, and was half-amused in the depths of his
desolation that he himself should still be capable of this human clinging to
the only being who stood by him. This was what his eyes said to John’s.
Joe’s faithfulness was a sort of woeful jest to him, yet his poor sheet-
anchor, too.
‘Have you no relations?’ John said; he could not tell why, for what right
had he to question this unfortunate man?
‘Relations,’ said the other, ‘are not fond of a man in my circumstances.
You know where I’ve come from, I believe, sir, and what I am. May I ask
you what made you so kind to me—the other night?’
John looked at Joe, who stood behind looking on, his eyes prowling
round in a sort of hungry investigation. The other had drawn a chair to the
table, and seated himself, but Joe stood looking about him, like a predatory
animal examining if perhaps there might be something to devour.
‘Would your friend mind,’ said John, ‘if I were to ask him to step into the
hall?’
The stranger gave a keen glance towards the door.
‘If there is nothing of value there,’ he said, quickly; then, with a change
of his tone, ‘Joe, my good fellow, take a little walk outside. I seem to want
to have a sentinel or I can’t rest. Just go and walk about a bit outside.’
Joe gave another predatory glance around, and then with a nod of his
head withdrew.
‘I’ll come back,’ he said, ‘in ’alf an ’our. If I walks about, some bobby or
other will be after me. They don’t never let a poor fellow alone.’
The stranger gave John one of his humorous looks.
‘Such is the effect of prejudice,’ he said.
It was impossible that any position could be more strange. This unknown
criminal, this discharged convict, of whom all that John knew was that he
was a convict, and had no friend but Joe, seated himself opposite to the
young man familiarly at John’s own table, with a twinkle in his eye and a
grotesque sense of all that was ludicrous in his own circumstances which
was entirely bewildering to a young man not used to mental phenomena of
any kind. The man was dressed in clothes of an old-fashioned cut (most
likely such as had been quite fashionable and appropriate, John thought, in
the days when he was shut up in prison), but still perfectly correct and
respectable, and there was in his aspect nothing of that unfamiliarity with
comfort and decency which was evident in his companion. This person
drew in his chair to John’s table with the ease and freedom of one to whom
a tidy bourgeois parlour was usual and natural. Perhaps he might have been
accustomed to better places—certainly not to worse. How the episode of the
prison had affected him, John wondered vaguely, but at all events there was
nothing visible of that association. He was able to make a good-humoured
joke of it—a joke which concealed, was it philosophy, was it despair? He
settled into seriousness, however, as the door closed upon Joe, though the
smile was never far from his eyes—and repeated, with a slight curiosity,
‘You were very kind—that night. To find myself in a decent house, in a
soft bed, was wonderful. I couldn’t help wondering why you should take
such an interest in me.’
The eyes which were so expressive gave a wistful, almost imploring
look in John’s face, as if the man had some suspicion, or rather hope, that
John’s motive was other than that of mere charity. The young man was
bewildered by this look, and by a something, he could not tell what, that
was sympathetic and familiar in the air of the stranger. Sympathetic! and he
was one of the criminal class, a returned convict! John’s mind was full of
confusion, perplexed beyond measure by the influence which he felt to
affect him in spite of himself. But, though he was angry with himself for
yielding to it, he could not resist his strange companion’s eyes.
‘It does not seem becoming in me, at my age, to speak so to a man of
yours,’ he said. ‘But when I saw you, helpless, with no one but that—
ruffian——’
The twinkle lit up again in the eyes of the other; he put up his hand in
deprecation.
‘Be gentle,’ he said, ‘with poor Joe.’
How was it possible to maintain the air of a virtuous superior with this
smiling criminal? John was more and more abashed and embarrassed.
‘I thought,’ he said, ‘that if you had time to look out—for your real
friends——’
‘It was simple charity, then?’ said the man, with a faint sigh: and then he
smiled again. ‘At least it was a kind thought. You wanted to deliver me
from the evil connections into which you thought I had fallen, in coming
out, for lack of better. It was a very kind thought.’
John felt himself draw a long breath, almost a gasp of astonishment and
relief and utter confusion of mind. He had felt himself the benefactor, doing
indeed a very kind action, something that perhaps not many men would
have done: and he was altogether taken aback by this generous appreciation
of his good motive.
‘You were right enough,’ said the other, ‘quite right if I had been a more
hopeful subject. But you’re too young to know all the ins and the outs of it.
I have no real friends. Joe may, or may not, be faithful, poor fellow, but he’s
the only human creature who sticks to me, and I am used to him. It was a
kind thought on your part, but one that couldn’t come to anything. I
partially divined it, so I left the place. I could not enjoy the clean sheets and
the tidy room under false pretences; no less thanks to you, my young
friend.’
‘But——’ said John, ‘you are not surely going to let yourself sink? you,
a man evidently of education, of sense, of understanding——’
‘Sink—to what? Can one sink any deeper? I had all these things when I
went—wrong, as people say. If they did not prevent me then, how do you
think they are going to stop me now?’
John could do nothing but gasp and draw his breath, and stare at this
calm statement. The speaker, after a moment’s pause, looked at him closely,
and said,
‘You knew nothing at all about me then, what I had done or where I had
been?’
‘How should I?’ said John.
The other laughed a little.
‘How should you indeed? but I had a kind of a hope you might. You
don’t even know what I did to get myself into such a scrape? It was nothing
brutal like poor Joe’s.’
‘I wish,’ said John, ‘you would not tell me any more: if I can help you to
work to keep out of the mire, I will do it; but if it is only how you fell in to
it, why should I know? I don’t want to know.’
‘Why, indeed?’ echoed the stranger, ‘and yet one has a sort of desire to
tell. After all, you know, after thinking it over in every possible light for
fourteen years, I cannot see the absolute sin there is in writing another
man’s name. On the face of it, it’s no great thing—not so much as telling a
lie, which anybody does without thinking. It’s only a more formal sort of a
lie. Offences against the person are evident crimes; to injure another man, to
put him in danger of his life, to give him pain, that I can understand; or to
rob him of what is perhaps his children’s bread. But to write his name
instead of your own! I have had a great deal of time to think of it. I cannot
see, after all, the criminality of that.’
‘It’s one of the worst of crimes,’ said John, ‘it strikes at the root of
everything. Why, forgery——’
‘Yes, give a dog an ill name,’ said the other dispassionate thinker, ‘call it
forgery, and it becomes a bogey and frightens everybody. And yet, after all,
apart from the motive, it’s the simplest action. Then there’s the other thing,
drink—which is so often the first step (I hope you have no leanings that
way, though I seem to excuse it—for, right or wrong, it’s ruin)—well,
there’s no sin, you know, in that. Wine’s not vice, nor even whisky. No one
will tell me that to take two, three, or indeed any number of glasses of
anything is vice.’
‘Excess is vice,’ cried John. He felt himself redden with indignant
fervour. The idea that any man could sit by him calmly and look him in the
face and defend the indefensible—take up the cause of vice and criminality:
he could not believe his ears. The criminal generally (so far as he was
aware, especially the drunkard, of which kind the young man had seen in
the way of his work some fine examples) is too apt to be unctuous in his
repentance and quite uncompromising in his denunciation of his vice. To
hear a man in this calm and apparently reasonable way discuss it as an open
question was entirely new to him.
‘Excess is—excess,’ said this philosopher, ‘very bad for you, in whatever
way you consider it; for the stomach and the constitution, also for your
prospects in life, to which it is destruction;—that’s indisputable. But how
far you can be said to break the moral law— To be sure you may take
higher ground or lower ground. You may say that whatever obscures your
brain and makes you incapable of reflection and thought, which is the
spiritual side of the question; or, on the other hand, whatever visibly
interferes with your comfort and destroys your career— But that last is
mercenary,’ he added, with a wave of his hand, ‘and things that are
mercenary and based on self-interest belong to a lower class of motives
altogether; not what we were discussing at all.’
‘There is nothing to discuss that I can see,’ cried John. ‘All that you say
is a mere confusion of plain right and wrong. To forge another man’s name
is to sin against your neighbour; and drink is a sin against—yourself, and
everything that’s sane and rational. You own yourself it’s ruin; and it’s
degradation and misery and everything that’s dreadful. I have seen it among
the men——’
‘I never said anything about the penalties,’ said the other, waving his
hand again. ‘They’re innumerable: but they’re irrelevant. The penalties are
enormous. Drinking is not in the decalogue at all, you’ll acknowledge that.
But if you consider consequences (which, however, I protest are irrelevant),
there’s nothing, not even murder, that is punished so. It makes a wreck of
everything—a young fellow’s looks, and his health, and all he stands upon.
He pays for his glass with everything he has in the world. You may even
steal without being caught for years: but if you drink you lose everything:
there’s no escape for you and no hope. All that is true. Still it isn’t the sin
that lying is, or cheating, or bearing false witness. These things are all in the
commandments, but not drinking. So far as I can see, and I have had a great
deal of time to think, we’re paid out for that in the present world. It’s not
left over like the rest for—the other place, sir, the other place.’
‘If you’d seen what I’ve seen,’ cried John, with honest, youthful fervour;
‘the harm it has done—oh, not to the brute himself, I don’t care a farthing
for that! but to the helpless wife and children,—you would know better than
to hesitate for a moment as to whether drinking is a sin.’
‘If I’d seen what he’s seen!’ cried his strange companion, with that
wonderful twinkle in his eye. The humour in it was tinged with the
profoundest tragedy, though John, in his indignation, failed to see it. He
began to laugh low to himself with a curious quiver of sound in his throat.
‘I’ve done more than see it. I’ve done it,’ he said: ‘broken the hearts of
everybody I cared for in the world. You don’t know what I am. I am a man
that have had a wife and children, and perhaps have still, for aught I know. I
made them pay for my whisky, God knows I did: and myself, too—but
that’s neither here nor there. As for the brute himself, as you say, who cares
a farthing for him? I took it out of them and made them pay for it. But now
they’ve shaken me off, glad perhaps to get shut of me. And if they’re living
or dead I don’t know, and where they are I don’t know. That’s one of the
penalties. I should know all about that, if any one does: I’m no neophyte—
I’m a man well instructed. But all these are consequences,’ he added,
slowly. ‘They’re irrelevant. They don’t touch the principle. What you say
I’ve gone over a thousand times. It’s juvenile, it’s elementary: it doesn’t
touch the question at all: on which he thinks, bless us all—though he’s
scarcely out of swaddling clothes—that he knows more than I!’
John was daunted, and he was impressed by the terrible story thus lightly
glanced at. He did not know what to say. What he faltered forth at last was
the question of a child in the midst of an exciting story.
‘And don’t you know where they are? and can’t you seek them out?’
If the stranger’s feelings had been affected before, he seemed to have got
the better of his emotion now.
‘Do you remember,’ he said, ‘in the Sermon on the Mount, how the
unkind children say it is Corban, a gift, and so get rid of the old people?
That’s how they’ve done with me. It is Corban, a gift. I’m not penniless,
though I’m friendless. There was a sum of money waiting for me when I
came out: and that was all.’
‘But you could inquire; you could search for them: you could——’
John felt his sense of right and wrong confused by this narrative.
Suspicion, offence, indignation, righteous anger at all these sophistries had
succeeded each other in his mind. Now there came over him a great wave of
pity. In every such story he had ever heard of (he did not realise that he had
never heard such a story at first hand) there had always been some devoted
wife or sister or child waiting to receive the miserable offender, some
sorrowful home ready to take him in. That was always the most pathetic
situation, the saddest picture. But the dead blank of this—a sum of money
waiting for the unhappy man and no more, no one to take him by the hand
or give him hope, was tragedy indeed. It made his heart sick, and filled him
with a confused relenting and compunction and eagerness to do something
—to help, where no help was.
‘Why should I?’ said the man, with his strange smile. ‘I daresay she has
brought them up very creditably, poor children. I should like to know
something about my little boy: but it would be no advantage to him, would
it, to find his long-lost father in me? No, I’ve got below that, or above it, if
you please. I content myself with Joe—poor Joe,’ here he broke into a
tremulous laugh, ‘whose truth you don’t believe in, but who’s always been
faithful, after his sort, to me.’
John was greatly moved, more moved than he could have thought was
possible out of mere sympathy and pity.
‘Oh,’ he cried, ‘don’t content yourself with Joe. I’ve no right to give you
my advice, but since you’ve come to me and told me all this— When I took
you to those lodgings that night, it was because I wanted to try to get you to
think—to get free of such company. Don’t be content with Joe; you will
only fall into—you will only be led into——’
‘Drink,’ said the other. ‘Very likely: and that’s all right. I should have
been dead long ago if I hadn’t been kept from it by force for years. Now
I’m old, comparatively, as the newspapers say. And it will make short work.
All the better. That’s the only thing I’m good for now.’
‘Don’t say that,’ said John, with moisture in the corners of his eyes. ‘You
are not an old man yet. Do something better than that. Work at something.
I’ll help you if I can—I’ll——’ He paused, for this was a tremendous thing
to say, and such a risk to run as took away the breath of a young man so
absorbed in his own pursuits and determined on succeeding. He paused, and
the flush of a sudden struggle came all over him, a rush of blood to his
brain, a conflict of thoughts which filled his head and his ears with a
clamour as of armies meeting, and then he continued, with a vehemence
which was not in his ordinary nature, a burst of generous youthful impulse
unlike the ordinary wisdom and self-restraint of his sober youth, ‘I’ll be a
friend to you instead of Joe!’
The convict—for he was a convict, however he might explain his
offences away—gave John a smile which was like sunshine, and lit up all
his face. But then he shook his head.
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
ebookbell.com