+ All Categories
Home > Documents > Download

Download

Date post: 15-Nov-2014
Category:
Upload: tess98
View: 638 times
Download: 2 times
Share this document with a friend
Description:
 
Popular Tags:
68
IBM Software Group DB2® UDB for z/OS V8 Technical Overview Bill Schray DB2 for z/OS Services Silicon Valley Laboratory [email protected]
Transcript
Page 1: Download

IBM Software Group

DB2® UDB for z/OS V8 Technical OverviewBill SchrayDB2 for z/OS ServicesSilicon Valley [email protected]

Page 2: Download

2

IBM Software Group | DB2 Information Management Software

Page 3: Download

3

IBM Software Group | DB2 Information Management Software

Themes in DB2® for z/OS V8

ReengineeringBreaking the limitsSQL function & DB2 familyPerformance enhancementsContinuous availability Indexing improvementsVery large databaseWebSphere & JavaSAP, PeopleSoft & Siebel

Page 4: Download

4

IBM Software Group | DB2 Information Management Software

Performance enhancements summary

Ability to use indexes more often More matching index predicates Index backward scan Index varying length Distribution statistics on non-index columns

Materialized Query TablesStar Join sparse indexMulti-row fetch & insertData sharing improvementsCost-based parallel sorting

Page 5: Download

5

IBM Software Group | DB2 Information Management Software

Continuous availability summary

Schema evolution:ALTER instead of DROP / CREATE

Data Partitioned Secondary Indexes (DPSI)System-level point in time recovery Improved LPL recoveryAdditional online DSNZPARMs

Page 6: Download

6

IBM Software Group | DB2 Information Management Software

SQL and DB2 family summary

Multi-row INSERT & FETCHGET DIAGNOSTICS INSERT within SELECT Identity column enhancementsSequencesDynamic scrollable cursorsCURRENT PACKAGE PATHScalar fullselectMaterialized Query TablesUnicode SQL, multiple CCSIDsXML publishing

Page 7: Download

7

IBM Software Group | DB2 Information Management Software

64-bit evolution

zSeries, z/OS, z/Architecture & large real storage

Real storage for performance Improve all versions V6 data space buffer pool

advantageszSeriesz/OS or OS/390 V2R1064-bit addressing

Next step 64-bit virtualSee z/OS 64-bit Virtual Storage Roadmap

Page 8: Download

8

IBM Software Group | DB2 Information Management Software

Move data objects up over the 2-GB bar Below 16 MB line 224 Below 2-GB bar 231 Above 2-GB bar 264

Hiperpools and data spaces no longer neededMost large storage areas moved above the barManagement of virtual storage is much simplerAllows increase in number of active threads

64-bit virtual

Page 9: Download

9

IBM Software Group | DB2 Information Management Software

64-bit virtual storage

24 31 64Line 2 Bar 2 2Above the bar

Buffer pools EDM pool Sort pool Rid pool Compression dictionaries IRLM locks

Real storage requirements probably increaseImprove scalability and availability

Page 10: Download

10

IBM Software Group | DB2 Information Management Software

Online schema evolution

Add a partition to the end of a tableRotate partitions (empty first, rotate to last)Extend CHAR(n) column lengthsChange type within character data types (CHAR, VARCHAR)

Increase column and change type within numeric data types (SMALLINT, INT, FLOAT, REAL, DOUBLE, DECIMAL)

Change type graphic data types(GRAPHIC, VARGRAPHIC)

Includes column data type changes for columns that are referenced within a view

Page 11: Download

11

IBM Software Group | DB2 Information Management Software

Online schema evolution ...

Includes column changes for indexed columnsAdd a column to an indexDrop the partitioning indexChange the clustering indexCreate or alter an index to have true varying length character columns within a key

Alter identity column attributesAlter sequence attributes

Page 12: Download

12

IBM Software Group | DB2 Information Management Software

Data-partitioned secondary index (DPSI)

Index physically partitioned on data page range like table

Number of parts in DPSI = number of parts in table Keys in part 'n' of DPSI refer only to rows in part 'n'

of tableAvailability and efficiency benefits

Eliminate REORG BUILD2 phase Improve index recovery Facilitate parallel partition processing Eliminate LOAD PART contention Reduce data sharing overhead

Page 13: Download

13

IBM Software Group | DB2 Information Management Software

Data-partitioned secondary index (DPSI) ...

But some tradeoffs for index use Need to check multiple partitions Not for unique indexes

Unbundling partitioned table attributes Partition without an index

May be able to have one less index Cluster on any index

May be able to have more efficient clusteringFor example

Partition by dateCluster by account

Alter the CLUSTER attribute

Page 14: Download

14

IBM Software Group | DB2 Information Management Software

Data-partitioned secondary index (DPSI) ...

• Partition data by month (PI is optional)• Clustering by id or name (DPSI clustering)• Ideal for online REORG with FASTSWITCH (V7)

Page 15: Download

15

IBM Software Group | DB2 Information Management Software

4096 partitionsMax number of parts raised from 254 to 4096

Table spaces and indexes Table space must have LARGE or DSSIZE to go beyond 254 parts

ALTER TABLE ... ADD PART adds partitions to the endMax table size remains 16TB for 4 KB pagesDataset naming convention

'Axxx' - partitions 1-999 'Bxxx' - partitions 1000-1999 'Cxxx' - partitions 2000-2999 'Dxxx' - partitions 3000-3999 'Exxx' - partitions 4000-4096

Max number parts allowed depends on page size and DSSIZE 4K page size, DSSIZE=1GB, 4096 parts allowed, 4TB max table size 4K page size, DSSIZE=64GB, 256 parts allowed, 16TB max table size

Page 16: Download

16

IBM Software Group | DB2 Information Management Software

Data sharing enhancements

Batching of GBP writes and castouts Write / castout multiple pages in a single CF operation Improved data sharing performance, especially for batch

updates Requires z/OS R4, CFLEVEL=11

Reduced global lock contention for tablespace L-locks IX / IX and IX / IS TS locks no longer hit XES-level

contention across members Improved data sharing performance, especially for OLTP Reduced weight behind commendation for

RELEASE(DEALLOCATE)

Page 17: Download

17

IBM Software Group | DB2 Information Management Software

Data sharing enhancements ...Changed pages written to GBP at Phase 1 instead of Phase 2

Some transaction managers spawn other transactions at SYNCPOINT

Spawned transactions can encounter "record not found" if it tries to read originating transaction's update from another member

Rare, but a few customers have reported it Moving writes up to phase1 by default; removes

need to monitor for this and to set IMMEDWRITE PH1 DSNZPARM or BIND option if needed

Equivalent performance for phase 1 vs. phase 2 writes

Page 18: Download

18

IBM Software Group | DB2 Information Management Software

Data sharing enhancements ...

Automatic LPL recoveryRestart light to resolve in-doubt threadsMore efficient index leaf page split processingDDF server location alias support e.g.,

GROUP A = member 1, member 2, member 3, member 4

IMS is only on member 2 and member 4 GROUP AI could be configured as = member 2 and

member 4, then applications that need IMS could connect to GROUP AI

Castout buffers above 2-GB bar

Page 19: Download

19

IBM Software Group | DB2 Information Management Software

System level PIT recovery

Easier, more efficient, less disruptiveTwo new utilities are introduced

BACKUP SYSTEM RESTORE SYSTEM

New HSM construct called a COPYPOOL Named set of SMS storage groups Each DB2 system defines one COPYPOOL for data,

one for logs z/OS 1.5

New DFSMS construct called "copy target" storage group

Storage group reserved to be target of FlashCopy

Page 20: Download

20

IBM Software Group | DB2 Information Management Software

Utility improvements

Support for schema evolution ROTATE partitions REBALANCE

Online REORG enhancements DISCARD Avoid BUILD2 with DPSI REORG DB2 catalog SHRLEVEL REFERENCE

LOAD & UNLOAD support for delimited filesSCOPE PENDING

Page 21: Download

21

IBM Software Group | DB2 Information Management Software

Breaking the limits

31 64Virtual storage 2 GB 2 to 2Table name sizes 18 to 128VIEW & ALIAS names 18 to 128Column name sizes 18 to 30Partitions 254 to 4096SQL statement length 32K to 2 MBIndex key size 255 to 2000Character Literals 255 to 32704Hex literal digits 255 to 32704Predicates 255 to 32704

Page 22: Download

22

IBM Software Group | DB2 Information Management Software

Breaking the limits ...

Tables in a join 15 to 225Active logs 31 to 93Archive logs 1000 to 10,000Current optimization 8 to 128CURRENT PACKAGESET 18 to 128CURRENT PATH 254 to 2048CURRENT SQLID 8 to 128USER (SCHEMA) 8 to 128

Page 23: Download

23

IBM Software Group | DB2 Information Management Software

Multi-row INSERT

Inserts multiple rows on one API callCan be ATOMIC or NOT ATOMICCan be static or dynamic SQLSignificant performance boost

Page 24: Download

24

IBM Software Group | DB2 Information Management Software

Multi-row INSERT ...

Page 25: Download

25

IBM Software Group | DB2 Information Management Software

Multi-row FETCH

Returns multiple rows on one API crossing"Wide" cursor with locks on multiple rowsSupports scrollable and non-scrollableSupports static and dynamic SQLSignificant performance boost

Page 26: Download

26

IBM Software Group | DB2 Information Management Software

Positioned UPDATE/DELETE of multi-row FETCH

Allows positioned UPDATE or DELETE to be used on a "wide" cursor

Page 27: Download

27

IBM Software Group | DB2 Information Management Software

GET DIAGNOSTICS

Returns SQL error information for overall statement for each condition (when multiple errors occur)

Supports SQL error message tokens greater than 70 bytes (SQLDA limitation)

Page 28: Download

28

IBM Software Group | DB2 Information Management Software

INSERT within SELECT

Elegant technique for retrieving values created or modified by DB2 during INSERT

Identity columns, sequence values User-defined defaults, expressions Columns modified by triggers ROWIDs

Page 29: Download

29

IBM Software Group | DB2 Information Management Software

Identity column improvements

ALTER support for identity columns RESTART WITH value INCREMENT BY MINVALUE MAXVALUE CYCLE/NO CYCLE CACHE/NO CACHE

Page 30: Download

30

IBM Software Group | DB2 Information Management Software

SequencesUseful for porting Oracle applicationsNew SQL support:

CREATE SEQUENCE ALTER SEQUENCE

RESTART WITH valueINCREMENT BYMINVALUEMAXVALUECYCLE/NO CYCLECACHE/NO CACHE

GRANT/REVOKE privileges for the sequence object NEXTVAL PREVVAL

Page 31: Download

31

IBM Software Group | DB2 Information Management Software

Dynamic scrollable cursors

Scrollable cursor that provides access to base table rather than workfile -- allows viewing of updates by other users

Defaults to single row fetch, so DDF applications should use:

Multi-row FETCH Positioned update / delete for multi-row FETCH

Page 32: Download

32

IBM Software Group | DB2 Information Management Software

CURRENT PACKAGE PATHImportant for SQLJ and DDF applications

Less need for SET CURRENT PACKAGESET Less network traffic for multiple PKLIST values Easier to switch to / from JDBC and SQLJ Better handling of nested stored procedure

packagesAllows application to specify search list of package schemas (similar to PKLIST)

Page 33: Download

33

IBM Software Group | DB2 Information Management Software

Scalar fullselect

Allows scalar fullselect where expressions were previously supported

Page 34: Download

34

IBM Software Group | DB2 Information Management Software

Materialized query tables (MQT)

Previously known as "automatic summary tables"Optimizer can now rewrite queries to access MQT instead of the base table / view

Significant performance improvementTwo types of MQTs

System-maintained via SQL REFRESH statement User-maintained via triggers, batch updates, etc.

Page 35: Download

35

IBM Software Group | DB2 Information Management Software

Without MQT: each query re-computes

Page 36: Download

36

IBM Software Group | DB2 Information Management Software

With MQT: avoid redundant computation

Page 37: Download

37

IBM Software Group | DB2 Information Management Software

Enhanced Unicode support

String data in DB2 catalog now stored in Unicode Allows SQL to contain Unicode literals and names Provides better integration with Java and Microsoft

technologiesImportant to key ISVs (SAP, PeopleSoft, Siebel, ...)

Page 38: Download

38

IBM Software Group | DB2 Information Management Software

Multiple CCSIDs per statement

A single SQL statement can now intermix EBCDIC, ASCII and Unicode tables and host variables

Unlike host variables are translated to column CCSIDUnlike column CCSIDs are "promoted" to Unicode

May require query to be materialized / sorted

Page 39: Download

39

IBM Software Group | DB2 Information Management Software

Volatile table support

Forces index access for tables that have unpredictable cardinality

Significant performance improvement for some SAP applications

Page 40: Download

40

IBM Software Group | DB2 Information Management Software

Star join sparse indexes

Optimizer improvement that addresses the same requirement as hash join

ACCESS_TYPE='T' in PLAN_TABLE Uses sparse index to process the contents of work

file Improves upon APAR PQ61458 on V7

Page 41: Download

41

IBM Software Group | DB2 Information Management Software

XML publishing functions

New built-in functions for generating XML output XMLELEMENT XMLATTRIBUTES XMLFOREST XMLCONCAT XMLAGG XML2CLOB

Page 42: Download

42

IBM Software Group | DB2 Information Management Software

Query example

Page 43: Download

43

IBM Software Group | DB2 Information Management Software

Parallel sort

Optimizer is enhanced to use parallel sort for multiple tables when cost tradeoff is advantageous

Page 44: Download

44

IBM Software Group | DB2 Information Management Software

Stage 1 indexable unlike types and lengths

Allow index access when host variable and target column are not the same data type and length

Examples Column is DECIMAL, host variable is FLOAT Column is CHAR(3), literal or host variable is

CHAR(4)Deals with programming languages that do not support the full range of SQL data types and / or lengths

C/C++ has no DECIMAL datatype Java has no fixed length CHAR datatype

Page 45: Download

45

IBM Software Group | DB2 Information Management Software

Stage 1 indexable unlike types and lengths…

Can be used with transitive closureSignificant performance improvement for many applications

Simplifies application programmer & DBA tasksSome restrictions still remain for stage 1, indexable

Page 46: Download

46

IBM Software Group | DB2 Information Management Software

SQL statements up to 2MB

SQL statements can now be up to 2MB in lengthParse tree has been completely rearchitected to reduce SQLCODE -101 scenarios due to SQL statement length

Important for SQL Procedure Language applications

Page 47: Download

47

IBM Software Group | DB2 Information Management Software

SQL Procedure Language

RETURN statementSIGNAL / RESIGNAL supportCREATE PROCEDURE up to 2 MBIntegrated debuggerGET DIAGNOSTICS for all fields in SQLCA

Page 48: Download

48

IBM Software Group | DB2 Information Management Software

Other SQL improvements

GROUP BY expression SELECT A+B, C FROM T ORDER BY A+B GROUP

BY A+BQualified column names on SET clause

UPDATE T1 SET T1.COL1...Qualified column names on INSERT

INSERT T1.COL1 INTO T1 VALUES...Multiple DISTINCT clauses

SELECT COUNT(DISTINCT(A1)), AVG(DISTINCT(A2)) FROM T2

Page 49: Download

49

IBM Software Group | DB2 Information Management Software

Table function improvements

CARDINALITY clause SELECT * FROM TABLE(TABUDF(C2)

CARDINALITY 30) AS ABCPerformance improvement to move data between table functions and DB2 using block data movement

Page 50: Download

50

IBM Software Group | DB2 Information Management Software

Trigger performance

AFTER TRIGGER work files are eliminated when old / new transition variables are returned for 3 rows or less

Page 51: Download

51

IBM Software Group | DB2 Information Management Software

Multi-level security (MLS) by row

Table has column defined AS SECURITY LABEL Each row value has a specific security label Get security labels from RACF Save in rows for INSERT, UPDATE, LOAD, ...

Check for each new security label value accessed If access is allowed, then normal access If access is unknown, data not returned

Runtime user to data checkingSecurity label values are cached to minimize CPU

Page 52: Download

52

IBM Software Group | DB2 Information Management Software

Multi-level security (MLS) by row ...

Page 53: Download

53

IBM Software Group | DB2 Information Management Software

Multi-level security (MLS) by row ...

Page 54: Download

54

IBM Software Group | DB2 Information Management Software

Multi-level security (MLS) by row ...

Session variables set by connection or signon exitUse built in function to retrieve value for a variableUse function in views, triggers, stored procedures &constraints to enforce security policyCan have more general, flexible access checks

Multiple columns, AND / OR logic, ...Complements other security mechanisms

Page 55: Download

55

IBM Software Group | DB2 Information Management Software

New special registers

Client information for this connectionProvided by sqleseti, Java, RRS SIGNONAccounting string

CLIENT ACCTNGValue of the application name

CLIENT APPLNAMEClient user ID

CLIENT USERIDWorkstation name

CLIENT WRKSTNNAME

Page 56: Download

56

IBM Software Group | DB2 Information Management Software

New built-in functionsENCRYPT

Encrypt a column in a table with a user-provided encryption password

ENCRYPTION PASSWORD special registerDECRYPT_BINDECRYPT_CHARGET_HINT

Obtain hint to help remember ENCRYPTION PASSWORD

GENERATE_UNIQUE Creates a CHAR(13) FOR BIT DATA value that is

unique across the Sysplex

Page 57: Download

57

IBM Software Group | DB2 Information Management Software

Stored procedures & RRS

Stored procedures improvements WLM management of TCBs TCBs are added / removed based on WLM

recommendations MAX FAILURES on CREATE PROCEDURE Integrated debugger for SQL procedure language COMPJAVA (HPJ) is replaced by interpretive Java

RRS support for CAF migration CAF-style "implicit" connection support

Page 58: Download

58

IBM Software Group | DB2 Information Management Software

Distribution statistics on non-indexed columns

RUNSTATS improvement that allows optimizer to consider non-uniform distribution statistics on columns that are not part of an index

Current technique is separate DSTATS programSignificant performance improvement

Page 59: Download

59

IBM Software Group | DB2 Information Management Software

ODBC improvements for USS

CONNECT with USERID/PASSWORDUnicode

Page 60: Download

60

IBM Software Group | DB2 Information Management Software

Intelligent Visual Explain

Significant improvements to the Visual Explain tool: More detailed information about access path More statistical details for each node in the graph Ability to send XML output describing the query

access path selected

Page 61: Download

61

IBM Software Group | DB2 Information Management Software

Network computing improvements

Encryption of data flowing on the wireCDB improvements for data sharing member routingLOCATION aliases at requester and serverExtended DESCRIBE for CLI and JavaLOB streamingSQL CancelAuto-close for WITH HOLD cursorsReduced block FETCH CPU costReduced TCP/IP CPU cost

Page 62: Download

62

IBM Software Group | DB2 Information Management Software

Aggregated accounting data

RRS attach and DDF accounting records can now be aggregated based on:

End user's ID (QWHCEUID)End user transaction name (QWHCEUTX)End user workstation name (QWHCEUWN)

JDBC, SQLJ, RRS attach, and DDF are all enhanced to accept the above values any time during unit of work

ZPARM for controlling aggregation DSN6SYSP ACCUMACC Aggregation can be turned on / off dynamically

Page 63: Download

63

IBM Software Group | DB2 Information Management Software

Enhanced IFC records

New statistics values Q3STHWIB - IDBACK high water mark Q3STHWIF - IDFORE high water mark Q3STHWCT - CTHREAD high water mark QLSTHWMD - MAXDBAT high water mark QLSTHWMC - CONDBAT high water mark

SQL counts added to package level accountingPackage information added to deadlock and timeout records (0172, 0196)

Page 64: Download

64

IBM Software Group | DB2 Information Management Software

DB2 Universal Driver for SQLJ/JDBCType 2 and Type 4 driver

OS/390, z/OS, Unix, Linux, WindowsUpdated to support JDBC/SQLJ 3.0 standard

Savepoint support Connection pooling improvements

Reusing PreparedStatementsStandard connection pool propertiesReset of server connection at getConnection

New metadata for PreparedStatements Return autogenerated keys Multiple open ResultSets for a single stored procedure WITH HOLD cursors Improved BLOB/CLOB support

Page 65: Download

65

IBM Software Group | DB2 Information Management Software

DB2 for z/OS V8DB2 and IRLM will be 64-bit exclusiveBase prerequisites:

zSeries z800, z900 or later z/OS R3 or above

Major catalog changes: Long fields Unicode

Migration process: From Version 7 only Multi-step process V7 and V8 data sharing

coexistence supported in Compatibility Mode only

Page 66: Download

66

IBM Software Group | DB2 Information Management Software

DB2 V8 catalog

Longer names (128 byte varchar Unicode) Table, view & alias Column (30) Schema or authorization id UDF, stored procedures, triggers, package

Some page sizes greater than 4K 4K, 8K, 16K, 32K pages in DB2 catalog

Indexes longer than 255 bytesContains Unicode data

Page 67: Download

67

IBM Software Group | DB2 Information Management Software

Four step process for migration

Test with new install & migrateApply the fallback SPE to all members

Start all members at SPE levelMigrate to new release without new function (Compatibility Mode)

Enable New Function Mode Then in New Function Mode

Page 68: Download

68

IBM Software Group | DB2 Information Management Software

Primary incompatible changes

Use valid host variable declaration for PREPAREValid VCAT required no x.y (V5 and up)No COMPJAVA, use JITCREATE, ALTER PROCEDURE are WLM onlyUnicode used in DB2 catalog, changes order

SQL statements, translation, lengths may change, instrumentation

DB2 Universal Driver for SQLJ/JDBCSQLJ preparationIndex default is variable length, NOT PADDEDREORG SORTDATA and SORTKEYS defaultREORG implicit clustering index


Recommended