Register your product to gain access to bonus material or receive a coupon.
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
DB2 at a Glance: The Big Picture
Download Sample Chapter 1 related to this title.
Download Sample Chapter 2 related to this title.
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 111.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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 StartedIf 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 AdviceIn 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.