Home > Store

Understanding DB2: Learning Visually with Examples

Register your product to gain access to bonus material or receive a coupon.

Understanding DB2: Learning Visually with Examples

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2005
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-185916-1
  • ISBN-13: 978-0-13-185916-6

The Easy, Visual Guide to IBM DB2 V8.2

IBM DB2 Universal Database™ V8.2 for Linux®, UNIX®, and Windows® is a flexible, scalable, cost-effective, and easy-to-use enterprise database. Now, one book makes DB2 even easier. Understanding DB2 teaches DB2 V8.2 visually, step by step, with dozens of examples and case studies drawn from the authors' unsurpassed experience as DB2 consultants at IBM.

Understanding DB2 doesn't just present the big picture. It thoroughly introduces every DB2 concept, procedure, and tool you'll need to get results as an administrator, user, or developer. You'll find authoritative coverage of installation, configuration, objects, database instances, storage, connectivity, security, performance, backup and recovery, SQL fundamentals, and much more. Virtually every new concept is explained with screenshots, diagrams, or tables, all designed to help you learn faster and remember more.

For those preparing for certification, this book also contains over a hundred sample questions crafted by the authors to reflect the content and format of the IBM DB2 UDB Database Administration Certification exams, with answers and detailed explanations.

Coverage includes

  • Understanding the DB2 product family, DB2 commands, and the DB2 environment
  • Configuring client and server connectivity: walkthroughs of four typical scenarios
  • Managing DB2 storage: partitions, tablespaces, buffer pools, and more
  • Leveraging the power of SQL: queries, inserts, deletes, and updates
  • Implementing security: encryption, authentication, and authorization
  • Administering and maintaining data, from LOAD and EXPORT to backup/recovery
  • Providing high availability with online split mirroring and suspended I/O
  • DB2 architecture: process and memory models
  • Managing database performance and troubleshooting


Sample Content

Online Sample Chapters

DB2 at a Glance: The Big Picture

Introduction to DB2 UDB

Downloadable Sample Chapter

Untitled Document

Download Sample Chapter 1 related to this title.

Download Sample Chapter 2 related to this title.

Table of Contents

Foreword xxi
Preface xxiii
Acknowledgments xxvii
About the Authors xxix

Chapter 1 Introduction to DB2 UDB 1

1.1 A Brief History of DB2 1

1.2 DB2 software and the IBM E-Business On-Demand Model 4

1.3 DB2 UDB Editions 5

1.4 DB2 UDB Clients 11

1.5 "Try and Buy" Versions 13

1.6 Host Connectivity 13

1.7 Federated Support 14

1.8 Replication Support 14

1.9 IBM DB2 Information Integrator 15

1.10 Special Package Offerings for Developers 15

1.11 DB2 Syntax Diagram Conventions 17

1.12 Case Study 18

1.13 Summary 20

1.14 Review Questions 21

Chapter 2 DB2 at a Glance: The Big Picture 23

2.1 SQL Statements and DB2 Commands 24

2.2 DB2 Tools Overview 27

2.3 The DB2 Environment 29

2.4 Federation 42

2.5 Case Study: The DB2 Environment 44

2.6 Database Partitioning Feature 45

2.7 Case Study: DB2 with DPF Environment 61

2.8 Summary 66

2.9 Review Questions 67

Chapter 3 Installing DB2 71

3.1 DB2 Installation: The Big Picture 71

3.2 Required User IDs and Groups 72

3.3 Installing DB2 Using the DB2 Setup Wizard 77

3.4 Silent Install Using a Response File 92

3.5 Installing DB2 Manually (Linux/UNIX Only) 96

3.6 Installing a DB2 License 97

3.7 Installing DB2 in a DPF Environment 99

3.8 Installing DB2 FixPaks 100

3.9 Case Study 102

3.10 Summary 104

3.11 Review Questions 105

Chapter 4 Using the DB2 Tools 107

4.1 DB2 Tools: The Big Picture 107

4.2 The Command Line Tools 108

4.3 Development Tools 126

4.4 General Administration Tools 129

4.5 Information Tools 134

4.6 Monitoring Tools 136

4.7 Setup Tools 141

4.8 Other Tools 142

4.9 Tool Settings 146

4.10 Case Study 147

4.11 Summary 150

4.12 Review Questions 150

Chapter 5 Understanding the DB2 Environment, DB2 Instances, and Databases 153

5.1 The DB2 Environment, DB2 Instances, and Databases: The Big Picture 153

5.2 The DB2 Environment 154

5.3 The DB2 Instance 160

5.4 The Database Administration Server 177

5.5 Configuring a Database 178

5.6 Instance and Database Design Considerations 185

5.7 Case Study 186

5.8 Summary 188

5.9 Review Questions 189

Chapter 6 Configuring Client and Server Connectivity 193

6.1 Client and Server Connectivity: The Big Picture 193

6.2 The DB2 Directories 195

6.3 Supported Connectivity Scenarios 205

6.4 Configuring Database Connections Using the Configuration Assistant 220

6.5 Case Study 238

6.6 Summary 239

6.7 Review Questions 241

Chapter 7 Working with Database Objects 243

7.1 DB2 Database Objects: The Big Picture 243

7.2 Databases 246

7.3 Partition Groups 251

7.4 Table Spaces 252

7.5 Buffer Pools 254

7.6 Schemas 254

7.7 Data Types 256

7.8 Tables 262

7.9 Indexes 285

7.10 Multidimensional Clustering Tables and Block Indexes 291

7.11 Views 295

7.12 Packages 301

7.13 Triggers 301

7.14 Stored Procedures 303

7.15 User-Defined Functions 306

7.16 Sequences 308

7.17 Case Study 309

7.18 Summary 312

7.19 Review Questions 312

Chapter 8 The DB2 Storage Model 317

8.1 The DB2 Storage Model: The Big Picture 317

8.2 Databases: Logical and Physical Storage of Your Data 319

8.3 Database Partition Groups 327

8.4 Table Spaces 331

8.5 Buffer Pools 354

8.6 Case Study 358

8.7 Summary 360

8.8 Review Questions 360

Chapter 9 Leveraging the Power of SQL 365

9.1 Querying DB2 Data 365

9.2 Modifying DB2 Data 379

9.3 Selecting from UPDATE, DELETE, and INSERT 380

9.4 The MERGE Statement 382

9.5 Recursive SQL 383

9.6 The UNION, INTERSECT, and EXCEPT Operators 384

9.7 Case Study 387

9.8 Summary 390

9.9 Review Questions 390

Chapter 10 Implementing Security 397

10.1 DB2 Security Model: The Big Picture 397

10.2 Authentication 398

10.3 Data Encryption 411

10.4 Administrative Authorities 411

10.5 Database Object Privileges 417

10.6 Authority and Privilege Metadata 427

10.7 Windows Domain Considerations 432

10.8 Case Study 434

10.9 Summary 436

10.10 Review Questions 436

Chapter 11 Understanding Concurrency and Locking 439

11.1 DB2 Locking and Concurrency: The Big Picture 439

11.2 Concurrency and Locking Scenarios 440

11.3 DB2 Isolation Levels 443

11.4 Changing Isolation Levels 449

11.5 DB2 Locking 455

11.6 Diagnosing Lock Problems 465

11.7 Techniques to Avoid Locking 479

11.8 Case Study 480

11.9 Summary 481

11.10 Review Questions 482

Chapter 12 Maintaining Data 485

12.1 DB2 Data Movement Utilities: The Big Picture 485

12.2 Data Movement File Formats 486

12.3 The DB2 EXPORT Utility 488

12.4 The DB2 IMPORT Utility 496

12.5 The DB2 LOAD Utility 502

12.6 The db2move Utility 522

12.7 The db2relocatedb Utility 523

12.8 Generating Data Definition Language 524

12.9 DB2 Maintenance Utilities 526

12.10 Case Study 531

12.11 Summary 533

12.12 Review Questions 533

Chapter 13 Developing Database Backup and Recovery Solutions 537

13.1 Database Recovery Concepts 537

13.2 DB2 Transaction Logs 540

13.3 Recovery Terminology 551

13.4 Performing Database and Table Space Backups 552

13.5 Database and Table Space Recovery Using the RESTORE DATABASE Command 558

13.6 Database and Table Space Roll Forward 563

13.7 Recovering a Dropped Table 567

13.8 The Recovery History File 568

13.9 Database Recovery Using the RECOVER DATABASE Command 569

13.10 High Availability Through Online Split Mirroring and Suspended I/O Support 570

13.11 High Availability Disaster Recovery 574

13.12 Using DB2 Tools to Inspect the Health of Your Database 582

13.13 Case Study 584

13.14 Summary 587

13.15 Review Questions 588

Chapter 14 The DB2 Process Model 593

14.1 The DB2 Process Model: The Big Picture 593

14.2 The DB2 Engine Dispatchable Units 596

14.3 Tuning the Number of EDUs 608

14.4 Monitoring and Tuning the DB2 Agents 609

14.5 The Connection Concentrator 611

14.6 Commonly Seen DB2 Executables 612

14.7 Additional Services/Processes on Windows 612

14.8 Case Study 613

14.9 Summary 615

14.10 Review Questions 616

Chapter 15 The DB2 Memory Model 619

15.1 DB2 Memory Allocation: The Big Picture 619

15.2 Instance-Level Shared Memory 621

15.3 Database-Level Shared Memory 623

15.4 Application-Level Shared Memory 627

15.5 Agent-Level Private Memory 629

15.6 The Memory Model 632

15.7 32-Bit Memory Model Considerations 632

15.8 64-Bit Memory Model Considerations 634

15.9 AWE Support with Windows 634

15.10 Case Study 635

15.11 Summary 639

15.12 Review Questions 639

Chapter 16 Database Performance Considerations 643

16.1 Performance Fundamentals 644

16.2 System/Server Configuration 644

16.3 The DB2 Configuration Advisor 646

16.4 Configuring the DB2 Instance 654

16.5 Configuring Your Databases 657

16.6 Lack of Proper Maintenance 663

16.7 The Snapshot Monitor 666

16.8 Event Monitors 669

16.9 The DB2 Optimizer 672

16.10 The Explain Tool and Explain Tables 673

16.11 Using Visual Explain to Examine Access Plans 675

16.12 Case Study 676

16.13 Summary 680

16.14 Review Questions 680

Chapter 17 Diagnosing Problems 683

17.1 Problem Diagnosis: The Big Picture 683

17.2 How Does DB2 Report Problems? 684

17.3 DB2 Error Message Description 686

17.4 DB2 First-Failure Data Capture 687

17.5 Receiving E-mail Notifications 692

17.6 The db2support Tool 693

17.7 The DB2 Trace Facility 694

17.8 Searching for Known Problems 694

17.9 Case Study 695

17.10 Summary 696

17.11 Review Questions 696

Appendix A Solutions to the Review Questions 699

Appendix B Use of Uppercase Versus Lowercase in DB2 721

Appendix C IBM Servers 723

Appendix D Using the DB2 System Catalog Tables 725

Appendix E Setting Up Database Connectivity for DB2 UDB for z/OS and DB2 UDB for iSeries 739

Appendix F Diagnosing DB2 Connectivity Problems 771

Resources 779
Glossary 785
Index 851
About the CD-ROM 897

Preface

Untitled Document

In the world of information technology today, it is more and more difficult to keep up with the skills required to be successful on the job. This book was developed to minimize the time, money, and effort required to learn DB2 Universal Database (DB2 UDB) for Linux, UNIX, and Windows. The book visually introduces and discusses the latest version of DB2 UDB, Version 8.2. The goal with the development of DB2 was to make it work the same regardless of the operating system on which you choose to run it. The few differences in the implementation of DB2 UDB on these platforms are explained in this book.

Who Should Read This Book?

This book is intended for anyone who works with databases, such as database administrators (DBAs), application developers, system administrators, and consultants. This book is a great introduction to DB2, whether you have used DB2 before or you are new to DB2. It is also a good study guide for anyone preparing for the IBM DB2 Universal Database Version 8 Certification exams 700 (DB2 UDB Family Fundamentals) and 701 (DB2 UDB Database Administration), or the DB2 UDB Version 8.1 Database Administration upgrade exam, number 706.

This book will save you time and effort because the topics are presented in a clear and concise manner, and we use figures, examples, case studies, and review questions to reinforce the material as it is presented. The book is different than many others on the subject because of the following.

1. Visual learning: The book relies on visual learning as its base. Each chapter starts with a "big picture" to introduce the topics to be discussed in that chapter. Numerous graphics are used throughout the chapters to explain concepts in detail. We feel that figures allow for fast, easy learning and longer retention of the material. If you forget some of the concepts discussed in the book or just need a quick refresher, you will not need to read the entire chapter again. You can simply look at the figures quickly to refresh your memory. For your convenience, some of the most important figures are provided in color on the CD-ROM accompanying this book. These figures in color can further improve your learning experience.

2. Clear explanations: We have encountered many situations when reading other books where paragraphs need to be read two, three, or even more times to grasp what they are describing. In this book we have made every effort possible to provide clear explanations so that you can understand the information quickly and easily.

3. Examples, examples, examples: The book provides many examples and case studies that reinforce the topics discussed in each chapter. Some of the examples have been taken from real life experiences that the authors have had while working with DB2 customers.

4. Sample exam questions: All chapters end with review questions that are similar to the questions on the DB2 Certification exams. These questions are intended to ensure that you understand the concepts discussed in each chapter before proceeding, and as a study guide for the IBM Certification exams. Appendix A contains the answers with explanations.

Getting Started

If you are new to DB2 and would like to get the most out of this book, we suggest you start reading from the beginning and continue with the chapters in order. If you are new to DB2 but are in a hurry to get a quick understanding of DB2, you can jump to Chapter 2, DB2 at a Glance: The Big Picture. Reading this chapter will introduce you to the main concepts of DB2. You can then go to other chapters to read for further details.

If you would like to follow the examples provided with the book, you need to install DB2. Chapter 3, Installing DB2, gives you the details to handle this task.

A Word of Advice

In this book we use figures extensively to introduce and examine DB2 concepts. While some of the figures may look complex, don't be overwhelmed by first impressions! The text that accompanies them explains the concepts in detail. If you look back at the figure after reading the description, you will be surprised by how much clearer it is.

This book only discusses DB2 UDB for Linux, UNIX, and Windows, so when we use the term DB2, we are referring to DB2 UDB on those platforms. DB2 UDB for iSeries, DB2 UDB for OS/390 and z/OS, and DB2 UDB for VM and VSE are mentioned only when presenting methods that you can use to access these databases from an application written on Linux, UNIX, or Windows. When DB2 UDB for iSeries, DB2 UDB for OS/390 and z/OS, and DB2 UDB for VM and VSE are discussed, we refer to them explicitly.


Foreword

Untitled Document Download the Foreword file related to this title.

Index

Untitled Document Download the Index file related to this title.

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020