+ All Categories
Home > Documents > Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016....

Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016....

Date post: 28-Feb-2021
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
32
Index A Accelerator-only tables, 71–72 ACCESS, 556 Access control, 4, 5, 33, 305–310 advisory or restrictive states for, 266, 270 auditing and, 325 authentication and, 305, 307 column masks, 320–321 communication database, 307 concurrent access and, 400 CONNECT and, 305, 307 data, 307 establishing, 321 Kerberos security and, 306–307 loading, 400 local DB2 access and, 305 objects, using authorities and privileges, 308 RACF in, 305, 306 remote DB2 access and, 305–306 row and column, 318–321 row permissions in, 319–320 Security Server in, 305, 306 workstations, 307 Access paths, 4, 525–547, 553, 558 access path compare (APCOMPARE) in, 532–533 access path reuse (APREUSE) in, 532–533 BIND QUERY in, 527 binding into separate collections, 550 capturing reoptimized, 534–535 change management for, 531–533 EXPLAIN and, 534–535, 536–547 indexes, influencing access to, 530–531 influencing selection of, 526–530 management of, 528 parameter markers and literal value replacement in, 535 performance, 525–547 plan stability and, 549 regression, 549 reoptimization of, 533–535 selectivity overrides and, 529–530 statement cache and, 547–550. See also Cache statistics, RUNSTATS and, resetting, 450–451 ACCESSCTRL, 310, 312–313 Accidently dropped objects, recovery of, 376–377 Accounting reports, 512 Accounting trace, 501–505, 552, 555 Active logs, 27, 36, 39 Active threads, 288 Address spaces, 11–14, 35, 37 database services and, 12 distributed data facility and, 13 Exam 610–DB2 10.1 Fundamentals, sections and objectives, 5–6 internal resource lock manager (IRLM) and, 13, 32 system services and, 12 work load manager (WLM)–established, 13–14 Administrative authorities, 304, 309 separating, 312 Administrative task scheduler, 260–261, 262 Advanced Database Management Facility (ADMF), 12 Advisory states, 3, 266 displaying, DISPLAY DATABASE and, 270–272 After triggers, 98 Agent services manager, 12 Aggregate functions, 186, 196
Transcript
Page 1: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index

AAccelerator-only tables, 71–72ACCESS, 556Access control, 4, 5, 33, 305–310

advisory or restrictive states for, 266, 270auditing and, 325authentication and, 305, 307column masks, 320–321communication database, 307concurrent access and, 400CONNECT and, 305, 307data, 307establishing, 321Kerberos security and, 306–307loading, 400local DB2 access and, 305objects, using authorities and privileges, 308RACF in, 305, 306remote DB2 access and, 305–306row and column, 318–321row permissions in, 319–320Security Server in, 305, 306workstations, 307

Access paths, 4, 525–547, 553, 558access path compare (APCOMPARE) in, 532–533access path reuse (APREUSE) in, 532–533BIND QUERY in, 527binding into separate collections, 550capturing reoptimized, 534–535change management for, 531–533EXPLAIN and, 534–535, 536–547indexes, influencing access to, 530–531influencing selection of, 526–530

management of, 528parameter markers and literal value replacement in, 535performance, 525–547plan stability and, 549regression, 549reoptimization of, 533–535selectivity overrides and, 529–530statement cache and, 547–550. See also Cachestatistics, RUNSTATS and, resetting, 450–451

ACCESSCTRL, 310, 312–313Accidently dropped objects, recovery of, 376–377Accounting reports, 512Accounting trace, 501–505, 552, 555Active logs, 27, 36, 39Active threads, 288Address spaces, 11–14, 35, 37

database services and, 12distributed data facility and, 13Exam 610–DB2 10.1 Fundamentals, sections and

objectives, 5–6internal resource lock manager (IRLM) and, 13, 32system services and, 12work load manager (WLM)–established, 13–14

Administrative authorities, 304, 309separating, 312

Administrative task scheduler, 260–261, 262Advanced Database Management Facility (ADMF), 12Advisory states, 3, 266

displaying, DISPLAY DATABASE and, 270–272After triggers, 98Agent services manager, 12Aggregate functions, 186, 196

Page 2: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

560 Index

Aliases, authorities and privileges, 316ALL, 164, 183Allied threads, 287, 288ALTER, 31, 115–129, 242, 264, 316, 318, 327

index versions and, 128–129invalidations caused by, 128issues with, 127–129RECOVER and, 371REORG and, 420

ALTER DATABASE, 48, 115–116ALTER FUNCTION, 199, 234ALTER INDEX, 102, 125ALTER PROCEDURE, 194–195, 234ALTER STOGROUP, 116–117ALTER TABLE, 71, 77, 78, 120–124

access control and, 321archive-enabled tables and, 208check constraints and, 97referential constraints and, 95

ALTER TABLESPACE, 54, 117–120, 131–136Altering structures, 115–129ALWAYS, 91ANY, 164ANY locks, 66–67APCOMPARE, 532–533APPC, 8APPEND, 121Application development, environments, 189Application period temporal table, 204Application plan privileges, 304Application plans, 143Application processes, 23, 141–143

application plans in, 143locking and concurrency in, 141packages in, 143rolling back work in, 142savepoints in, 142–143unit of recovery in, 142unit of work in, 141–142

Application program preparation, 222–230binding and rebinding in, 222, 223–230. See also

Binding and rebinding, 223compiling and, 222load modules in, 222packages in, 222

precompiling and, 222, 223Application programming, 139–141

SQL in, 139–141Application servers, 294Application-period temporal tables, 78Applications and database functionality, 139–254

application processes in, 141–143application program preparation and, 222–230application programming in, 139–141DRDA access in, 237–240environments for, 189SQL in, 143–247. See also SQL

APREUSE, 532–533Architecture for z/OS, 7–10Archive log, 27Archive tables, 71, 72, 207Archive transparency, 211Archive-enabled tables, 71, 72, 184, 207–213

archive transparency and, 211creating, ALTER TABLE and ENABLE ARCHIVE in,

208disabling, 212–213dynamic transaction and, 211querying, SELECT and, 210–211row deletion from, DELETE and, 210row insertion into, INSERT and, 209static application with, 211–212triggers and, 208

Archiving, recovery, 347Array types, 176, 248, 252

associative, 178–179MAX_CARDINALITY in, 177null, 179–180ordinary array in, 177–178values in, 179–180

Array variables, 185–186Arrays, 248, 251

associative, 252AS, 150–151AS IDENTITY, 91ASC/DESC, 101–102ASCII, 87, 133, 138, 394Assembler, 181, 189Associative arrays, 178–179, 252Asterisk (*), SELECT, 145–146

Page 3: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 561

Attachment facilities, 15–19, 37, 40call attachment facility (CAF) and, 18CICS, 16, 262DB2 Interactive (DB2I) and, 18distributed data facility (DDF), 19DSN command processor for, 17IMS, 17Resource Recovery Services (RRS) and, 18TSO, 17universal language interface (DSNULI) and, 18

Attributes, 42data type, 43

AUDIT, 121Audit trace, 507. See also AuditingAuditing, 4, 325–329, 384, 385, 389, 390

access and, 325classes and events in trace for, 327GRANT and, 326Kerberos and, 326policies for, 329REVOKE and, 326specific IDs and roles, 328starting/stopping trace, 328tables, 328–329trace in, 326–328

Authentication, 305, 307Authorization IDs, primary and secondary, 303–304Authorization/authorities and privileges, 5, 33, 249, 253,

303access control and, 305–310ACCESSCTRL, 310, 312–313administrative authorities in, 304, 309, 312aliases, 316application plan privileges in, 304auditing. See Auditingauthorization IDs in, primary and secondary, 303–304cascade revoke in, 311column masks and, 320–321CURRENT SQLID in, 304DATAACCESS, 310database, 315DBADM, 309, 310, 312–313, 315DBCTRL, 309, 315DBMAINT, 309, 310DEPENDENT PRIVILEGES and, 311distinct types, 316explicit, 308–309

global variables and, 183GRANT in, 308, 310–312implicit, 308, 313indexes, 316JARs, 316object access, 308object ownership and, 313–318object privileges in, 304PACKADM, 310package, 304, 316plan execution, 318plans, 316PUBLIC keyword and, 311REVOKE in, 308, 310–312roles and, 305, 316, 322–323row permissions, 319–320SECADM, 310, 312–313, 319, 320security labels in, 305separating admin authorities in, SEPARATE

SECURITY for, 312sequences, 316SQLADM, 310storage group, 315stored procedures, 317SYSADM, 309, 312–313, 320SYSCTRL, 309, 312–313SYSOPR, 309table spaces, 316tables, 316trusted connections in, 321–324trusted contexts in, 305, 316, 321–324user-defined functions, 317variables, 317views, 316WITH GRANT option in, 312

AUTO BIND, 228–230Automated statistics collection, 454–456, 524–525Automatic queries, MQT, 213–215Automatic Restart Manager (ARM), 26, 301Autonomic statistics, 454–456, 524–525Autonomous procedure, 192Auxiliary index, 103, 103Auxiliary table spaces, 56–57Auxiliary tables, 71, 72–73, 112Auxiliary warning status, 266–267AVG, 186

Page 4: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

562 Index

BBACKOUT, LIMIT/DURATION, 352BACKUP SYSTEM, 337, 340, 348, 363–366, 378Backup, recovery, restart, 3, 33–34, 329–381, 383

accidently dropped objects, 376–377archiving and, 347automatic restart manager (ARM) in, 301availability during, 346BACKOUT in, LIMIT/DURATION, 352BACKUP SYSTEM in, 337, 348, 363–366, 378bootstrap data set (BSDS) in, 333–334, 350CHECK DATA in, 343checkpoint intervals in, 283–284clone tables, 377COMMIT and, 344concurrent copies and, using DFSMS, 361conditional restart in, 281–282, 374conditional restart control record (CRCR) for, 281–282coordinated updates and, 345COPY in, 330, 334–335, 348, 349, 355, 359–361, 372copy pools in, 363COPYTOCOPY in, 335, 348, 360coupling facility failure, 379CRESTART in, 282DASD failure and, 379data checks, 343data consistency in, 344data set copies and, 359–360data sets in, 330, 357–360data sharing and, 378–381data sharing group termination and, 282–283data-only system backups in, 364DB2 catalog and directory, 374–375DB2 failure and, 379DFSMShsm in, 337, 338, 350DIAGNOSE in, 339disaster recovery and, 347, 352–353, 372–374distributed data and, 348–349documentation for, 330DSN1COMP, 360DSN1COPY in, 340–341, 360DSN1LOGP in, 341DSN1PRNT in, 341–342, 360DSNJCNVB in, 342DSNJCNVT in, 342DSNJLOGF in, 339DSNJU003 utility and, 282, 339

DSNJU004 in, 339–340dual operations in, 330duplexing and, 381FlashCopy function in, 360–361, 363, 365, 372, 404,

427–428, 441, 445full system backup in, 364–365group buffer pool and, 380inconsistency and, recovery from, 353–356indexes in, 330, 349, 371, 375–376INDOUBT threads and, 286information on, 350LOAD in, 335, 350, 360, 361, 365, 368, 372lock structures and, 380logs and logging in, 331–333, 346, 378–379MERGECOPY in, 348, 335, 336–337MODIFY, 351–352NOT LOGGED tables and, 282, 376page copies and, 359–360pages in, 330, 357–360parallel recoveries in, 356–357partitions in, 330plans for, 348point in time (PIT), 362–368points of consistency in, systemwide, 353postponed units of recovery in, 284–285procedures for, 330–331, 348QUIESCE in, 335–336, 348, 350, 354, 363REBUILD in, 365REBUILD INDEX in, 337, 349, 350, 360RECOVER in, 337, 345, 348, 349, 353–358, 360,

365–366, 369, 371, 375–376RECOVER, options for, 366–368RECOVER pending status in, 282RECOVER TOCOPY, 350RECOVER TOLOGPOINT, 350recovery process in, 345–347remote sites in, 331REORG in, 330, 335, 350, 361, 363, 365, 368, 372REORG INDEX, 360REORG TABLESPACE, 360REPAIR in, 338REPLACE, 368, 372REPORT in, 337, 348, 351, 355restarting DB2 in, 281, 342–343, 346RESTORE SYSTEM in, 338, 348, 364, 378ROLLBACK and, 344savepoints and, 344

Page 5: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 563

SCA structure and, 380scheduling backups and data checks for, 343SET LOG SUSPEND/RESUME, 283standalone utilities for, 339–342structure failure and, 380SYSIBM. SYSLGRNX, 350SYSIBM.SYSCOPY, 350system-level backups for object-level recoveries in,

361–366system-wide, 378table spaces and, 330, 368–370, 375–376, 383, 388temporal tables, 377–378TERM UTILITY in, 355–356TOCOPY in, 362unit of recovery in, 142, 284–285UNLOAD in, 335utilities for, 334–342, 346, 348, 355–356viewing threads affected by failure in, 285–287

Base table space, 57Base tables, 71, 73Batch, 11, 14, 15, 287Before triggers, 98BETWEEN, 521BIGINT, 44, 88, 91BINARY, 43, 86BIND/REBIND, 4, 31, 226, 227, 250, 317, 318, 324, 522,

551, 555. See also Binding and rebindingBIND PACKAGE, 226, 234, 237BIND PLAN, 224, 234, 238BIND QUERY, 527, 553BINDAGENT, 317Binding and rebinding, 30, 143, 222, 223–230. See also

BIND/REBIND, aboveautomatic rebinding, AUTO BIND and, 228–230, 228BIND (ADD/REPLACE) and, 226BIND PACKAGE and, 226, 234, 237 BIND PLAN and, 224, 234, 238collections and, 224, 225CONNECT and, 237, 240–241DBRMs and, 223, 226DISCONNECT and, 241distributed applications and, 236DRDA access and, 237–240freeing a plan or package in, 225isolation levels and, 235–236package lists, PKLIST and, 227–228

packages and, 224, 227plan stability and, PLANMGMT and, 230plans and, 224precompiling, 237REBIND and, 227RUNSTATS and, 227SQL and, 237static, 224statistics collection and, 525trigger packages and, 228versioning in, 225

Bitemporal tables, 78–79, 204–205BLOB, 44, 86, 89Bootstrap data set (BSDS), 27–28, 36, 39, 281, 333–334,

339, 340, 350Buffer manager, 12Buffer pools, 28–29, 36, 39, 48, 131, 135

DISPLAY BUFFER POOL in, 483group, in data sharing, 297–298, 299I/O management and, 495performance and, 481, 482RECOVER pending status in, 268recovery and, 380write operations and thresholds in, 494–495

BUFFERPOOL, 58, 115Built-in functions, 196Business rules, 42

CC or C++, 181, 189Cache and caching, 10, 28–30, 495, 547–550, 554, 558

access path regression and, 549externalizing stats for, 547–549global dynamic SQL cache and, 485–486invalidating statements in dynamic statement cache in,

486–487local dynamic SQL cache in, 487plan stability and, 549setting up table for, 547

CACHE, 137CACHERAC, 200CALL, 223, 244Call Attachment Facility (CAF), 16, 18, 287Call-Level Interface (CLI), 144, 145CANCEL, 383

Page 6: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

564 Index

CANCEL SHRLEVEL, 387Cardinality stats, 520CASCADE, 96, 327Cascade revoke, 311CASE, 320CAST, 166–169

functions using, 196Catalogs,

COPY and copies in, 460DB2, 22indexes and, 108recovery and, 374–375REORG and, 435–436statistics, RUNSTATS and, 447, 453

CCSID, 87, 340loading, 394

Channels, 495CHAR, 43, 121CHARACTER, 86CHECK, 266, 267, 368Check constraints, 21, 95, 97, 130, 134CHECK DATA, 275, 276, 343, 355, 474

referential constraints and, 96CHECK INDEX, 275, 276, 355CHECK LOB, 275, 276CHECK-pending, 266, 267, 469CHECKING, 329Checking data utilities, 275, 276Checkpoint intervals, 283–284CICS, 8, 11, 14, 15, 16, 262, 263, 287, 307, 345, 478, 509,

510attachment facility for, 16–17

CLIST, installation/migration, 256CLOB, 43, 86, 89Clone tables, 71, 73–74, 377CLUSTER/NOT CLUSTER, 115, 125Clustering, 9

reclustering and REORG in, 433“well-clustered” defined, 466

Clustering index, 103, 105–106CMTSTAT, 200COBOL, 24, 181, 189Collections, binding/rebinding, 224, 225Column masks, 320–321Columns, 67–68, 136

access control in, 318–321adding/dropping, 133, 138derived, 148dropping, 123generated column types, 403hidden, 161index, adding, 125–126loading, 395–396loading, default values, 395LOB, 396masks for, 320–321null values and, 94renaming, 123–124SELECT and, 146–147transaction start ID and, 93–94XML, 395–396

commands, 3, 31–33, 262–266COMMANDS, 31COMMENT, 175, 242COMMENT ON, 316, 318COMMIT, 115, 141, 142, 183, 192, 231, 233, 244, 316,

327recovery and, 344SQL procedures and, 193table spaces and, 122threads and, 289–290

Common table expressions, 215–219Communications, 8Communications database (CDB), 23, 296

access to, 307Communications protocols, 295–296Comparison operators, SELECT, 147Compiling, 222COMPRESS/NOT COMPRESS, 58, 64–65, 125Compressed index, 103, 106Compression, hardware, 10Compression, data, 64–65Compression dictionary, REORG, 435Compression statistics, 448–449, 471, 476CONCAT, 186Concurrency, 6, 141, 230–237, 386. See also Locks and

locking, 230application design recommendations for, 231COMMIT and, 231CONCURRENT ACCESS RESOLUTION and, 234coordinated updates and, 345

Page 7: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 565

currently committed data and, 233–234data consistency and, 344LOCK TABLE and, 232–233recovery and, 344restricted system of DB2 in, 242ROLLBACK and, 231SKIP LOCKED DATA and, 233two-phase commit and, 241–242update coordination and, 241–242

Concurrent access, 400CONCURRENT ACCESS RESOLUTION, 234Concurrent copies, using DFSMS, 361Conditional restart, 281–282, 374Conditional restart control record (CRCR), 281–282, 339CONNECT, 237, 240–241, 253, 305, 307

CURRENT SERVER register and, 243programming considerations and, 243servers and, 243SQLRULES and, 243–244

Connections, connectivity, and CONNECT, 385, 389communications database in, 296communications protocols in, 295–296CURRENT SERVER register and, 243managing, 287programming considerations and, 243queuing, with threads, 292servers and, 243SQLRULES and, 243–244trusted connections in, 321–324

Consistency, points of, 142Constraints, 21, 42, 94–97

after, 98before, 98CASCADE in, 96check, 95, 97, 130, 134delete rule for, 96informational referential, 96insert rule for, 96instead of, 98–99NO ACTION in, 96Referential, 95–97RESTRICT in, 96–97SET NULL in, 96unique, 94, 95, 388update rule for, 96

CONTEXT, 329

Continuous performance monitoring, 509–510Control interval (CI) processing, 392Conversion mode/mode* migration, 257Converting to DB2 11, 256Coordinated updates, 345Copies/copying, 391, 392, 456, 470. See also Backup,

recovery, restartaccess during, 458catalogs, 460concurrent copies and, using DFSMS, 361COPY and, 456. See COPYCOPY-pending status and, 457data sets, 458data, 456directories, 460DSN1COPY in, 461FlashCopy function in, 360–361, 372, 404, 427–428,

441, 445indexes, 456, 460inline copies and, 404multiple image copies in, 458partition-by-growth table spaces and, 459partitions, 458RECOVER, 457REORG and, 426–427SHRLEVEL and, 458–459table spaces and, 459VSAM and, 461XML table spaces and, 459–460

COPY, 275, 330, 334–335, 348, 349, 355, 359–360, 361, 372, 404

statistics, RUNSTATS and, 462COPY-pending status, 267

informational, 268Copy pools, 363COPYTOCOPY, 275, 335, 348, 360, 472Correlated subqueries, 162, 165–166

names in, 166UPDATE and, 166–167

Cost estimation using EXPLAIN, 546–547Couple data sets, 299Coupling facilities (CF), 297–301

Parallel Sysplex and, 20recovery and, 379

Coupling facility control code (CFCC), 297Coupling facility resource management (CFRM), 299–300

Page 8: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

566 Index

CPU performance, 479, 480CRCR. See conditional restart control record (CRCR) CREATE, 45, 115, 242, 316, 318, 327

object ownership and, 313qualified objects and, 315unqualified objects and, 314

CREATE DATABASE, 47–48CREATE FUNCTION, 185, 187, 196, 197, 199, 234CREATE INDEX, 67, 99–101

large objects (LOB) and, 113table spaces and, partitioning, 59

CREATE PROCEDURE, 185, 190, 191, 194, 200, 234CREATE STOGROUP, 46CREATE TABLE, 47, 49, 68–71, 81–82, 196, 203–204,

316check constraints and, 97large objects (LOB) and, 113referential constraints and, 95

CREATE TABLESPACE, 49, 50–53, 54, 130large objects (LOB) and, 113

CREATE TRIGGER, 98, 228CREATE TYPE, 175, 176CREATE VIEW, 110–111, 124, 174, 327

common table expressions in, 215SELECT and, AS clause and, 150–151

Created global temporary tables, 79–80, 201CRESTART, 282Cross Loader, 407–409, 468, 472Cross System Coupling Facility (XCF), 265Cross System Extended (XES), 301CTHREAD, 389CURRENT, 112CURRENT PACKAGESET, 225CURRENT SQLID, 304, 327Cursor stability (CS), 235–236Cursors, 169–171

declaring, 170DELETE and, 169, 170FETCH and, 170nonscrollable, 170scrollable, 170skeleton cursor tables (SKCT) in, 483stability in, 169types of, 170UPDATE and, 169, 170

WITH RETURN and, 170Customer Information Control System (CICS). See CICS

DDASD, recovery, 379Data access, 307–308. See also Access controlData checks, 343Data Communications Resource Manager (DCRM), 13Data compression, 64–65

table spaces and, 64–65Data consistency

inconsistency vs., recovery from, 353–356points of, systemwide, 353

Data Control Language (DCL), 310Data Definition Language (DDL), 5, 45Data dictionaries, 42Data Facility Storage Management Subsystem (DFSMS),

26Data integrity, 3, 21, 94–99. See also Constraints; TriggersData management, 391–476

utilities for, 274–275Data Manager, 12Data Manager Threshold (DMTH), 494Data organization, 417–445, 513–525. See also REORG

copies/copying in, 456DSNACCOX and, 514, 517index reorganization and, 514LOB tables and, 417performance:, 514REBUILD INDEX and, 442–445REORG and, 514, 517REORG INDEX in, 438–442REORG TABLESPACE in, 417–438SHRLEVEL in, 417, 420–422statistics and, 445–456, 461–466, 516–525. See also

Statistics and RUNSTATSSTOSPACE utility in, 456table space reorganization, determining when, 515–516

Data sets, 388, 490–491bootstrap, 333–334COPY and copies in, 458copying, 359–360definitions of, changing with REORG, 425distributed, for I/O, 495, 496extent of, in I/O, 497–498

Page 9: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 567

I/O management and, 497–498I/O management and, distributed, 495, 496I/O management and, fast devices for, 496management of, 33open, 490–491performance, 490–491recovery and, 330, 357–360

Data sharing, 4, 35, 38, 297–302, 385automatic restart manager (ARM) in, 301benefits of, 21components of, 297couple data sets in, 299Coupling Facility (CF) for, 297–301Coupling Facility Control Code (CFCC) in, 297Coupling Facility Resource Management (CFRM) in,

299–300Cross System Extended (XES) in, 301Group Buffer Pool (GBP) in, 297–298, 299groups for, 20list structure in, 298lock structure in, 298–299log record sequence numbers (LRSNs) and, 301nonshared objects in, 302Parallel Sysplex and, 297. See also Parallel Sysplexpolicies in, 299recovery and, 378–381restart/recovery after termination of, 282–283Shared Communications Area (SCA) in, 297, 298Shared Data Architecture (SDA) in, 297shared data in, 302Sysplex Failure Management (SFM) policy in, 300–301Sysplex Timer in, 301

Data space manager, 12Data structures, 21Data Studio, 25Data System Control Facility (DSCF), 12Data types, 6, 85–94, 121, 132, 174–180

array, 176, 179–180associative arrays in, 178–179attributes and, 43CAST and, 167–169CCSID character set in, 87creating, CREATE TYPE and, 175, 176date/time, 86, 88–89distinct, 90, 175–176generated column types in, 90–91IBM-supplied, 85

identity columns in, 91large object, 86, 89null arrays and, 179–180null values and, 94numeric, 85, 87–88ordinary arrays and, 177–178ROW BEGIN/END, 93row change timestamp and, 92ROWID, 92–93, 112string, 85, 86–87tables and, 121transaction start ID, 93–94user-defined, 175UTF8 and UTF16 in, 87values in, sources of, 174–175, 179–180XML, 90, 188–189

DATAACCESS, 310Database Access Threads (DBATs), 287, 290, 385, 390

allocation/deallocation in, 292queuing connections with, 292timing out, 291

Database Descriptors (DBD), 22Database design and implementation, 41–138. See also

Databasesaltering structures in, 115–129data integrity and, 94data structures in, 67–85. See also Tablesdata types for attributes in, 43data types in, 85–94. See also Data typesentity relationships in, 42hash spaces in, 67index spaces in, 67indexes in, 99–110large object support and, 112–114logical data modeling in, 42–44normalization in, 43physical data modeling, 44–45schemas and, 111–112structure creation in, 45–67tables in, 67–85. See also Tablesviews in, 110–111XML and, 114–115

Database services, 12Database Services Address Space (DSAS), 12Databases, 6, 21, 47–48. See also Database design and

implementationauthorities and privileges for, 315

Page 10: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

568 Index

changing, ALTER DATABASE and, 48, 115–116creating, CREATE DATABASE and 47–48removing, DROP DATABASE and, 48stopping, STOP DATABASE and, 272–273

DATE, 44, 88, 186Date/time data, 44, 86, 88–89, 185

formats for, 89, 185row change timestamp and, 92temporal tables and, 205–207unique business time index and, 104

DB2, 8DB2 catalog, 22

recovery and, 374–375statistics, RUNSTATS and, 453

DB2 commands, 262, 263–265DB2 directory, 22, 37, 40

recovery and, 374–375DB2 failure and recovery, 379DB2 Interactive (DB2I), 31, 259, 263

attachment facilities and, 18utilities and, 279

DB2 monitoring. See MonitoringDB2 ODBC, 189DB2 Query Management Facility (DB2QMF), SELECT,

145DB2 traces, 500DBADM, 309, 310, 312–313, 315DBADMIN, 329DBAT. See Database Access Threads (DBATs)DBCLOB, 43, 86, 89DBCTRL, 309, 315DBD01, 22DBETE status, 267DBMAINT, 309, 310DBRMs, 223

binding/rebinding and, 223, 226DCLGEN, 31, 223, 259DDF. See Distributed Data Facility (DDF)Deadlock, 254DECFLOAT, 44, 88DECIMAL, 88, 91, 121, 168DECIMAL(p,s), 44DECLARE, 185DECLARE CURSOR, 144DECLARE TABLE, 223

Declared global temporary tables, 80, 201, 202CONNECT and, 240

DEFAULT, 31, 91Deferred embedded SQL, 144DELETE, 6, 23, 42, 136, 171, 173, 203, 242, 327, 386,

499archive-enabled tables and, 210correlated subqueries and, 167cost estimation using EXPLAIN, 546–547cursors and, 169, 170declared global temporary tables and, 202referential constraints and, 96triggers and, 97views and, 111, 174WHERE and, 173

Delete rule, for constraints, 96Delimited files, loading, 394Delimited unloads, 112–113DEPENDENT PRIVILEGES, 311Derived columns, SELECT, 148DESCRIBE, 144Detailed performance monitoring, 510–511Deterministic procedure, 192DFSMS, 15, 361DFSMShsm, 337, 338, 350DIAGNOSE, 339Dictionary, compression, and REORG, 435Direct row access, 542Directories

COPY and copies in, 460DB2, 22, 37, 40recovery and, 374–375REORG and, 435–436

Disaster recovery, 347, 352–353, 372–374. See also Backup, recovery, restart

DISCONNECT, 241, 244Disk arrays, 495DISPLAY, 31, 264DISPLAY BUFFER POOL, 483DISPLAY DATABASE, 266, 270–272, 391, 513DISPLAY LOG, 340DISPLAY THREAD, 293–294DISPLAY TRACE, 328, 508DISPLAY UTILITY, 280–281DISTINCT, 150

Page 11: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 569

Distinct data type, 90, 175–176authorities and privileges for, 316

DISTINCT FROM, 148Distributed access, 5Distributed applications

binding/rebinding and, 236distributed database access threads (DBATs) and,

245–247MODIFY and, 246–247pooled thread in, 245RELEASE(DEALLOCATE) and, 245–246tuning of, guidelines for, 244–245

Distributed data, 294–296. See also Data sharingapplication servers and, 294communications database in, 296communications protocols in, 295–296distributed data facility and, 294DRDA and, 294–295RDBNAM and, 296recovery and, 348–349SNA and, 295, 296TCP/IP and, 295, 296VTAM and, 296

Distributed Data Facility (DDF), 5, 11, 13, 19, 33, 37, 40, 294, 303

Distributed Data Interchange Services (DDIS), 13Distributed Database Access Threads (DBATs), 245–247Distributed environments, 477Distributed Relational Data System Manager (DRDS), 13Distributed Relational Database Architecture (DRDA), 13,

19, 191, 237–240, 250, 294–295, 345BIND PACKAGE options and, 237BIND PLAN options in, 238CONNECT in, 237precompiler options in, 237remote queries and OPTIMIZE in, 243–244SQL and, 237three-part names and, 239–240, 239

Distributed Transaction Manager (DTM), 12–13Distribution statistics, 448, 521DL/I, 18Document ID index, 114Documentation for recovery, 330DOUBLE, 44, 88, 121DPSI access, 542

DRDA. See Distributed Relational Database Architecture (DRDA)

DROP, 115, 175, 242, 318, 327DROP DATABASE, 48DROP PACKAGE, 225DROP TABLE, 430DROP TABLESPACE, 285DROP VIEW, 124DSN, 263DSN commands/subcommands, 262, 263DSN command processor, attachment facilities, 17DSN1COMP, 360DSN1COPY, 340–341, 360, 415, 461, 470, 475DSN1LOGP, 341DSN1PRNT, 341–342, 360DSNACCOX, 439, 462, 464–465, 514, 517, 557DSNJCNVB, 342DSNJCNVT, 342DSNJLOGF, 339DSNJU003 utility, 282, 339DSNJU004, 339–340DSNPARMS, 261–262DSNTEP2, 260DSNTEP4, 260DSNTIAD, 260DSNTIAUL, 259–260, 393, 409–411DSNTRACE, 200DSNU utilities, 279DSNUTILU, 276, 279DSNZPARMs, 4, 5DSSIZ, 58Dual operations, recovery, 330Duplexing, 381Dynamic prefetch, 491–492Dynamic SQL, 24–25, 36, 40, 144

global dynamic SQL cache and, 485–486host variables in, 181performance:, 477

Dynamic statement cache. See CacheDynamic transactions, archive-enabled tables, 211

EEA-enabled partitioning, 61. See also Extended

addressability

Page 12: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

570 Index

EBCDIC, 87, 133, 138, 394ECSA, 481EDM pool, 28–29

efficiency of, statistics for, 484–485global dynamic SQL cache and, 485–486invalidating statements in dynamic statement cache in,

486–487local dynamic SQL cache in, 487performance, 481, 483–487stolen pages in, 484threads and, 289

Elapsed time, 504Embedded SQL, 144, 189Empty tables, 71, 74Enabling new function mode/mode*, 258Encoding, 3, 133, 138Encryption, 6

Kerberos, 306–307ENDING AT partition, 83Enterprise Storage Server (ESS), 9Entities, 42

relationships in, 42Environment for DB2 z/OS, 11–34Environment management, 30, 255–390Environmental Descriptor Manager. See EDM poolEnvironments for application development, 189Equal unique indexes, 541Exam 312 sections and objectives, 2–4Exam 320 sections and objectives, 4–5Exam 610–DB2 10.1 Fundamentals, sections and

objectives, 5–6EXCEPT, 153, 154Exception monitoring, 511EXEC, 223EXEC SQL, 274, 276, 393, 407–408EXECUTE, 144, 329EXISTS, 164–165EXIT, 31EXPLAIN, 477, 511–512, 522, 536–547, 553, 555, 557

access paths and, 534–535, 536–547cost estimation using, 546–547direct row access and, 542DPSI access and, 542equal unique index, 541EXPLAIN tables for, 536–538

hash access in, 539in-list access and, 541–542index access in, 539index-only access and, 541indexes, matching, 539indexes, multiple, access to, 540indexes, nonmatching, 540indexes, screening, 539–540joins and, 543–544locking, 544one-fetch index access and, 540–541page range screening in, 542parallel access and, 542performance and, 536–547PLAN_TABLE and, 538–546predicate performance and, 544–546prefetch access and, 542–543range-list index scan, 541sorting and, 543table space scans in, 539

Explicit privileges, 308–309Expression-based index, 103, 106Expressions

common table, 215–219GROUP BY and, 156XML, 188

Extended addressability (EA) partitioning, 61Extensible Markup Language. See XMLExternal SQL procedure, 192External stored procedures, 190Externalized statistics, 462–463, 469, 473, 522

FFeedback from stats, 522–524FETCH, 245

cursors and, 170FICON channels, 10, 495File reference variables, 182FlashCopy, 360–361, 363, 365, 372, 404, 427–428, 441,

445, 475, 495FLOAT, 121, 168FLOAT8, 121Floating–point numbers, 44FOR UPDATE, 161FORCE, 281

Page 13: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 571

Foreign keys, 45, 110Formats for date/time/timestamps, 89Fortran, 181FREE, 31, 225Free space, loading and assigning, 404FREEPAGE, 58, 63–64, 404Freezing DB2 activity, 283Frequency (distribution) stats, 521FROM, 159

aggregate functions and, 186recursion and common table expressions with, 216

Functions, 186–187, 195–201aggregate, 186, 196built in, 196CAST, 196defining, CREATE FUNCTION and, 196, 197, 199performance considerations for, 199–201scalar, 186–187, 196, 197–198sourced, 199SQL procedural language and, 195table, 196, 198–199user-defined, 187, 196–197

GGBPCACHE, 58, 115General command processor, 12Generalized Trace Facility (GTF), 500GENERATED, 90–91Generated column types, 90–91

loading, 403Global dynamic SQL cache, 485–486Global trace, 508Global variables, 5, 182–185, 248, 251, 253

privileges for, 183scope of, 183triggers and, 183

Governor (resource limit facility), 499–500GRANT, 175, 242, 303, 308, 310–312, 318, 326, 327GRAPHIC, 43, 86, 121GRECP, 268GROUP, 6Group Buffer Pool (GBP), 297–298, 299

RECOVER-pending status, 268recovery and, 380

GROUP BY, 155–156, 159, 521aggregate functions and, 186expressions and, 156HAVING and, 156

Group manager, 12

HHard Disk Drives (HHD), 9Hard limit to logs, 332–333Hardware compression, 10Hash access, 3, 45, 130, 134, 219–220, 249, 252

EXPLAIN and, 539Hash-organized table spaces, 67, 432Hash-organized tables, 71, 74–76, 220Hash spaces, 67, 432HAVING, 156, 159, 521

aggregate functions and, 186subqueries with SELECT and, 162–167

Health checks, 3Hidden columns, SELECT, 161High availability, 25–26High performance FICON (zHPF), 10High-speed communications, 8HiperSockets, 8Histogram stats, 521History tables, 71, 76, 252, 449–450Horizontal deferred write threshold (DWQT), 493Host variable, 180–182HyperPAV, 10, 495

II/O management, 491–498

allocation of space for, 497buffer pools in, 495data sets in, distributed, 495, 496data sets in, extent of, 497–498data sets in, fast devices for, 496extent size of data sets in, 497faster, 495–498index parallelism and, 498parallel access volumes (PAV) and, 495, 496performance, 491–498prefetch in, 491–493preformatting for, 497

Page 14: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

572 Index

read operations in, 491–493storage and, 495table spaces and, optimizing, 496–497write operations in, 493–495

IBM Certified Database Administrator, 1IBM Certified Database Administrator, DB2 11 for z/OS,

2–6Identity columns, 3, 91

data types and, 91numeric data and, 88

IDFORE, 386Image copies, 275Immediate write threshold (IMTH), 494–495Implicit privileges, 308, 313IMS. See Information Management System (IMS)IMS/ESA, 8IN/INOUT, 47, 83–84, 164, 192, 521In-list access, 541–542Include index, 103, 107Inconsistency of data and recovery from, 353–356Index spaces, 21, 67Index-controlled partitioning, 59Indexable predicates, 545Indexes, 2, 6, 21, 22, 33, 45, 99–110, 135, 388

access paths and, influencing, 530–531access to, EXPLAIN, 539ASC and DESC in, 101–102authorities and privileges for, 316auxiliary, 103, 108benefits of, 99buffer pools in, 48changing, ALTER INDEX and, 102, 125CLUSTER/NOT CLUSTER in, 125clustering, 103, 105–106columns added to, 125–126COMPRESS/NOT COMPRESS in, 125compressed, 103, 106COPY and copies in, 102, 456, 460creating, CREATE INDEX and, 67, 99–101DB2 catalog, 108DBETE status and, 267–268deferred allocation of index space data sets in, USING

STOGROUP and, 102–103document ID, 114DSNACCOX and, 439equal unique, 541

expression–based, 103, 106FlashCopy and, 441, 445in parallel rebuilding, 443include, 103, 107index spaces and, 67index-only access, 541keys in, 104–105, 108–110large objects (LOB) and, 108, 113loading, 401matching, 539multipiece, 105multiple, access to, 540node ID, 114nonmatching, 540nonpartitioned (NPI), 105nonpartitioned secondary (NPSI), 105null-excluding, 103, 107one-fetch access to, 540–541PADDED/NOT PADDED in, 125parallel build, 406, 428parallel subtasks and, 443–444parallel, building with REORG, 428parallelism in, for I/O, 498partitioned, 59, 103, 105partitions in, rebuilding, 442–443primary, 103, 104–105range-list, 541RBA/LRSN conversion and, 445REBUILD-pending status in, 268–269rebuilding, REBUILD INDEX utility and, 102,

442–445recovery of, 330, 349, 371, 375–376renaming, RENAME INDEX and, 126reorganizing, REORG INDEX and, 438–442, 514reorganizing, determining when, 514resetting REBUILD-pending (RBDP) status in, 444screening, 539–540sequence of entries in, 101–102SHRLEVEL access and, 440–441size of, 33STOP DATABASE and, 272–273table spaces and, 55types of, 103unique business time, 104unique, 103–104versions of, 133, 138versions of, ALTER and, 128–129

Page 15: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 573

XML, 103, 107–108, 127, 188Indicator variables, 200INDOUBT threads, 286, 391Information Management System (IMS), 11, 15, 16, 263,

287, 307, 345, 510attachment facility for, 17commands, 262control region, 14dependent region, 14

Informational COPY pending status, 268Informational referential constraint, 96Initialization procedures, 12Inline copies, 275, 404

REORG and, 426–427Inline LOBs, 113–114Inline statistics, 449

loading, 405Inner joins, 158INSERT, 6, 23, 42, 132, 136, 137, 171–172, 203, 242, 320,

327, 386, 499archive-enabled tables and, 209authorities and privileges for, 308common table expressions in, 215cost estimation using EXPLAIN, 546–547declared global temporary tables and, 202LOAD and, 84referential constraints and, 95tables and, 84–85triggers and, 97views and, 111

Insert rule, for constraints, 96Installation and migration, 4, 255–256, 384, 388

administrative task scheduler and, 260–261CLIST for, 256commands and, 262–266conversion mode/mode *, 257converting to DB2 11 and, 256DB2I and, 259DSNTEP2 and, 260DSNTEP4, 260DSNTIAD and, 260DSNTIAUL and, 259–260enabling new function mode/mode* in, 258interacting with DB2 in, 259–261ISPF and, 256migration, 255–256

modes of, 257new function mode in, 258–259premigration checklist for, 256–257productivity aid sample programs for, 259–260Program Development Facility (PDF) and, 256storage requirements and, 256subsystem parameters (DSNZPARMS) and, 261–262

Instead of triggers, 98–99Instructions, System z, 10Instrumental Facility IDs (IFCIDs), 500Instrumentation facilities, 12INTEGER/INT, 44, 88, 91, 121, 168Integrated Catalog Facility (ICF), 281Integrity. See Data integrityIntelligent Resource Director (IRD), 8Interacting with DB2 for z/OS, 30–31, 259–261Interactive SQL, 24, 145Interactive System Productivity Facility (ISPF), 30–31

installation/migration and, 256Internal Resource Lock Manager (IRLM), 13, 32, 37, 262

commands for, 265–266 locks and, 230

Internet Connection Server, 8INTERSECT, 153, 155Invalidating statements in dynamic statement cache,

486–487Invalidations caused by ALTER, 128IP addresses, 185IRLM. See Internal Resource Lock Manager (IRLM),IS NULL, 521Isolation levels, 6, 235–236, 250, 253

locks and, 235–236ISPF. See Interactive System Productivity Facility (ISPF)

JJARs, authorities and privileges, 316Java, 25, 181, 189JDBC, 15, 24, 189

SQL and, 145JES, 8JOIN and joins, 157–160

EXPLAIN and, 543–544inner, 158outer, 159–160

Page 16: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

574 Index

WHERE in, 158

KKEEPDICTIONARY, 435Kerberos, 326Keys, 21, 45, 104–105, 108–110, 124

foreign, 110loading, 401parent, 109primary, 109SORTKEYS and, 405unique, 109

Key-Sequenced Data Set (KSDS), 27

LLABEL, 242, 316Language elements of SQL, 174–187Large object (LOB) table space, 50, 112, 369Large Object Manager (LOBM), 12Large objects (LOB), 58, 86, 89, 112–114, 138

auxiliary tables for, 112base table and, 112columns for, 396CREATE INDEX and, 113CREATE TABLE and, 113CREATE TABLESPACE and, 113host variables and, 181–182indexes and, 108, 113inline, 113–114loading, 402locator variables and, 182locks, 66ROWID and, 112statistics, RUNSTATS and, 450table spaces for, 50, 112, 267, 369, 431tables for, 417unloading, 413

Latches, locks, 230LDS, 392Left outer joins, 159LIKE, 521

tables and, 82Limit keys, 124Linear Data Set (LDS), 27Linux, 8, 510

List prefetch, 492–493List structure, 298LISTDEF, 277LISTPARTS, 429, 430Literal values, access paths, replacing, 535LOAD and loading data, 267, 274, 276, 285, 316, 327,

335, 350, 360, 361, 365, 368, 372, 392–409, 404, 474, 469, 521

availability during, 395CCSID options for, 394column default values and, 395concurrent access and, 400COPY, 404Cross Loader in, 407–409delimited file loading in, 394DSNTIAUL, 393EXEC SQL, 393, 407–408free space assignment, 404generated column types, 403indexes, 401inline copies and, 404inline statistics and, 405INSERT and, 84keys, 401large objects (LOBs), 402LOB columns and, 396logging and, 400–401parallel build indexes and, 406partitions, 399–400preformatting pages for, 405–406RBA/LRSN CONVERSION in, 406–407REBUILD and, 404referential constraints and, 96referential integrity and, 401REORG and, 404REORG DISCARD and, 393REORG UNLOAD EXTERNAL and, 393REPLACE and, 396–397replacement or addition of data in, 396–397RESUME and, 396–397rows, 398SHRLEVEL and, 405SORTKEYS and, 405statistics, RUNSTATS and, 462table spaces and, 55, 399–400tables and, 397–400triggers and, 97

Page 17: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 575

UNLOAD and, 393XML/XML columns and, 395–396, 402–403

Load modules, 222LOB. See Large objects (LOBs)LOB columns, 396LOB host variable, 181–182 LOB locator variables, 182LOB locks, 66LOB table space, 50, 112, 267, 369, 431LOB tables, 417Local dynamic SQL cache, 487Locator variables, LOB, 182Lock structure, in data sharing, 298–299LOCK TABLE, 232–233, 316, 327Locks and locking, 6, 141, 230–237, 253. See also

Concurrencyaccounting reports and, 512ANY locks, 66–67application design recommendations for, 231COMMIT and, 231CONCURRENT ACCESS RESOLUTION and, 234Cross System Coupling Facility (XCF) and, 265currently committed data and, 233–234data sharing lock structure and, 298–299displaying, DISPLAY DATABASE and, 513duration of, 235–236EXPLAIN and, 511–512, 544Internal Resource Lock Manager (IRLM) and, 13, 32,

230isolation levels and, 235–236latches in, 230LOB locks, 66Lock Detail Analysis report in, 499LOCK TABLE and, 232–233monitoring and, 499, 511–513optimistic, 234–235, 250, 254page locks, 66partition, 65performance, 481recovery and, 380retry logic in, 231ROLLBACK and, 231row locks, 66SKIP LOCKED DATA and, 233statistics reports and, 512table spaces and, 49

table spaces and, size of locks in, 65–67table type, 65trace classes for monitoring of, 513

LOCKSIZE, 58Log range table, 22Log Record Sequence Numbers (LRSNs), 301, 332–333,

340, 406–407REBUILD INDEX and, 445REORG and, 435

Logical data modeling, 41, 42–44, 131, 135Logical page list (LPL), 266, 268, 383, 388Logs and logging, 27, 386, 389. See also Backup,

recovery, restartactive, 27archive, 27bootstrap data set in, 333–334life cycle of records in, 332limits to, soft and hard, 332–333loading, 400–401log record sequence numbers (LRSNs) and, 301,

332–333recovery and, 331–333, 346, 378–379REORG and, 424, 434–435table spaces and, 62–63writing to, 332

LPAR performance, 478, 480LRSN. See Log Record Sequence Numbers (LRSNs)LSFM, 8

MMaintenance, 461–466Management of data sets, 33Many–to–many relationship, 42, 45Mapping tables, 423–424, 475Masks, column, 320–321Matching indexes, 539Materialized query tables (MQT), 71, 76–77, 213–215

automatic queries rewrite and, 213–215MAX, 186MAX ABEND, 199MAX_CARDINALITY, 177MAXKEEPD, 482MAXPARTITIONS, 49, 54, 58MAXROWS, 58MEMBER CLUSTER, 58

Page 18: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

576 Index

Memory, 28–30MERGE, 23, 171, 172–173, 242, 320, 386

referential constraints and, 95MERGECOPY, 275, 335, 336–337, 348Message generator, 12Metrics, 3MIDAW. See Modified Indirect Data Address Word

(MIDAW)Migration. See Installation and migrationMIN, 186Modeling of data, 41–45Modified Indirect Data Address Word (MIDAW), 10MODIFY, 246–247, 265, 351–352MODIFY TRACE, 508Monitor trace, 508Monitoring, 498–513, 498

accounting reports in, 499, 512accounting trace in, 501–505audit trace in, 507. See also Auditingcontinuous, 509–510detailed, 510–511elapsed time in, 504exception, 511EXPLAIN in, 511–512global trace in, 508governing in, predictive and reactive, 499IBM Software Support and, 511Lock Detail Analysis report in, 499lock, 499, 511–513monitor trace in, 508OMEGAMON for, 498, 511Online Monitor in, 499performance monitors in, 498–499performance trace in, 505–507performance, 3, 509–511periodic, 510resource limit facility in, 499–500response times in, 503snapshots in, 510statistics in, 499, 500–501, 511–512. See also Statistics

and RUNSTATSsuspensions in, 504–505threads and, 293–294trace in, 500–509. See also Tracesutilities and, 280–281wait times in, 504–505

Moving DB2 data, 391–416. See also LOAD and Loading data; UNLOAD and unloading data, 391

availability during loading in, 395column default values and, 395concurrent access and, 400control interval (CI) processing and, 392COPY in, 392, 404copying data and, 391, 392DISPLAY DATABASE and, 391DSN1COPY and, 392, 415DSNTIAUL and, 392, 393, 409–411EXEC SQL, 393LDS in, 392LOAD, loading and unloading in, 392–409. See also

LOAD and loading datalogs and logging in, 400–401REBUILD and, 404, 415–416RECOVER and, 392, 415–416RECOVER INDOUBT, 391referential integrity and, 401REORG and, 392, 404, 415–416REORG DISCARD, 393REORG UNLOAD EXTERNAL, 393REPLACE and, 396–397RESUME and, 396–397string data, 394UNLOAD and unloading data in, 392–394, 409–415.

See also UNLOAD and unloading dataVSAM and, 391–392

MQSeries, 18MQT, 120, 121MSTR, 38Multi-streaming prefetching (AMP), 10Multilevel security, 324–325, 384, 388Multipiece index, 105Multiple Allegiance, 9, 495

NNaming conventions

column renaming and, 123–124DRDA and three-part names in, 239–240index renaming, 126unqualified names in, 317–318

Native mode, 30Native SQL procedures, 191, 201, 251Nested SQL, 169

Page 19: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 577

New function mode, 258–259NO ACTION, 96NO CASCADE, 98Node ID indexes, 114Non-indexable predicates, 545Nonpartitioned index (NPI), 105Nonpartitioned secondary index (NPSI), 105Nonrelational data, 6Nonscrollable cursors, 170Nonvolatile storage (NVS), 495Normalization, 2, 43NOT LOGGED objects, 282, 376NOT NULL, 91, 94Null arrays, 179–180Null values, 93–94Null-excluding index, 103, 107NUMERIC, 44, 88Numeric data, 44, 85, 87–88

CAST and, 168identity columns and, 88

NUMPARTS, 58

OObject ownership

authorities and privileges for, 313–318BIND/REBIND and, 324CREATE and, 313plans and packages, 317qualified objects and, 315roles and, 322–323trusted context and, 324unqualified objects and, 314

Object privileges, 304Objects, 5OBJMAINT, 329ODBC. See Open Database Connectivity (ODBC)OMEGAMON, 484, 498, 511One–to–many relationship, 42One–to–one relationship, 42Online Monitor, 499Open Database Connectivity (ODBC), 15, 24, 25

SQL and, 145Open software, 9Open transaction environment (OTE), 509

Operating system, z/OS, 7, 11performance:, 478

Optimistic locking, 234–235, 250, 254Optimization, 551, 554OPTIMIZE, 243–244, 245Optimizing for n rows, in remote queries, 243–244OPTIONS, 277–278OPx buffer, 500ORDER BY, 151–152, 521Ordinary arrays, 177–178Organizing data. See Data organizationOutages, 3Outer joins, 159–160Outer SELECT, 161OVER, 152–153Overrides, selectivity, in access paths, 529–530Ownership. See Object ownership

PPACKADM, 310Package lists, 227–228Package privileges, 304Packages, 143, 185, 222

authorities and privileges for, 316binding/rebinding and, 224, 227ownership of, 317skeleton application plans and packages (SKPT) in, 483trigger, 228unqualified names in, 317–318

PADDED/NOT PADDED, 115, 125Page locks, 66Page range screening, 542Page sets, 21Page size, 10Pages/paging, 40

copying, 359–360loading, 405–406LPL status in, 268preformatting, 405–406recovery and, 330, 357–360recovery and, RECOVER and, 345RESTART pending status in, 270stolen, 484table spaces and, 49

Page 20: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

578 Index

write error page range (WEPR) status, 270write operations and, 493

Parallel access, 9, 542Parallel access volume (PAV), 9, 10, 495, 496Parallel build indexes, 406Parallel indexes, REORG, 428Parallel recoveries, 356–357Parallel subtasks, 443–444Parallel Sysplex, 9, 11, 14, 19–21, 40, 297. See also Data

sharingbenefits of data sharing, 21coupling facility for, 20performance, 478sysplex failure management (SFM) policy in, 300–301Sysplex Timer and, 20, 301

Parallelism, 468, 473indexes and I/O and, 498unloading and, 413–414

Parameter marker variable, 180Parameters, 384, 385, 390, 553, 555, 556, 557

access paths and, replacing, 535DSNPARMS, 261–262subsystem, 261–262

Parent keys, 109PART, table spaces, 55Partition locks, 65Partitioned Data Set Extended (PDSE), 15, 201Partitioned Data Sets (PDS), 223Partitioned index, 103, 105Partitioned (classic) table spaces, 50, 55–56, 369,

428–429, 447–448statistics, RUNSTATS and, 447–448

Partitioned-by-growth table spaces, 53–55, 60, 370, 428–430, 459

Partitioning, 2, 131adding/dropping, 119by size, 83–84COPY and copies in, 458DBETE status and, 267–268ENDING AT, 83extended addressability (EA), 61IN clause and, 83–84index-controlled, 59loading partitions and, 399–400locks and, 65

partitioned-by-growth, 53–55, 60, 370, 428–430, 459range-partitioned, 53–55, 60–61REBALANCE in, 425–426, 433–434REBUILD INDEX and, 442–443recovery and, 330REORG and, 425–426rotation of, 55, 120size of, 132, 136, 137statistics, RUNSTATS and, 447–448STOP DATABASE and, 272–273table spaces and, 49, 59, 119–120table-controlled, 59–60, 82tables and, 82–85

Partitioning index, 59PCTFREE, 58, 115Performance and tuning, 3, 4, 477–558

access path tuning in, 525–547. See also Access pathsbuffer pools and, 481, 482–483CPU and, 479, 480data organization and, 513–525. See also Data

organizationdistributed environments and, 477dynamic SQL and, 477ECSA and, 481EDM pools in, 483–487EXPLAIN and, 477, 536–547functions and, 199–201I/O management in, 491–498locks and, 481LPAR and, 478, 480MAXKEEPD in, 482minimizing storage use in, 481monitoring of DB2 in, 498–513open data sets in, 490–491Parallel Sysplex and, 19–21, 478. See also Parallel

Sysplexprocedures and, 199–201REORG and, 514RID pool in, 487–489sort pool in, 489–490sorting and, 481statement cache and, dynamic, 547–550statistics and, 513–514. See also Statistics and

RUNSTATSstorage and, 480–490threads and, pooled, 481traces in, 477

Page 21: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 579

Workload Manager in, 478–480z/OS and DB2 in, 478

Performance trace, 505–507Periodic performance monitoring, 510Permissions, row, 319–320Persistent Read Only (PRO) restricted status, 268Physical data modeling, 41, 44–45PKLIST, 227–228PL/I, 181, 189Plan stability, 250, 254

access paths, 549binding/rebinding and, PLANMGMT and, 230

PLANMGMT, 230Plans

authorities and privileges for, 316binding/rebinding and, 224execution of, authorization for, 318ownership of, 317skeleton application plans and packages (SKPT) in, 483stability of, 230, 250, 254, 549unqualified names in, 317–318, 317

Point in time (PIT) recovery, 362–368Points of consistency, 142Pooled threads, 245, 287–288, 290Precision, 44PRECOMPILE, 31Precompiling, 222, 223, 250, 253

CONNECT in, 237options for, 237SQL in, 237

PredicatesEXPLAIN and, 544–546indexable vs. non-indexable, 545quantified, in subquery, 164residual, 545–546stage 1 and stage 2, 545–546subqueries and, 162–166

Predictive governing, 499Prefetch, 10, 35, 38, 491–493, 551, 555

EXPLAIN tables and, 542–543PREFORMAT, 405–406, 497Preformatting, I/O management, 497PREPARE, 144, 486Primary index, 103, 104–105Primary key, 45, 104–105, 109

Primary Option menu, 35, 38Privileges. See Authorization and privilegesPRO restricted status, 268Procedures

autonomous, 192changing, ALTER PROCEDURE and, 194–195creating, CREATE PROCEDURE and, 190, 191, 194,

200deterministic, 192external SQL, 192external stored, 190external vs. SQL, 193native SQL, 191, 201, 251performance considerations for, 199–201SQL, 191, 193stored, 189–181

Profiles, RUNSTATS, 451–453, 471, 473, 476Program Development Facility (PDF), installation/

migration, 256PROGRAM PREPARATION, 31PSRB, 268PSRBD, REBUILD INDEX, 444PUBLIC, 311pureQuery, 24, 25, 189pureXML, 25, 187–189. See also XML

data model for, 187XQuery and, 188

QQMF, 24, 478Qualified objects, 315QUALIFIER, 317–318Queries, remote. See Remote queriesQUIESCE, 275, 281, 335–336, 348, 350, 354, 363

RRACF. See Resource Access Control Facility (RACF)Range-list index scan, 541Range-partitioned table space, 53–55, 60–61, 82RANK, 153RBA

REBUILD INDEX and, 445REORG and, 435

RBA/LRSN CONVERSION, 406–407, 406

Page 22: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

580 Index

RBDP, 268RDBNAM, 296Reactive governing, 499READ, 183Read operations, 491–493

prefetch in, 491–493Read stability (RS), 235–236REAL, 44, 88, 121Real-time statistics (RTS), 462, 468, 469, 472, 525, 553,

557REBALANCE, 433–434

table spaces and, 55REBIND. See BIND/REBINDREBIND PACKAGE, 234, 254REBIND PLAN, 234Rebinding. See Binding and rebinding; BIND/REBINDREBUILD, 268–269, 365, 404, 415–416, 497, 521

tables and, 84REBUILD INDEX, 102, 337, 349, 350, 360, 442–445,

468, 473FlashCopy and, 445in parallel index rebuilding with, 443index partitions and, 442–443, 442parallel subtasks and, 443–444, 443PSRBD and, 444RBA/LRSN conversion and, 445resetting REBUILD-pending (RBDP) status in, 444

REBUILD-pending (RBDP) status, 268–269, 444Reclustering, REORG, 433Record identifier (RID). See RID poolRECOVER, 267, 268, 269, 273, 275, 337, 345, 348, 349,

353–358, 360, 365–366, 369, 371, 375–376, 383, 415–416, 457. See also Backup, recovery, restart

ALTER statements and, 371moving, 391options for, 366–368

RECOVER-pending status, 269, 282RECOVER POSTPONED, 273, 284–285RECOVER TOCOPY, 350RECOVER TOLOGPOINT, 350Recovery. See Backup, recovery, restartRecovery log manager, 12Recovery manager, 12Recovery utilities, 275RECP, 268

Recursion, common table expressions, 216–219Referential constraints, 21, 95–97Referential integrity, 21

loading, 401REFRESH, 269REFRESH-pending status, 269Registers, temporal tables, 206–207Regression, access path, 549Relational Data System (RDS), 12Relationships, 42RELEASE, 244RELEASE(DEALLOCATE), 245–246Remote DB2 access, 305–306Remote queries, 243–244Remote requests, 40Remote sites for recovery, 331RENAME, 242RENAME INDEX, 126Reoptimization, access paths, 533–535REORG, 3, 119, 121, 136, 269, 330, 335, 350, 361,

363, 365, 368, 372, 404, 414–415, 417–438, 514, 517, 521. See also Data organization; REORG TABLESPACE

ALTER statements and, 420catalogs and, 435–436data set definitions and, changing, 425determining objects for reorganization with, 418–419directories and, 435–436DROP TABLE and, 430FlashCopy image copy and, 427–428hash-organized table spaces and, 432improving performance of, 436–438indexes and, 514inline copies and, 426–427KEEPDICTIONARY and, 435LISTPARTS option in, 429, 430LOB table spaces and, 431LOB tables and, 417log processing and, 424logging and, 434–435mapping tables and, 423–424parallel index building and, 428partitioned table spaces and, 428–429pending definition changes and, 431–432performance, 514RBA/LRSN conversion and, 435

Page 23: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 581

REBALANCE and, 425–426rebalancing partitions and, 433–434reclustering and, 433redistributing data across partitions and, 425–426removing data with, 414SHRLEVEL access and, 417, 420–422SORTCLUSTER in, 426SORTDATA and, 433statistics, RUNSTATS and, 462table spaces and, 55, 122–123, 428–429, 515–516unloading and, 414–415unloading with reloading and, 424XML table spaces and, 431

REORG DISCARD, 393REORG INDEX, 275, 360, 438–442

determining indexes to reorganize with, 438–439DSNACCOX in, 439FlashCopy and, 441improving performance of, 441–442reorganizing, determining which ones, 438–439SHRLEVEL access and, 440–441

REORG-pending status, 269REORG TABLESPACE, 275, 360, 417–438REORG UNLOAD EXTERNAL, 393REORG UNLOAD EXTERNAL/DISCARD, 414–415REPAIR, 338Repeatable read (RR), 235–236REPLACE, 285, 368, 372, 396–397REPORT, 275, 337, 348, 351, 355, 447Requests, 37Residual predicates, 545–546Resource Access Control Facility (RACF), 14, 27,

305–306, 324, 326Resource limit facility, 499–500Resource Recovery Services (RRS), 16, 18, 334Response times, 503RESTART, 270. See also Backup, recovery, restartRESTART-pending status, 270, 273Restarting DB2, 281, 342–343, 346–347. See also Backup,

recovery, restartautomatic restart manager (ARM) in, 301conditional, 281–282data sharing group termination and, 282–283NOT LOGGED tables, 282, 376

RESTORE SYSTEM, 338, 348, 364, 378

RESTRICT, 96–97, 327Restrictive states, 3, 266

displaying, DISPLAY DATABASE and, 270–272Result sets, locator variables, 182Result tables, 71

combining, with UNION, EXCEPT, or INTERSECT, 153–155

filtering groups in, with HAVING, 156formatting, 149JOINs in, 157–160naming, with AS, 150numbering rows in, with OVER, 152–153ordering rows in, with ORDER BY, 151–152ranking rows in, with RANK, 153specified time periods for, with ROW CHANGE

TIMESTAMP, 157summarizing group views in, with GROUP BY,

155–156RESUME, 396–397Retry logic, 250, 254

locks and, 231REVOKE, 175, 242, 303, 308, 310–312, 316, 318, 326,

327REXX, 144, 181, 182RID pool, 28, 29, 487–489

performance and, 481, 487–489prefetch in, 492–493

Right outer joins, 159Roles, 305, 322–323

authorities and privileges for, 316ROLLBACK, 141, 142, 183, 231

recovery and, 344SQL procedures and, 193

ROTATE PARTITION, 120Rotation, 55Routines, 21, 189–201. See also Stored proceduresROW BEGIN/END, 93Row change timestamp, 92ROW CHANGE TIMESTAMP, 157Row ID, 2Row locks, 66Row permissions, 319–320Row-level security, 324ROWID data type 92–93, 112Rows, 67–68

Page 24: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

582 Index

access control in, 318–321BEGIN/END, 93loading, 398null values and, 94permissions for, 319–320row change timestamp and, 92row-level security and, 324ROWID data type and, 92–93, 112transaction start ID and, 93–94

RRS. See Resource Recovery Services (RRS)RRSAF, 287, 323RUN, 31Runs, in sorting, 29RUNSTATS. See Statistics and RUNSTATS

SSavepoints, 142–143, 344SCA. See Shared Communication AreaScalar functions, 186–187, 196, 197–198Scale, 44Scheduling backups and data checks, 343Schemas, 6, 111–112

CURRENT, 112naming, 112XML, 188

Scopeglobal variables, 183trigger, 183

Scrollable cursors, 170SCT02, 22SDA. See Shared Data Architecture (SDA)Search conditions and SELECT, 147–148SECADM, 310, 312–313, 319, 320, 329SECMAINT, 329Secure Sockets Layer (SSL), 9Security, 3, 9, 33, 303

multilevel, 324–325, 384Security labels, 305Security Server, 14, 27, 305, 306Segmented table space, 50, 56, 369, 430SEGSIZE, 115

table spaces and, 55SELECT, 6, 23, 145–149, 260, 499. See also Result tables

ALL in, 164

ANY in, 164archive-enabled tables and, 210–211AS and, 150–151asterisk used in, 145–146authorities and privileges for, 308common table expressions in, 215comparison of distinct types in, with CAST, 167–169comparison operators and, 147cost estimation using EXPLAIN, 546–547CREATE VIEW with AS clause and, 150–151cursors and, 169–171DB2 Query Management Facility (DB2QMF) and, 145declared global temporary tables and, 202DELETE and, 167, 173derived columns and, 148DISTINCT and, 150DISTINCT FROM and, 148duplication in, eliminating with DISTINCT, 150EXCEPT and, 153, 154EXISTS in, 164–165FETCH and, 160–161FOR UPDATE in, 161FROM, 159GROUP BY and, 155–156, 159HAVING in, 156, 159hidden columns and, 161implications of use of, 161IN in, 164individual columns for, 146–147INSERT and, 171–172INTERSECT and, 153, 155JOIN in, 157–160MERGE and, 172–173nested statements in, 169OPTIMIZE in, 160–161optimizing a query in, with FETCH, 160–161optimizing a query in, with OPTIMIZE, 160–161ORDER BY and, 151–152ordering of clauses in, 159OVER and, 152–153RANK and, 153result tables from, combining, with UNION, EXCEPT,

or INTERSECT, 153–155result tables from, filtering groups in, with HAVING, 156result tables from, formatting, 149result tables from, JOINs in, 157–160result tables from, naming, 150

Page 25: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 583

result tables from, numbering rows in, OVER and, 152–153

result tables from, ordering rows in, and ORDER BY, 151–152

result tables from, ranking rows in, with RANK, 153result tables from, specified time periods for, with ROW

CHANGE TIMESTAMP, 157result tables from, summarizing group views in, with

GROUP BY, 155–156ROW CHANGE TIMESTAMP, 157rows and, with search conditions, 147–148search conditions with, 147–148SOME in, 164SPUFI and, 145subqueries using, 161–167. See Subqueries with

SELECT, 161TRUNCATE and, 173UNION and, 153, 154UPDATE and, 166–167, 172updating data during retrieval with, with FOR

UPDATE, 161views and, 110–111WHERE and, 147, 158, 159, 161–167, 173. See also

Subqueries with SELECTXML data, XPath, and, 148–149

Selectivity overrides, 529–530Sequence objects, 220–222Sequences, authorities and privileges, 316Sequential prefetch, 491Sequential prefetch threshold (SPTH), 494Servers, 6Service controller, 12Session variables, 185SET, 265SET CURRENT SQLID, 327SET LOG SUSPEND/RESUME, 283SET NULL, 96, 327Shared Communications Area (SCA), 297, 298

recovery and, 380Shared Data Architecture (SDA), 297SHRLEVEL, 383, 405, 417, 440–441, 420–422, 458–459,

470, 475statistics, RUNSTATS and, 447

Simple table space, 50Skeleton application plans and packages (SKPT), 22, 483Skeleton cursor tables (SKCT), 22, 483

Skeleton package table (SKPT), 22, 483SKIP LOCKED DATA, 233SMALL INTEGER/SMALLINT, 44, 88, 91, 121, 168SNA. See System Network Architecture (SNA) Snapshots, 510Soft limit to logs, 332–333Software Support, 511Solid–state drives (SSD), 9SOME, 164SORT, 6, 521Sort pool, 28, 29–30, 481, 489–490SORTCLUSTER, 426, 434Sorting

EXPLAIN and, 543performance of, 481REORG and, 433sort pool and, 489–490, 489SORTDATE, 433tournament sort, 489–490, 489

SORTKEYS, 405Sourced functions, 199Specialty engines, 8SPT01, 22SPUFI, 24, 31, 145, 191, 259

SELECT and, 145SQL, 4, 5, 6, 18, 23–25, 36, 39, 143–247.

application programming and, 139–141binding/rebinding and, 143, 237Call Level Interface (CLI) and, 144, 145cursors in, 169–171Data Control Language (DCL) in, 310data types in. See Data typesDECLARE CURSOR in, 144deferred embedded, 144DELETE in, 173DESCRIBE in, 144dynamic, 24–25, 144embedded, 144EXECUTE in, 144functions and, 186–187, 195–201global dynamic SQL cache and, 485–486host variables and, 181INSERT in, 171–172interactive, 24, 145Java and, 25JDBC and, 145

Page 26: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

584 Index

language elements in, 174–187local dynamic SQL cache in, 487MERGE in, 172–173modification restrictions with views and, 173–174modifying data with, 171–187native procedures in, 191, 201nested statements in, 169Open Database Connectivity (ODBC) and, 25, 145PREPARE in, 144procedures in, 191, 193pureQuery and, 25pureXML and, 187–189REXX and, 144routines in, 189–201scalar functions and, 197–198SELECT in, 145–169, 171. See also SELECTSPUFI and, 145SQL procedural language and, 195SQLCA and, 193SQLJ and, 25, 145static, 24, 144table functions and, 198–199TRUNCATE in, 173UPDATE in, 172variables in, 180–186XML document updates with, 188XQuery and, 188

SQL parameter variable, 180SQL Procedural Language (SQL/PL), 4, 189, 195SQL procedures, 191, 193SQL Processor Using File Input. See SPUFISQL variable, 180SQLADM, 310, 528SQLCA, 193, 223SQLERROR, 318SQLID, 304SQLJ, 15, 25, 189

SQL and, 145SQLRULES, 243–244Stage 1 and 2 predicates, 545–546START, 264START DATABASE, 273START DB2, 31START TRACE, 328, 508Statement cache. See CacheStatic binding, 224

Static SQL, 24, 144Statistics and RUNSTATS, 2, 3, 275, 445–456, 461–466,

469, 470, 472, 474, 511, 551, 552, 554, 555, 556, 557access during execution and, 447access path, resetting, 450–451automatic collection of, 524–525autonomic and, 454–456binding/rebinding and, 227cardinality, 520catalog updates and, 447collection of, automated, 524–525collection of, how, 519–520collection of, when, 517–519compression statistics and, 448–449, 471, 476COPY, 462data organization and, 516–525DB2 catalog, 453distribution type statistics and, collecting, 448DSNACCOX and, 462, 464–465EDM pool efficiency, 484–485EXPLAIN and, 522externalized, 462–463, 469, 473, 522feedback from, 522–524frequency (distribution), 521histogram, 521history tables and, 449–450improving performance of, 453–454inline statistics and, 449LOAD and loading and, 405, 462LOB and XML, 450partitioned table spaces, 447–448profiles for, 451–453, 471, 473, 476real-time (RTS), 462, 468, 469, 472, 525rebinding after collection, 525REORG and, 462REPORT and, 447SHRLEVEL and, 447statement cache, externalizing, 547–549statistic trace in, 500–501SYSINDEXSPACESTATS and, 462, 466SYSTABLESPACESTATS and, 462, 465types of, 520user queries and, 465when to gather, 446–447

Statistics reports, 512Statistics trace, 500–501STOGROUP, 115

Page 27: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 585

STOP, 264STOP AFTER FAILURES, 200STOP DATABASE, 272–273STOP DB2, 31, 281STOP status, 270STOP TRACE, 328, 508Stopping DB2, 281

SET LOG SUSPEND/RESUME to freeze activity or, 283

Storage, 21, 470, 475, 480–490. See also Buffer poolsbuffer pools in, 481, 482–483EDM pools in, 481, 483–487I/O management and, optimizing, 495installation/migration requirements for, 256MAXKEEPD in, 482minimizing use of, 481nonvolatile, 495performance, 480–490RID pool in, 481, 487–489skeleton application plans and packages (SKPT) in, 483skeleton cursor tables (SKCT) in, 483sort pool in, 481, 489–490STOSPACE utility and, 456threads and, 293

Storage capacity, 8Storage groups, 22, 45–47

authorities and privileges for, 315changing, ALTER STOGROUP and, 116–117creating, CREATE STOGROUP and, 45–47STOSPACE, 456

Storage Management System (SMS), 15, 26Storage Manager, 13Storage structures, 49–57. See also Table spacesStored procedures, 4, 11, 16, 19, 189–191, 248, 251, 469

authorities and privileges for, 317changing, ALTER PROCEDURE and, 194–195creating, CREATE PROCEDURE and, 190, 191external, 190manager for, 12native SQL, 191SQL, 191

STOSPACE, 456, 470, 475String data, 85, 86–87

encoding schemes for, 87, 133, 138loading, 394

Structure failure and recovery, 380

Structures, creating, 45–67Subqueries with SELECT, 161–167

comparison of distinct types in, with CAST, 167–169correlated and uncorrelated, 162correlated, 165–166correlation names in references and, 166DELETE and, 167EXISTS in, 164–165HAVING and, 162IN in, 164nested, 163outer SELECT and, 161predicates and, 162–166quantified predicates in, 164single table for, 167SOME, ALL, ANY in, 164UPDATE and, correlated, 166–167user-defined functions in, 166WHERE and, 161–167

SUBSTR, 186Subsystem support, 13SUM, 186Suspensions, 504–505SYSADM, 309, 312–313, 320, 528, 552, 556SYSADMIN, 329SYSCTRL, 309, 312–313, 528SYSDEFLT, 45SYSIBM.CLIENT_IPADDR, 185SYSIBM.IPNAMES, 296SYSIBM.LOCATIONS, 296SYSIBM.LULIST, 296SYSIBM.LUMODES, 296SYSIBM.LUNAMES, 296SYSIBM.MODESELECT, 296SYSIBM.PACKAGE_NAME, 185SYSIBM.SYSCOLAUTH, 325SYSIBM.SYSCONTEXT, 325SYSIBM.SYSCONTEXTAUTHIDS, 326SYSIBM.SYSCONTROLS, 325SYSIBM.SYSCOPY, 350SYSIBM.SYSCTXTTRUSTATTRS, 326SYSIBM.SYSDBAUTH, 325SYSIBM.SYSEQUENCEAUTH, 325SYSIBM.SYSLGRNX, 350SYSIBM.SYSPACKAUTH, 325

Page 28: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

586 Index

SYSIBM.SYSPLANAUTH, 325SYSIBM.SYSRESAUTH, 325SYSIBM.SYSROLES, 325SYSIBM.SYSROUTINEAUTH, 325SYSIBM.SYSROUTINES, 199SYSIBM.SYSSCHEMAAUTH, 325SYSIBM.SYSTABAUTH, 325SYSIBM.SYSUSERAUTH, 325SYSIBM.SYSVARIABLEAUTH, 325SYSIBM.TIME_FORMAT, 185SYSIBM.USERNAMES, 296SYSIBMADM.GET_ARCHIVE, 184SYSIBMADM.MOVE_TO_ARCHIVE, 184SYSINDEXSPACESTATS, 462, 466SYSKEYTARGETS, 40SYSLGRNX, 22SYSOPR, 253, 309, 528SYSPACKAUTH, 289Sysplex Failure Management (SFM) policy, 300–301Sysplex Timer, 20, 301SYSTABLESPACESTATS, 462, 465System Management Facility (SMF), 500System Network Architecture (SNA), 13, 19, 295, 296System objects, 21–23System parameter manager, 13System services, 12System Services Address Space (SSAS), 12System utility table, 22System z instructions, 10System z Integrated Information Processor (zIIP), 8System-level backup

data-only, 364for object-level recoveries in, 361–362, 363–366full, 364–365

System-period temporal tables, 77–78System-wide recovery, 378System-wide points of consistency, 353SYSUTILX, 22

TTable functions, 196, 198–199Table spaces, 3, 21, 22, 33, 49–57, 130, 132, 134, 135,

137, 382, 386, 389ANY locks in, 66–67

authorities and privileges for, 316auxiliary warning status in, 266–267auxiliary, 56–57base, 57buffer pools and, 48changing, ALTER TABLESPACE and, 54, 117–120,

131, 136CHECK pending status in, 266, 267clauses to define, in CREATE TABLESPACE, 58COMMIT and, 122compressing data and, 64–65COPY and copies in, 459creating, CREATE TABLESPACE and, 49, 50–53, 58,

130DBETE status and, 267–268dropped, recovery of, 376–377extended addressability (EA) partitioning in, 61free space in, reserving for I, 63–64FREEPAGE in, 63–64hash-organized table spaces and, 432I/O management and, optimizing, 496–497index-controlled partitioning in, 59indexes and, 55keys in, 124large object (LOB), 50, 56–57, 112, 267, 369, 431loading, 399–400LOB locks in, 66locks and locking in, 49, 65–67logging and, 62–63materializing pending definition changes in, 118–119MAXPARTITIONS and, 54number of, 49page locks in, 66pages in, 49partition locks in, 65partitioned (classic), 50, 55–56, 369, 428–429, 447–448partitioned-by-growth, 53–55, 60, 370, 428–430, 459partitioning in, 49, 59, 119–120partitioning index, CREATE INDEX and, 59Persistent Read Only (PRO) restricted status in, 268range-partitioned, 53–55, 60–61RECOVER pending status in, 269recovery and, 330, 368–370, 375–375, 383, 388REFRESH pending status in, 269REORG and, 55, 122–123, 417–438, 428–429,

515–516REORG-pending status in, 269

Page 29: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 587

reorganizing, determining when, 515–516rotation and, 55row locks in, 66segmented, 50, 56, 369, 430sets of, 370simple, 50size of, 33statistics, RUNSTATS and, 447–448STOP DATABASE and, 272–273table locks in, 65table-controlled partitioning in, 59–60universal, 50, 53–55version of, 121–123VSAM and, 49XML, 50, 57, 127, 369, 431, 459, 471, 475

Table-controlled partitioning, 59–60, 82Tables, 2, 5, 21, 45, 67–85, 130, 134, 249

Accelerator–only, 71–72application-period temporal, 78, 204archive, 71, 72, 207archive-enabled, 71, 71, 184, 207–213auditing and, 328–329authorities and privileges for, 316auxiliary, 71, 72–73, 112base, 73, 112bitemporal, 78–79, 204–205by-size partition in, 83–84changing, ALTER TABLE and, 71, 77, 78, 120–124clone, 71, 73–74, 377column masks in, 320–321columns in, 67–68columns in, dropping, 123columns in, renaming, 123–124common table expressions in, 215–219copying, LIKE clause and, 82created global temporary, 79–80, 201creating, CREATE TABLE and, 47, 68–71, 81–82, 196data types in, 121DB2 catalog and, 22–23DBETE status and, 267–268declared global temporary, 80, 201, 202, 240DRDA and, three-part names and, 239–240dropped, recovery of, 376–377empty, 71, 74ENDING AT partition in, 83hash-organized table spaces, 71, 74–76, 220, 432history, 71, 76, 252, 449

INSERT and, 84–85invalidations caused by ALTER in, 128large objects (LOB) and, 112, 417LOAD, loading and, 84, 397–400locks and, LOCK TABLE and, 232–233mapping, 423–424, 475Materialized query (MQT), 71, 76–77, 120, 121,

213–215partitioning definition in, 82–85range-partitioned, 82REBUILD and, 84recovery and, 377–378restart and, NOT LOGGED, 282, 376result, from SELECT, 71, 149–152rows in, 67–68skeleton cursor tables (SKCT) in, 483statement cache, dynamic, 547statistics, RUNSTATS and, 449system-period temporal, 77–78table functions and, 196, 198–199table space version in, 121–123temporal, 71, 77, 201–207, 249, 252, 377–378temporary, 71, 79, 201–202types of, 71volatile, 81XML, 71, 81, 114–115, 127

Task Control Block (TCB), 509TCP/IP, 13, 19, 295, 296, 384, 389, 479TEMPLATE, 277–279Temporal tables, 71, 77, 201–207, 249, 252, 377–378

application period for, 204bitemporal, 204–205creating, CREATE TABLE and, 203–204querying, 205–206recovery and, 377–378special registers and, 206–207

Temporary tables, 71, 79, 201–202TERM UTILITY, 355–356Third Form Normal (3NF), 43Threads, 3, 285–288, 389

active, 288allied, 287, 288allocation of allied, 288allocation/deallocation in, 292commit processing and termination of, 289–290connection queuing and, 292

Page 30: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

588 Index

creating, 288–289database access (DBATs), 287, 290, 291, 292EDM pool and, 289INDOUBT, 286limits to, setting, 290–291managing, 287monitoring, DISPLAY THREAD and, 293–294performance of, 481pooled, 287–288, 290, 481resource allocation in, 289SQL statement execution in, 289storage of, 293termination of, 289–290timing out idle, 291types of, 287viewing, after recovery, 285–287

Thresholds, write, 493–495TIME, 44, 89Time Sharing Option (TSO), 11, 32Time Sharing Option/Extensions (TSO/E), 30Timeout, 254

threads and, 291TIMESTAMP, 44, 88–89Tivoli, 484, 498, 511TOCOPY, 362Tournament sort, 29, 489–490Trace, 3, 500–509

accounting trace in, 501–505audit trace in, 507. See also Auditingchanging IFCIDs for, MODIFY TRACE, 508classes, recommendations for, 509DB2, 500displaying options for, DISPLAY TRACE and, 508elapsed time in, 504generalized trace facility (GTF), 500global trace, 508invoking, START TRACE and, 508monitor trace in, 508performance trace, 477, 505–507response times in, 503statistics trace, 500–501. See also Statistics and

RUNSTATSstopping, STOP TRACE and, 508suspensions in, 504–505types of, 500wait times in, 504–505

Trace, audit, 326–328classes and events for, 327starting/stopping, 328viewing, with DISPLAY TRACE, 328

TRACKMOD, 58Transaction control, start ID, 93–94Transaction management, 6, 23, 344

coordinated updates and, 345recovery and, 344

Transition variable, 180Trigger packages, binding/rebinding, 228Triggers, 6, 21, 97–99, 249, 253

archive-enabled tables and, 208binding/rebinding and, REBIND and, 228creating, CREATE TRIGGER and, 98, 228global variables and, 183NO CASCADE in, 98

TRUNCATE, 23, 171, 173, 242Trusted connections, 321–324Trusted context, 305, 321–324, 327

authorities and privileges for, 316ownership and, 324

TSO, 14, 15, 16, 262, 263, 287, 323, 382, 386, 478attachment facility for, 17

TSO/E, 8Two-phase commit, 241–242Type modifiers, XML, 188–189

UUncommitted read (UR), 235–236, 253Uncorrelated subqueries, 162Unicode, 9, 87, 133, 138, 394UNION, 153, 154Unique business time index, 104Unique constraints, 94, 95, 388Unique index, 103–104Unique keys, 109Unit of recovery, 142, 284–285Unit of work, 23, 141–142, 248, 251Universal language interface (DSNULI), 18Universal table space, 50, 53–55UNIX, 15, 345, 510UNIX DDF, 8

Page 31: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

Index 589

UNLOAD and unloading data, 259–260, 274, 276, 335, 393, 409–415, 424–425, 468, 472

data sources form, 411–412delimited, 112–113DSNTIAUL and, 409–411LOB data, 413parallelism in, 413–414REORG to remove data in, 414REORG UNLOAD EXTERNAL/DISCARD, 414–415XML data, 413

Unqualified names, 317–318Unqualified objects, 314UPDATE, 6, 23, 42, 135, 136, 171, 172, 203, 242, 320,

327, 345, 386, 499authorities and privileges for, 308coordinating, two-phase commit and, 241–242correlated subqueries and, 166–167cost estimation using EXPLAIN, 546–547cursors and, 169, 170declared global temporary tables and, 202FOR UPDATE clause and, 161positioned, 161referential constraints and, 95triggers and, 97views and, 111, 174

Update rule, for constraints, 96Upgrades, 4User address spaces, 14User queries, statistics, RUNSTATS, 465User-defined data types, 175User-defined functions, 4, 6, 187, 196–197, 317

changing, ALTER FUNCTION and, 199creating, CREATE FUNCTION and, 187subqueries and, 166

UT* status, 270UTF8 and UTF16, 87Utilities, 3, 12, 33, 35, 38, 274–281

checking data, 275, 276commonly used, 274data management, 274–275DB2, 274–281DB2I execution of, 279DSNU command execution of, 279DSNUTILU stored procedure and, 276, 279execution of, 279loading/unloading data, 276

monitoring, DISPLAY UTILITY and, 280–281online, 274, 276recovery and, 275, 334–342, 346, 348, 355–356running, 276standalone, 274, 276, 339–342uses for, 274vendors of, 274

UTILITIES, 31

VVALIDATE, 318, 329VARBINARY, 43, 86, 89VARCHAR, 43, 86, 87, 89, 121VARGRAPHIC, 43, 86, 87, 89, 121Variables, 180–186

array, 185–186authorities and privileges for, 317dynamic SQL and, host, 181file reference, 182global, 182–185, 248, 251, 253host, 180–182indicator, 200LOB host, 181–182LOB locator, 182parameter marker, 180result set locator, 182session, built in, 185SQL, 180SQL parameter, 180SYSIBM.CLIENT_IPADDR, 185SYSIBM.PACKAGE_NAME, 185SYSIBM.TIME_FORMAT, 185SYSIBMADM.GET_ARCHIVE, 184SYSIBMADM.MOVE_TO_ARCHIVE, 184transition, 180XML host, 182

Vendors for utilities, 274Versioning, 225Vertical deferred write threshold (VDWQT), 493Views, 2, 6, 21, 110–111, 173–174

authorities and privileges for, 316changing, DROP VIEW and, 124creating, CREATE VIEW and, 110–111, 124, 174DELETE and, 111, 174INSERT and, 111restrictions on modifying data with, 173–174

Page 32: Index [editorial.mcpressonline.com]editorial.mcpressonline.com/web/mcpdf.nsf/wdocs/5154... · 2016. 6. 30. · Index 563 SCA structure and, 380 scheduling backups and data checks

590 Index

SELECT and, 110–111SELECT and, with AS clause, 150–151UPDATE and, 111, 174WITH CHECK option in, 174

Virtual Storage Access Method (VSAM), 18, 21, 45–46, 27, 339

COPY and copies in, 461moving, 391–392table spaces and, 49

Virtual Telecommunications Access Method (VTAM), 296, 479

Volatile tables, 81

WWait times, 504–505, 554Warning, auxiliary warning status, 266–267WebSphere, 11, 14, 15, 16, 345, 478, 510“Well-clustered” defined, 466WHEN, 320WHERE, 147, 159

aggregate functions and, 186DELETE and, 173subqueries with SELECT and, 161

Windows, 15, 345, 510WITH DEFAULT, 91WLM. See Workload Manager (WLM)Work file database, 37Workload, 4Workload Manager (WLM), 4, 8, 35, 37, 191, 200,

478–480address space for, 13–14performance and, 478–480unit of work in, 141–142

Workstations, access to, 307WRITE, 183Write Error Page Range (WEPR) status, 270Write operations, 493–495

horizontal deferred write threshold (DWQT) in, 493internal buffer pool thresholds and, 494–495thresholds for, 493–495vertical deferred write threshold (VDWQT) in, 493

XXES. See Cross System Extended (XES)XML, 4, 5, 6, 9, 36, 39, 44, 114–115, 132, 136, 251. See

also pureXMLapplication development environments for, 189changing objects in, 126–127data type for, 90expressions in, 188host variables for, 182index for, 103, 107–108, 127, 188loading, 395–396, 402–403pureXML and, 25, 187–189schema and, 188SELECT and, 148–149statistics, RUNSTATS and, 450table space for, 50, 57, 127, 369, 431, 459, 471, 475tables for, 71, 81, 114–115, 127type modifiers in, 188–189unloading, 413updating documents in, 188XPath and, 148–149XQuery and, 188

XML data type, 90XML index, 103, 107–108, 127, 188XML table spaces, 50, 57, 127, 369, 431, 471, 475

COPY and copies in, 459XML tables, 71, 81, 114–115, 127XMLSERIALIZE, 90XPath, SELECT, 148–149XQuery, 6, 188

YYEAR, 186

Zz/Architecture, 7–10zHPF. See high performance FICON (zHPF)zIIP. See System z Integrated Information Processor (zIIP)


Recommended