Book Image

IBM DB2 9.7 Advanced Administration Cookbook

Book Image

IBM DB2 9.7 Advanced Administration Cookbook

Overview of this book

IBM DB2 LUW is a leading relational database system developed by IBM. DB2 LUW database software offers industry leading performance, scale, and reliability on your choice of platform on various Linux distributions, leading Unix Systems like AIX, HP-UX and Solaris and MS Windows platforms. With lots of new features, DB2 9.7 delivers one the best relational database systems in the market. IBM DB2 9.7 Advanced Administration Cookbook covers all the latest features with instance creation, setup, and administration of multi-partitioned database. This practical cookbook provides step-by-step instructions to build and configure powerful databases, with scalability, safety and reliability features, using industry standard best practices. This book will walk you through all the important aspects of administration. You will learn to set up production capable environments with multi-partitioned databases and make the best use of hardware resources for maximum performance. With this guide you can master the different ways to implement strong databases with a High Availability architecture.
Table of Contents (21 chapters)
IBM DB2 9.7 Advanced Administration Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

IBM DB2 LUW is a leading relational database system developed by IBM. DB2 LUW database software offers industry leading performance, scale, and reliability on your choice of platform on various Linux distributions, leading Unix systems, such as AIX, HP-UX, and Solaris, and also MS Windows platforms. With lots of new features, DB2 9.7 delivers one the best relational database systems on the market.

IBM DB2 9.7 Advanced Administration Cookbook covers all the latest features with instance creation, setup, and administration of multi-partitioned databases.

This practical cookbook provides step-by-step instructions to build and configure powerful databases, with scalability, safety, and reliability features, using industry standard best practices.

This book will walk you through all the important aspects of administration. You will learn to set up production-capable environments with multi-partitioned databases and make the best use of hardware resources for maximum performance.

With this guide, you can master the different ways to implement strong databases with high-availability architecture.

What this book covers

Chapter 1, DB2 Instance—Administration and Configuration, covers DB2 instance creation and configuration for non-partitioned database and multipartitioned database environments.

Chapter 2, Administration and Configuration of the DB2 Non-partitioned Database, contains recipes that explain how to create a database and get operational in simple and easy steps. In this chapter, you will also learn how to configure your database for its mission and prepare it for automatic maintenance, so its operation is worry-free.

Chapter 3, DB2 Multipartitioned Databases—Administration and Configuration, contains recipes that explain how to create and configure a multipartitioned database and its related administration tasks. This chapter will also teach us how to add and remove new partitions, how to perform add, remove, and redistribute operations on database partition groups, and much more.

Chapter 4, Storage—Using DB2 Table Spaces, covers physical aspects of storage, the foundation of a database. In this chapter, we will cover configuring SMS and DMS table spaces, altering table spaces, and dropping table spaces.

Chapter 5, DB2 Buffer Pools, covers caching. Here, you will learn how data is read from the disk, to buffer pools. And as reading from memory is faster than reading from disk, the buffer pools play an important part in database performance.

Chapter 6, Database Objects, covers Multidimensional Clustering (MDC), Materialized Query Tables (MQT), and Partitioning as the key techniques used for efficient data warehousing. Combined with database partitioning, these deliver a scalable and effective solution, reduce performance problems and logging, and provide easier table maintenance.

Chapter 7, DB2 Backup and Recovery, covers the major aspects of backup and recovery, as is practiced industry-wide, the preferred solutions, and how we can implement some of these methods.

Chapter 8, DB2 High Availability, mainly covers High Availability Disaster Recovery as a HA solution and DB2 Fault Monitor, which is used for monitoring and ensuring the availability of instances that might be closed by unexpected events, such as bugs or other type of malfunctions. The reader will learn how to implement HADR using command line and Control Center, about synchronization modes, how to initiate takeover and takeover by force, how to configure and open a standby database in read-only mode, and more.

Chapter 9, Problem Determination, Event Sources, and Files, has recipes for various tools used for diagnostics, inspection, and performance problem detection, such as db2mtkr, for gathering memory-related information, db2pd, a very powerful tool used for problem determination, db2dart, also a very powerful tool with wide applicability, that can be used for virtually any problem that may arise, db2ckbkp, for backup image checking, and db2support, used mainly for automating diagnostic data collection.

Chapter 10, DB2 Security, speaks about the main security options used to harden and secure DB2 servers. It is about instance-level and database authorities, data encryption, roles, and securing and hiding data using Label Based Access Control.

Chapter 11, Connectivity and Networking, covers many network-related configurations that apply to DB2 servers and clients, such as node cataloging, setting up connections to DRDA serves, and how to tune and monitor the Fast Communication Manager.

Chapter 12, Monitoring, covers an important part of a DBA's work, ensuring the database is available and that nothing hinders its functionality.

Chapter 13, DB2 Tuning and Optimization, provides general guidelines, as well as insightful details, on how to dispense the regular attention and tuning that databases need, using a design-centered approach. Our tips, based on best practices in the industry, will help you in building powerful and efficient databases.

Chapter 14, IBM pureScale Technology and DB2, represents mainly an introduction to pureScale technology. We will cover the principal administration tasks related to members, instances, and caching facilities. The reader will also learn about monitoring, backup and recovery methods, and special features that exist only in pureScale configurations.

What you need for this book

Unless you have access to a facility that has DB2 installed, you can install a trial version of DB2 on your own PC for learning purposes. Make sure you have the required hardware and operating system.

We must stress the importance of using a sandbox environment in order to duplicate the recipes in this book. Some recipes are intended for demonstration purposes and should not be done in a production environment.

Who this book is for

If you are a DB2 Database Administrator who wants to understand and get hands-on with the underlying aspects of database administration, then this book is for you.

This book assumes that you have a basic understanding of DB2 database concepts, and sufficient proficiency in the Unix/Linux operating system.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Partitioned indexes facilitate data maintenance by making rollin and rollout operations easier."

A block of code is set as follows:

SELECT DISTINCT  
  STORE, INTEGER(SALESDATE)/100
FROM POS.SALES

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

db2 "CREATE TABLE POSP.MQT_REFTBLS AS ( … )
 ...
 MAINTAINED BY SYSTEM
 DISTRIBUTE BY REPLICATION"

Any command-line input or output is written as follows:

CREATE GLOBAL TEMPORARY TABLE TMP_INVCDET
LIKE POSP.INVCDET
ON COMMIT DELETE ROWS
NOT LOGGED
IN POSTEMP8K;

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Navigate to Database partition groups, right-click, and choose Create…."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title through the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website, or added to any list of existing errata, under the Errata section of that title.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.