Preface |
|
xxiii | |
|
Part I SQL Techniques, Tips, and Tricks |
|
|
|
|
3 | (53) |
|
|
4 | (9) |
|
|
13 | (29) |
|
|
42 | (2) |
|
|
44 | (1) |
|
|
45 | (11) |
|
2 Data Manipulation Guidelines |
|
|
56 | (79) |
|
|
56 | (2) |
|
|
58 | (32) |
|
|
90 | (20) |
|
Common Table Expressions and Recursion |
|
|
110 | (5) |
|
|
115 | (4) |
|
|
119 | (6) |
|
Data Modification Guidelines |
|
|
125 | (10) |
|
|
135 | (32) |
|
|
135 | (6) |
|
|
141 | (18) |
|
|
159 | (1) |
|
MQSeries Built-In Functions |
|
|
159 | (2) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
163 | (1) |
|
Built-in Function Guidelines |
|
|
163 | (4) |
|
4 Using DB2 User-Defined Functions and Data Types |
|
|
167 | (33) |
|
What Is a User-Defined Function? |
|
|
167 | (1) |
|
Types of User-Defined Functions (UDFs) |
|
|
168 | (22) |
|
What Is a User-Defined Data Type? |
|
|
190 | (1) |
|
User-Defined Data Types (UDTs) and Strong Typing |
|
|
191 | (9) |
|
5 Data Definition Guidelines |
|
|
200 | (124) |
|
An Overview of DB2 Database Objects |
|
|
200 | (1) |
|
|
201 | (3) |
|
Creating and Using DB2 Table Spaces |
|
|
204 | (35) |
|
DB2 Storage and STOGROUPs |
|
|
239 | (5) |
|
|
244 | (31) |
|
|
275 | (3) |
|
Normalization and Denormalization |
|
|
278 | (12) |
|
Assuring Data Integrity in DB2 |
|
|
290 | (1) |
|
|
290 | (12) |
|
Views, Aliases, and Synonyms |
|
|
302 | (11) |
|
|
313 | (1) |
|
|
313 | (9) |
|
Miscellaneous DDL Guidelines |
|
|
322 | (2) |
|
6 DB2 Indexing and Hashing Guidelines |
|
|
324 | (29) |
|
|
324 | (2) |
|
|
326 | (11) |
|
DB2 Hashing and Hash Organized Tables |
|
|
337 | (4) |
|
Index and Hash Guidelines |
|
|
341 | (12) |
|
7 Database Change Management, Schema Evolution, and Database Definition On Demand |
|
|
353 | (20) |
|
|
354 | (16) |
|
Versioning for Online Schema Changes |
|
|
370 | (3) |
|
|
373 | (20) |
|
|
373 | (15) |
|
|
388 | (5) |
|
9 Large Objects and Object/Relational Databases |
|
|
393 | (15) |
|
Defining the Term "Object/Relational" |
|
|
393 | (1) |
|
|
394 | (9) |
|
|
403 | (4) |
|
|
407 | (1) |
|
10 pureXML: Using XML in DB2 for z/OS |
|
|
408 | (20) |
|
|
408 | (4) |
|
|
412 | (13) |
|
|
425 | (3) |
|
11 Supporting Temporal Data in DB2 for z/OS |
|
|
428 | (20) |
|
The Need for Temporal Data |
|
|
428 | (2) |
|
|
430 | (16) |
|
|
446 | (1) |
|
|
447 | (1) |
|
12 DB2 Security, Authorization, and Auditing |
|
|
448 | (38) |
|
Authorization and Privileges |
|
|
448 | (28) |
|
|
476 | (4) |
|
Using External Security (for Example, RACE, ACF2, and Top Secret) |
|
|
480 | (6) |
|
Part II DB2 Application Development |
|
|
|
13 Using DB2 in an Application Program |
|
|
486 | (81) |
|
|
487 | (2) |
|
|
489 | (15) |
|
|
504 | (7) |
|
|
511 | (14) |
|
Modifying Data with Embedded SQL |
|
|
525 | (2) |
|
Application Development Guidelines |
|
|
527 | (9) |
|
Batch Programming Guidelines |
|
|
536 | (11) |
|
Online Programming Guidelines |
|
|
547 | (5) |
|
General SQL Coding Guidelines |
|
|
552 | (2) |
|
|
554 | (9) |
|
|
563 | (2) |
|
Developing Applications Using Only SQL |
|
|
565 | (2) |
|
14 Dynamic SQL Programming |
|
|
567 | (34) |
|
|
567 | (2) |
|
Dynamic SQL Versus Static SQL |
|
|
569 | (7) |
|
The Four Classes of Dynamic SQL |
|
|
576 | (12) |
|
|
588 | (1) |
|
Making Dynamic SQL More Static and Vice Versa |
|
|
589 | (5) |
|
|
594 | (7) |
|
|
601 | (55) |
|
Program Preparation Steps |
|
|
601 | (7) |
|
|
608 | (1) |
|
|
609 | (13) |
|
|
622 | (1) |
|
|
622 | (1) |
|
|
623 | (5) |
|
|
628 | (1) |
|
|
629 | (1) |
|
Converting DBRM-Based Plans in DB2 V10 |
|
|
630 | (1) |
|
Program Preparation Objects |
|
|
631 | (1) |
|
Program Preparation Guidelines |
|
|
632 | (24) |
|
16 Using DB2 Stored Procedures |
|
|
656 | (33) |
|
What Is a Stored Procedure? |
|
|
657 | (4) |
|
Implementing DB2 Stored Procedures |
|
|
661 | (17) |
|
|
678 | (5) |
|
|
683 | (4) |
|
|
687 | (2) |
|
|
689 | (15) |
|
|
689 | (3) |
|
Accessing DB2 over the Internet |
|
|
692 | (3) |
|
Finding DB2 Information Using the Internet |
|
|
695 | (9) |
|
|
|
|
704 | (68) |
|
DB2 Program Execution Basics |
|
|
704 | (2) |
|
TSO (Time-Sharing Option) |
|
|
706 | (20) |
|
CICS (Customer Information Control System) |
|
|
726 | (25) |
|
IMS (Information Management System) |
|
|
751 | (12) |
|
CAF (Call Attach Facility) |
|
|
763 | (4) |
|
RRSAF (Recoverable Resource Manager Services Attach Facility) |
|
|
767 | (1) |
|
Comparison of the Environments |
|
|
768 | (4) |
|
|
772 | (20) |
|
|
772 | (2) |
|
Data Sharing Requirements |
|
|
774 | (4) |
|
The DB2 Coupling Facility |
|
|
778 | (4) |
|
Data Sharing Naming Conventions |
|
|
782 | (1) |
|
Data Sharing Administration |
|
|
783 | (4) |
|
Data Sharing Application Development Guidelines |
|
|
787 | (1) |
|
Data Sharing Administration Guidelines |
|
|
788 | (4) |
|
|
792 | (24) |
|
The Physical Storage of Data |
|
|
792 | (16) |
|
|
808 | (4) |
|
|
812 | (4) |
|
|
816 | (58) |
|
Physical Data Independence |
|
|
817 | (1) |
|
|
818 | (3) |
|
|
821 | (2) |
|
|
823 | (1) |
|
|
824 | (44) |
|
Other Operations Performed by the Optimizer |
|
|
868 | (6) |
|
22 The Table-Based Infrastructure of DB2 |
|
|
874 | (15) |
|
|
874 | (12) |
|
|
886 | (3) |
|
|
889 | (37) |
|
|
889 | (3) |
|
|
892 | (1) |
|
|
892 | (3) |
|
|
895 | (2) |
|
|
897 | (1) |
|
|
898 | (1) |
|
|
899 | (2) |
|
Lock Suspensions, Timeouts, and Deadlocks |
|
|
901 | (3) |
|
|
904 | (4) |
|
|
908 | (3) |
|
Data Sharing Global Lock Management |
|
|
911 | (3) |
|
|
914 | (2) |
|
|
916 | (5) |
|
|
921 | (1) |
|
|
922 | (4) |
|
Part IV DB2 Performance Monitoring |
|
|
|
|
926 | (1) |
|
Types of DB2 Performance Monitoring |
|
|
927 | (1) |
|
24 DB2 Performance Monitoring |
|
|
928 | (52) |
|
|
929 | (7) |
|
|
936 | (1) |
|
|
937 | (1) |
|
|
938 | (2) |
|
Performance Monitoring and Reporting: Online and Batch |
|
|
940 | (27) |
|
Monitoring and Reporting Strategy |
|
|
967 | (3) |
|
|
970 | (2) |
|
Viewing DB2 Console Messages |
|
|
972 | (5) |
|
Displaying the Status of DB2 Resources |
|
|
977 | (2) |
|
|
979 | (1) |
|
|
980 | (34) |
|
|
980 | (2) |
|
Access Paths and the Plan_Table |
|
|
982 | (16) |
|
Cost Estimates and the DSN_Statemnt_Table |
|
|
998 | (3) |
|
Function Resolution and the DSN_Function_Table |
|
|
1001 | (1) |
|
Additional Explain Tables |
|
|
1002 | (1) |
|
Explaining the Dynamic Statement Cache |
|
|
1003 | (2) |
|
|
1005 | (7) |
|
Additional Tools for Managing Access Paths |
|
|
1012 | (2) |
|
|
1014 | (7) |
|
|
1014 | (2) |
|
A Best Practice Approach to Rebinding |
|
|
1016 | (5) |
|
27 DB2 Object Monitoring Using the DB2 Catalog and RTS |
|
|
1021 | (43) |
|
|
1021 | (27) |
|
|
1048 | (10) |
|
Reviewing the Rules for an Effective Monitoring Strategy |
|
|
1058 | (6) |
|
Part V DB2 Performance Tuning |
|
|
|
28 Tuning DB2's Environment |
|
|
1064 | (25) |
|
Tuning the z/OS Environment |
|
|
1064 | (23) |
|
Tuning the Teleprocessing Environment |
|
|
1087 | (2) |
|
29 Tuning DB2's Components |
|
|
1089 | (54) |
|
|
1089 | (25) |
|
Tuning the Database Design |
|
|
1114 | (2) |
|
|
1116 | (21) |
|
The Causes of DB2 Performance Problems |
|
|
1137 | (6) |
|
30 DB2 Resource Governing |
|
|
1143 | (9) |
|
The Resource Limit Facility |
|
|
1143 | (9) |
|
Part VI DB2 Utilities and Commands |
|
|
|
31 An Introduction to DB2 Utilities |
|
|
1152 | (24) |
|
|
1152 | (4) |
|
|
1156 | (2) |
|
|
1158 | (1) |
|
Using LISTDEF and TEMPLATE |
|
|
1159 | (14) |
|
Issuing SQL Statements in DB2 Utilities |
|
|
1173 | (3) |
|
32 Data Consistency Utilities |
|
|
1176 | (25) |
|
|
1177 | (1) |
|
|
1177 | (9) |
|
|
1186 | (2) |
|
|
1188 | (3) |
|
|
1191 | (1) |
|
|
1192 | (1) |
|
|
1193 | (3) |
|
|
1196 | (2) |
|
|
1198 | (1) |
|
|
1198 | (2) |
|
|
1200 | (1) |
|
33 Backup and Recovery Utilities |
|
|
1201 | (39) |
|
|
1202 | (13) |
|
|
1215 | (3) |
|
|
1218 | (2) |
|
|
1220 | (4) |
|
|
1224 | (8) |
|
The Rebuild Index Utility |
|
|
1232 | (3) |
|
|
1235 | (1) |
|
The Report Recovery Utility |
|
|
1235 | (1) |
|
Backing Up and Restoring the System |
|
|
1236 | (4) |
|
34 Data Movement and Organization Utilities |
|
|
1240 | (49) |
|
|
1240 | (20) |
|
|
1260 | (5) |
|
|
1265 | (24) |
|
35 Catalog Manipulation Utilities |
|
|
1289 | (25) |
|
|
1289 | (1) |
|
|
1289 | (1) |
|
|
1290 | (1) |
|
The Modify Recovery Utility |
|
|
1290 | (3) |
|
The Modify Statistics Utility |
|
|
1293 | (2) |
|
|
1295 | (16) |
|
|
1311 | (3) |
|
36 Stand-Alone Utilities and Sample Programs |
|
|
1314 | (26) |
|
The Stand-Alone Utilities |
|
|
1314 | (18) |
|
|
1332 | (8) |
|
|
1340 | (26) |
|
|
1340 | (3) |
|
Information-Gathering Commands |
|
|
1343 | (10) |
|
|
1353 | (5) |
|
Environment Control Commands |
|
|
1358 | (1) |
|
|
1359 | (2) |
|
|
1361 | (1) |
|
|
1362 | (2) |
|
|
1364 | (1) |
|
|
1364 | (2) |
|
38 DB2 Utility and Command Guidelines |
|
|
1366 | (10) |
|
|
1366 | (6) |
|
|
1372 | (4) |
|
39 DB2 Contingency Planning |
|
|
1376 | (18) |
|
|
1376 | (4) |
|
|
1380 | (7) |
|
Additional DB2 Disaster Recovery Technologies |
|
|
1387 | (1) |
|
DB2 Environmental Considerations |
|
|
1388 | (2) |
|
DB2 Contingency Planning Guidelines |
|
|
1390 | (4) |
|
Part VII The Ideal DB2 Environment |
|
|
|
40 Components of a Total DB2 Solution |
|
|
1394 | (29) |
|
|
1394 | (26) |
|
|
1420 | (3) |
|
|
1423 | (23) |
|
|
1423 | (6) |
|
|
1429 | (11) |
|
|
1440 | (1) |
|
|
1441 | (2) |
|
|
1443 | (1) |
|
|
1443 | (3) |
|
Part VIII Distributed DB2 |
|
|
|
The Advantages of Data Distribution |
|
|
1446 | (1) |
|
|
1446 | (1) |
|
|
1447 | (1) |
|
|
1448 | (10) |
|
|
1448 | (1) |
|
|
1449 | (2) |
|
DRDA Architectures and Standards |
|
|
1451 | (2) |
|
|
1453 | (2) |
|
|
1455 | (3) |
|
|
1458 | (15) |
|
Distributing Data Using DB2 |
|
|
1458 | (2) |
|
DB2 Support for the DRDA Levels |
|
|
1460 | (1) |
|
Methods of Accessing Distributed Data |
|
|
1460 | (5) |
|
|
1465 | (1) |
|
|
1466 | (4) |
|
Miscellaneous Distributed Topics |
|
|
1470 | (3) |
|
|
1473 | (12) |
|
An Overview of IBM DB2 Connect |
|
|
1473 | (12) |
|
45 Distribution Guidelines |
|
|
1485 | (21) |
|
Distribution Behind the Scenes |
|
|
1485 | (2) |
|
|
1487 | (4) |
|
|
1491 | (1) |
|
Distributed Performance Problems |
|
|
1491 | (5) |
|
Distributed Database Design Issues |
|
|
1496 | (3) |
|
Distributed Data Placement |
|
|
1499 | (1) |
|
|
1500 | (1) |
|
Distributed Security Guidelines |
|
|
1501 | (1) |
|
Miscellaneous Distributed Guidelines |
|
|
1502 | (4) |
|
46 Data Warehousing with DB2 |
|
|
1506 | (35) |
|
|
1507 | (3) |
|
Designing a Data Warehouse |
|
|
1510 | (3) |
|
Populating a Data Warehouse |
|
|
1513 | (6) |
|
Accessing the Data Warehouse |
|
|
1519 | (1) |
|
Managing the Data Warehouse |
|
|
1520 | (1) |
|
|
1520 | (1) |
|
IBM Data Warehousing Solutions |
|
|
1521 | (1) |
|
Materialized Query Tables |
|
|
1522 | (11) |
|
General Data Warehouse Guidelines |
|
|
1533 | (5) |
|
DB2-Specific Data Warehousing Guidelines |
|
|
1538 | (3) |
Index |
|
1541 | |