Introduction |
|
1 | (1) |
Assumptions |
|
2 | (1) |
How to Use This Book |
|
2 | (1) |
Conventions Used in This Book |
|
3 | (1) |
About the CD-ROM |
|
3 | (2) |
|
|
5 | (186) |
|
|
7 | (24) |
|
What Is DB2 Universal Database? |
|
|
8 | (7) |
|
|
8 | (2) |
|
|
10 | (1) |
|
DB2 and Its Companion Products |
|
|
11 | (4) |
|
Understanding How DB2 Universal Database Works with Data |
|
|
15 | (1) |
|
DB2 Tools for Administering Databases |
|
|
15 | (4) |
|
Managing Databases with the Control Center |
|
|
16 | (2) |
|
Managing Communications on the Server |
|
|
18 | (1) |
|
Managing Connections to Databases with the Configuration Assistant |
|
|
18 | (1) |
|
Accessing Host Data from the Desktop |
|
|
19 | (2) |
|
Developing Applications with the DB2 Developer's Editions |
|
|
21 | (2) |
|
Accessing DB2 Data from the Web |
|
|
23 | (1) |
|
Using Java Database Connectivity |
|
|
23 | (1) |
|
|
24 | (1) |
|
Overview of the DB2 Enterprise Host Servers |
|
|
25 | (2) |
|
DB2 Universal Database for z/OS and OS/390 |
|
|
25 | (1) |
|
DB2 Universal Database for iSeries |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
28 | (1) |
|
|
29 | (2) |
|
|
29 | (2) |
|
Exploring the Capabilities of DB2 Universal Database |
|
|
31 | (36) |
|
|
32 | (1) |
|
What Is a Relational Database? |
|
|
33 | (9) |
|
Tables, Columns, and Rows |
|
|
33 | (1) |
|
|
34 | (2) |
|
|
36 | (1) |
|
|
36 | (2) |
|
|
38 | (1) |
|
|
38 | (3) |
|
|
41 | (1) |
|
|
42 | (18) |
|
|
43 | (1) |
|
|
43 | (2) |
|
User-Defined Types (UDTs) |
|
|
45 | (1) |
|
|
46 | (2) |
|
|
48 | (1) |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
50 | (6) |
|
|
56 | (1) |
|
|
57 | (3) |
|
|
60 | (3) |
|
|
61 | (1) |
|
Open Database Connectivity (ODBC) |
|
|
62 | (1) |
|
DB2 Call Level Interface (DB2 CLI) |
|
|
62 | (1) |
|
Application Programming Interfaces (APIs) |
|
|
63 | (1) |
|
System Management Facilities |
|
|
63 | (1) |
|
Online Administrative Capability |
|
|
64 | (1) |
|
Lightweight Directory Access Protocol (LDAP) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
65 | (1) |
|
|
65 | (1) |
|
|
65 | (2) |
|
|
66 | (1) |
|
|
66 | (1) |
|
Installing and Configuring DB2 Server |
|
|
67 | (28) |
|
Preparing for the Install |
|
|
68 | (2) |
|
Hardware and Software Requirements |
|
|
68 | (1) |
|
Creating a User Account for Installing DB2 Products |
|
|
69 | (1) |
|
Performing a Typical Install |
|
|
70 | (10) |
|
Performing a Custom Install |
|
|
80 | (10) |
|
Performing a Compact Install |
|
|
90 | (1) |
|
Installing the Product Information library |
|
|
91 | (1) |
|
Modifying, Repairing, or Removing DB2 |
|
|
91 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
93 | (2) |
|
|
93 | (2) |
|
|
95 | (22) |
|
|
95 | (1) |
|
Understanding the Desktop |
|
|
96 | (3) |
|
|
99 | (1) |
|
|
100 | (1) |
|
|
100 | (11) |
|
Creating the Sample Database |
|
|
102 | (1) |
|
Viewing and Working with the Sample Database |
|
|
103 | (5) |
|
Viewing the Product Information library |
|
|
108 | (2) |
|
Organizing and Viewing Objects by Schema |
|
|
110 | (1) |
|
|
111 | (1) |
|
Granting Privileges to Other Users |
|
|
111 | (3) |
|
Changing Default Privileges for Users |
|
|
114 | (1) |
|
|
114 | (1) |
|
|
115 | (1) |
|
|
115 | (1) |
|
|
116 | (1) |
|
|
116 | (1) |
|
|
116 | (1) |
|
Setting Up DB2 Instances and Server Communications |
|
|
117 | (26) |
|
Working with DB2 Instances |
|
|
118 | (5) |
|
|
118 | (1) |
|
Listing Available Instances |
|
|
118 | (1) |
|
Adding Additional Instances |
|
|
119 | (1) |
|
How DB2 Selects an Instance |
|
|
120 | (1) |
|
Starting and Stopping a DB2 Server Instance |
|
|
121 | (1) |
|
Running Multiple Instances Concurrently |
|
|
122 | (1) |
|
|
122 | (1) |
|
|
123 | (1) |
|
Modifying the DB2 Communication Configuration of Server Instances |
|
|
123 | (3) |
|
Viewing and Modifying Configuration Files |
|
|
126 | (5) |
|
Viewing and Modifying Database Manager Configuration Files |
|
|
126 | (2) |
|
Viewing and Modifying Database Configuration Files |
|
|
128 | (1) |
|
Viewing and Modifying Registry Variables |
|
|
129 | (2) |
|
Adding Systems Through the Control Center |
|
|
131 | (2) |
|
The DB2 Administration Server |
|
|
133 | (4) |
|
Setting Discovery on the Server |
|
|
134 | (1) |
|
Setting Discovery Parameters at the DAS Level |
|
|
135 | (1) |
|
Setting Discovery Parameters at the Instance Level |
|
|
136 | (1) |
|
Setting Discovery Parameters at the Database Level |
|
|
137 | (1) |
|
|
137 | (1) |
|
Generating a Server Profile |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
139 | (2) |
|
|
141 | (2) |
|
|
141 | (1) |
|
|
141 | (2) |
|
Installing and Configuring DB2 Clients |
|
|
143 | (28) |
|
Understanding the Different Types of DB2 Clients |
|
|
144 | (1) |
|
Preparing for the Install |
|
|
145 | (2) |
|
Hardware and Software Requirements |
|
|
145 | (1) |
|
Creating a User Account for Installing DB2 Products |
|
|
146 | (1) |
|
Performing a Typical Install |
|
|
147 | (4) |
|
Performing a Custom Install |
|
|
151 | (4) |
|
Performing a Compact Install |
|
|
155 | (1) |
|
Configuring Client-to-Server Communications with the Configuration Assistant |
|
|
155 | (1) |
|
Configuring Database Connections |
|
|
156 | (12) |
|
Configuring Database Connections Using a Profile |
|
|
156 | (3) |
|
Searching the Network for Databases |
|
|
159 | (2) |
|
Manually Configure a Connection to a DB2 Database |
|
|
161 | (2) |
|
|
163 | (1) |
|
|
164 | (4) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
168 | (1) |
|
|
169 | (2) |
|
|
170 | (1) |
|
|
170 | (1) |
|
|
171 | (20) |
|
|
172 | (2) |
|
|
172 | (1) |
|
Setting the Authentication Level |
|
|
173 | (1) |
|
Access to DB2 Universal Database |
|
|
174 | (3) |
|
|
177 | (9) |
|
|
177 | (2) |
|
|
179 | (2) |
|
|
181 | (3) |
|
Granting and Revoking Privileges and Authorities |
|
|
184 | (2) |
|
Windows Security Considerations |
|
|
186 | (2) |
|
|
188 | (1) |
|
|
188 | (1) |
|
|
188 | (1) |
|
|
189 | (2) |
|
|
189 | (1) |
|
|
189 | (2) |
|
|
191 | (144) |
|
Designing the CDLIB Database |
|
|
193 | (18) |
|
Deciding What Data to Store in the Database |
|
|
194 | (7) |
|
|
196 | (1) |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
Defining Tables for Each Type of Relationship |
|
|
201 | (1) |
|
Identifying the Primary Key |
|
|
202 | (1) |
|
Identifying Constraints and Foreign Keys |
|
|
203 | (1) |
|
|
204 | (4) |
|
|
204 | (1) |
|
|
205 | (1) |
|
|
206 | (2) |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
208 | (1) |
|
|
209 | (2) |
|
|
209 | (1) |
|
|
209 | (2) |
|
Creating Databases and Tables |
|
|
211 | (18) |
|
Creating a Simple Database |
|
|
212 | (14) |
|
|
214 | (5) |
|
|
219 | (1) |
|
Setting Up Referential Integrity |
|
|
220 | (5) |
|
|
225 | (1) |
|
|
226 | (1) |
|
|
226 | (1) |
|
|
227 | (1) |
|
|
227 | (2) |
|
|
227 | (1) |
|
|
228 | (1) |
|
|
229 | (20) |
|
Managing Your Data in Table Spaces |
|
|
230 | (1) |
|
Using the Create Table Space Wizard |
|
|
230 | (8) |
|
Allocating Additional Space |
|
|
238 | (2) |
|
|
240 | (2) |
|
Creating Table Spaces for Indexes and Large Data |
|
|
242 | (1) |
|
Creating Tables in Table Spaces |
|
|
243 | (3) |
|
|
246 | (1) |
|
|
246 | (1) |
|
|
246 | (1) |
|
|
247 | (2) |
|
|
247 | (1) |
|
|
248 | (1) |
|
|
249 | (20) |
|
Accessing Data Through the Control Center |
|
|
250 | (1) |
|
Accessing Data Through the Command Center |
|
|
251 | (4) |
|
Using the Command Line Processor |
|
|
255 | (1) |
|
|
255 | (1) |
|
Entering Commands in a Command Window |
|
|
256 | (1) |
|
Accessing Data Through Microsoft Access |
|
|
256 | (3) |
|
Accessing Data Through Java Applications |
|
|
259 | (3) |
|
|
260 | (1) |
|
Setting Up the Windows Java Environment |
|
|
261 | (1) |
|
|
261 | (1) |
|
Accessing Data Through WebSphere Application Server |
|
|
262 | (1) |
|
Accessing Data Through Your Own Applications |
|
|
262 | (3) |
|
Binding Database Utilities |
|
|
263 | (2) |
|
|
265 | (1) |
|
|
266 | (1) |
|
|
266 | (1) |
|
|
267 | (2) |
|
|
267 | (1) |
|
|
267 | (2) |
|
|
269 | (28) |
|
Data Manipulation Language |
|
|
270 | (17) |
|
|
270 | (1) |
|
|
271 | (2) |
|
|
273 | (1) |
|
|
274 | (1) |
|
Using Expressions to Calculate Values |
|
|
274 | (1) |
|
|
275 | (1) |
|
Selecting Data from More Than One Table (Join) |
|
|
275 | (1) |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
278 | (1) |
|
|
278 | (2) |
|
Combining Queries by Set Operators |
|
|
280 | (2) |
|
In, Between, Like, Exists, and Quantified Predicates |
|
|
282 | (3) |
|
|
285 | (1) |
|
|
285 | (1) |
|
|
285 | (1) |
|
|
286 | (1) |
|
How SQL Statements Are Invoked |
|
|
287 | (5) |
|
Embedding SQL into Applications |
|
|
288 | (3) |
|
Performance of Static Versus Dynamic SQL Statements |
|
|
291 | (1) |
|
Developing Windows Applications |
|
|
292 | (1) |
|
|
293 | (1) |
|
|
293 | (1) |
|
|
294 | (1) |
|
|
294 | (3) |
|
|
295 | (1) |
|
|
295 | (2) |
|
|
297 | (24) |
|
Object-Oriented SQL Concepts |
|
|
298 | (12) |
|
|
298 | (2) |
|
User-Defined Types (UDTs) |
|
|
300 | (1) |
|
|
301 | (4) |
|
Routines (Stored Procedures, UDFs, Methods) |
|
|
305 | (2) |
|
|
307 | (3) |
|
|
310 | (1) |
|
|
311 | (3) |
|
|
314 | (1) |
|
|
315 | (2) |
|
|
317 | (1) |
|
|
317 | (1) |
|
|
317 | (1) |
|
|
318 | (3) |
|
|
318 | (1) |
|
|
318 | (3) |
|
|
321 | (14) |
|
|
322 | (2) |
|
|
322 | (1) |
|
Separating Different Data Types |
|
|
322 | (1) |
|
|
323 | (1) |
|
Large Object Considerations |
|
|
323 | (1) |
|
General System Recommendations |
|
|
324 | (1) |
|
|
324 | (2) |
|
|
325 | (1) |
|
|
325 | (1) |
|
General SQL Recommendations |
|
|
325 | (1) |
|
|
326 | (4) |
|
|
327 | (2) |
|
General Concurrency Recommendations |
|
|
329 | (1) |
|
|
330 | (1) |
|
General Index Recommendations |
|
|
330 | (1) |
|
Complex Query Application Considerations |
|
|
331 | (1) |
|
|
331 | (1) |
|
|
332 | (1) |
|
|
332 | (1) |
|
|
333 | (2) |
|
|
333 | (1) |
|
|
333 | (2) |
|
|
335 | (190) |
|
Using System Administration Tools |
|
|
337 | (26) |
|
|
338 | (9) |
|
Creating a DB2 Command Script |
|
|
338 | (5) |
|
|
343 | (1) |
|
|
344 | (2) |
|
|
346 | (1) |
|
|
347 | (4) |
|
Viewing the Results of a Job |
|
|
348 | (3) |
|
Customizing Tools Settings |
|
|
351 | (3) |
|
Making Your Database More Useful |
|
|
354 | (3) |
|
|
354 | (3) |
|
|
357 | (1) |
|
|
358 | (1) |
|
|
358 | (1) |
|
|
359 | (1) |
|
|
360 | (1) |
|
|
360 | (1) |
|
|
360 | (3) |
|
|
361 | (1) |
|
|
361 | (2) |
|
|
363 | (28) |
|
|
364 | (6) |
|
|
370 | (6) |
|
|
371 | (5) |
|
|
376 | (1) |
|
|
376 | (9) |
|
Using the Restore Data Wizard |
|
|
377 | (8) |
|
|
385 | (2) |
|
|
387 | (1) |
|
|
387 | (1) |
|
|
387 | (2) |
|
|
389 | (2) |
|
|
389 | (1) |
|
|
389 | (2) |
|
|
391 | (30) |
|
|
392 | (4) |
|
Performing a Simple Export |
|
|
393 | (1) |
|
|
394 | (1) |
|
Exporting Large Objects (LOBs) |
|
|
395 | (1) |
|
Importing and Loading Data |
|
|
396 | (12) |
|
Importing Data from Files |
|
|
397 | (11) |
|
|
408 | (9) |
|
Setting Integrity Constraints |
|
|
415 | (2) |
|
|
417 | (1) |
|
|
417 | (1) |
|
|
418 | (1) |
|
|
418 | (3) |
|
|
419 | (1) |
|
|
419 | (2) |
|
|
421 | (30) |
|
|
421 | (3) |
|
Creating a Replication Environment |
|
|
424 | (25) |
|
Step 1: Create the Capture Control Tables |
|
|
424 | (4) |
|
Step 2: Register a Source Table |
|
|
428 | (2) |
|
Step 3: Create the Apply Control Tables |
|
|
430 | (3) |
|
Step 4: Create a Subscription Set |
|
|
433 | (8) |
|
Step 5: Start the Capture Program |
|
|
441 | (1) |
|
Step 6: Start the Apply Program |
|
|
442 | (2) |
|
|
444 | (5) |
|
|
449 | (1) |
|
|
449 | (1) |
|
|
449 | (1) |
|
|
450 | (1) |
|
|
450 | (1) |
|
|
450 | (1) |
|
Database Monitoring Tools |
|
|
451 | (26) |
|
|
452 | (1) |
|
|
453 | (8) |
|
|
455 | (5) |
|
|
460 | (1) |
|
|
461 | (7) |
|
Producing an Access Plan Graph |
|
|
462 | (3) |
|
Analyzing an Access Plan Graph |
|
|
465 | (3) |
|
|
468 | (3) |
|
|
471 | (2) |
|
|
473 | (1) |
|
|
474 | (1) |
|
|
474 | (1) |
|
|
474 | (1) |
|
|
475 | (2) |
|
|
475 | (1) |
|
|
475 | (2) |
|
Tuning DB2 Universal Database Performance |
|
|
477 | (30) |
|
Controlling Your DB2 Environment |
|
|
478 | (2) |
|
Controlling the DB2 Profile Registry |
|
|
478 | (1) |
|
DB2 Registry Values and Environment Variables |
|
|
479 | (1) |
|
|
480 | (5) |
|
Setting Database Manager Configuration Parameters on a Client Instance |
|
|
481 | (1) |
|
Setting Database Manager Configuration Parameters on a Server Instance |
|
|
482 | (1) |
|
Setting Database Configuration Parameters on a Server Instance |
|
|
483 | (2) |
|
Summary of Configuration Parameters Covered in This Book |
|
|
485 | (1) |
|
Using the Configuration Advisor |
|
|
485 | (7) |
|
|
492 | (7) |
|
|
499 | (4) |
|
|
499 | (1) |
|
|
500 | (1) |
|
Asynchronous Buffer Writer |
|
|
501 | (1) |
|
|
501 | (1) |
|
|
502 | (1) |
|
|
503 | (1) |
|
|
503 | (1) |
|
|
503 | (1) |
|
|
504 | (1) |
|
|
504 | (1) |
|
|
504 | (3) |
|
|
505 | (1) |
|
|
505 | (2) |
|
|
507 | (18) |
|
|
508 | (1) |
|
|
508 | (1) |
|
|
509 | (2) |
|
Administration Notification Log |
|
|
509 | (1) |
|
|
510 | (1) |
|
|
511 | (1) |
|
|
511 | (1) |
|
Database Analysis and Reporting Tool |
|
|
511 | (1) |
|
|
512 | (1) |
|
|
513 | (7) |
|
|
513 | (1) |
|
|
514 | (4) |
|
ODBC Driver Manager Trace |
|
|
518 | (1) |
|
|
518 | (2) |
|
|
520 | (1) |
|
|
521 | (1) |
|
|
521 | (1) |
|
|
521 | (1) |
|
|
522 | (3) |
|
|
522 | (1) |
|
|
522 | (3) |
|
Appendix A Getting Certified |
|
|
525 | (8) |
|
|
525 | (1) |
|
Benefits of Becoming Certified |
|
|
526 | (1) |
|
Am I Ready to Take the Exam? |
|
|
527 | (1) |
|
Taking a Certification Exam |
|
|
528 | (1) |
|
IBM Certified Database Associate DB2 UDB V8.1 Family Fundamentals |
|
|
529 | (2) |
|
Certification Requirements |
|
|
529 | (1) |
|
Exam Objectives for Exam 700, DB2 UDB V8.1 Family Fundamentals |
|
|
529 | (2) |
|
|
531 | (2) |
|
Database Administrator Role |
|
|
531 | (1) |
|
|
531 | (1) |
|
Application Developer Role |
|
|
531 | (2) |
|
Appendix B Answers to Quiz Questions |
|
|
533 | (18) |
|
|
533 | (2) |
|
|
535 | (1) |
|
|
536 | (1) |
|
|
537 | (1) |
|
|
537 | (2) |
|
|
539 | (1) |
|
|
539 | (1) |
|
|
540 | (1) |
|
|
541 | (1) |
|
|
542 | (1) |
|
|
542 | (1) |
|
|
543 | (1) |
|
|
544 | (1) |
|
|
545 | (1) |
|
|
546 | (1) |
|
|
547 | (1) |
|
|
547 | (1) |
|
|
548 | (1) |
|
|
548 | (1) |
|
|
549 | (1) |
|
|
549 | (2) |
Index |
|
551 | |