Db2 Components & Basics 1
Db2 Components & Basics 1
Db2 Components & Basics 1
After completing this unit, you should be able to describe the main components of a DB2 environment and the roles they play: Users Data Programs (Static, Dynamic) System
RDBMS facilities
Integrity Dynamic definition of DB2 objects Active catalog Recovery / restart Continuous operations Security Interactive tools
Spiffy Computer Ser. Div. Planning Information Center Manufacturing System Development Center
QMF / SPUFI
Copyright IBM Corporation 2007
GET ... MOVE ... SELECT LASTNAME FROM EMP WHERE EMPNO = :EMPNO
Spiffy Computer Ser. Div. Planning Information Center Manufacturing System Development Center
EMP NR ?
EMP NR ? 000050
LASTNAME : Geyer
Geyer
E01
1972-02-02 ...
Spiffy Computer Ser. Div. Planning Information Center Manufacturing System Development Center
DL/1 VSAM
GET MOVE
EMP NR ? 000050
EXECUTE
PUT
LASTNAME : Geyer
Geyer
E01
1972-02-02 ...
Spiffy Computer Ser. Div. Planning Information Center Manufacturing System Development Center
DL/1 VSAM
GET
EXECUTE
PUT
Geyer
COMMIT
1000 4000
UPDATE B
1000 4000
ROLLBACK
1000 4000
Copyright IBM Corporation 2007
2000 3000
Trxa
Appl1 Trx2
Prog1
Trx1
DB2 receives MANY requests from MANY user programs to access potentially the SAME data Besides USER PROGRAMS, DB2 also receives requests from UTILITIES
Copyright IBM Corporation 2007
Utilities
COPY
IMAGE COPY
REORG
LOAD
SEQUENTIAL DATASET
Work at the OBJECT level Run in BATCH Compete with user programs for resources Specify your requirements using CONTROL STATEMENTS mostly
Copyright IBM Corporation 2007
STOP
Pierre
OK
Jan
1
UPDATE
EXCLUSIVE LOCK
Row
STOP
3
COMMIT
OK
SHARED LOCK
SELECT
...
4
DB2 must maintain data integrity and also provide maximum concurrency
Copyright IBM Corporation 2007
X Program
UPDATE INSERT Log Buffer COMMIT
X ASYNC
XXX SYNC
LOG DATASET
X X X
before
Copyright IBM Corporation 2007
after
COPY/RECOVER Utilities
UPDATE
UPDATE
DELETE
RECOVER
Log Time
COPY
DISK CRASH
IMAGE COPY
Copyright IBM Corporation 2007
DB2
Optimizer
Load Module
EXECUTION
Access Path
Catalog Statistics
DB2 must translate a users or programs SQL request into ACCESS STRATEGIES
Copyright IBM Corporation 2007
SQL
DB2 CATALOG
Data Definitions
Security Definitions
Recovery Information
z/OS DB2
z/OS DB2
z/OS DB2
z/OS DB2
Improved availability Huge queries feasible SYSPLEX hardware required Single shared catalog
Unit Summary
Having completed this unit, you should be able to describe the main components of a DB2 environment and the roles they play: Users Data Programs (Static, Dynamic) System