Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Â
DB2 V10 Migration Guidance
1. Getting to DB2 10 for z/OS
Migration Considerations
align
Craig S. Mullins
Mullins Consulting, Inc.
http://www.craigsmullins.com
Š 201 1 M u llins C ons u lting, Inc.
2. Author
This presentation was prepared by:
Craig S. Mullins
President & Principal Consultant
Mullins Consulting, Inc.
15 Coventry Ct
Sugar Land, TX 77479
Tel: 281-494-6153
Fax: 281.491.0637
E-mail: craig@craigsmullins.com
This document is protected under the copyright laws of the United States and other countries as an unpublished work. Any use or
disclosure in whole or in part of this information without the express written permission of Mullins Consulting, Inc. is prohibited.
Š 2011 Craig S. Mullins, Mullins Consulting, Inc. All rights reserved.
Š 201 1 M u llins C ons u lting, Inc. 2
3. Abstract
The pressure is on for organizations to migrate from DB2 V8 or V9 to DB2 10.
A migration can be a traumatic thing⌠Iâm sure many of us still remember
migration from V7 to V8. But it doesnât have to be such a burden!
Getting to DB2 10 should be less problematic, but we must be sure to plan
appropriately, learn lessons from past migrations, and be prepared. This
session will offer guidance on migration issues and concerns and along the way
we will discuss topics such as:
â˘Skip Level Migration
â˘Deprecated Features
â˘Rebinding and Dealing with Access Path Changes
If your organization is considering moving to the next level of DB2 then this
presentation will provide an insight into making the job easier with a lot less
pain.
Š 201 1 M u llins C ons u lting, Inc. 3
4. Agenda
⢠Overview
⢠Migration Issues and Concerns
⢠Skip Level Migration
⢠Deprecated Features
⢠Access Paths
⢠New Features
⢠Changed Access Paths
⢠Categorizing Changes
Š 201 1 M u llins C ons u lting, Inc. 4
5. DB2 10 for z/OS
⢠DB2 10 for z/OS was released for GA on October 19, 2010.
⢠Highlights of the release include:
â Out-of-the-box reduction in CPU utilization and from 5 to 10 times more concurrent users on
a single DB2 subsystem (as compared to DB2 9; results based on early customers and internal IBM testing)
â Greater concurrency for data management, data definition, and data access, including
additional online changes for data definitions, utilities, and subsystems
â Improved security with better granularity for administrative privileges, data masking, and
audit capabilities
â Temporal or versioned data to understand system and business times at the database level
â Hashed indexes
â pureXML⢠and SQL enhancements to simplify portability from other database solutions
â Productivity improved for database administrators, application programmers, and systems
administrators
â Many QMF improvements
⢠âŚand there are a lot of optimizer enhancements and performance
improvements that you wonât get without a REBIND.
Š 201 1 M u llins C ons u lting, Inc. 5
6. Migration Issues
⢠In August 2010, IBM announced the end of service for DB2 for z/
OS Version 8
â In the announcement letter (910-169) IBM indicates that the date for EoS
will be April 30, 2012.
â This is less than a year and a half away.
DB2 Version GA Date EoM Date EoS Date
7 March 30, 2001 March 5, 2007 March 30, 2008
8 March 26, 2004 September 8, 2009 April 30, 2012
9 March 16, 2007
10 October 22, 2010
EoS: End of Service EoM: End of Marketing
Š 201 1 M u llins C ons u lting, Inc. 6
7. Issues and Conclusion
⢠Many sites are still running DB2 Version 8
⢠IBM is offering skip level migration
â DB2 V8 ď DB2 9 ď DB2 10
⢠Of course, you can also migrate to 10 from 9
â DB2 9 ď DB2 10
⢠2011 will be a year of many migrations
â DB2 V8 to DB2 9
â DB2 V8 to DB2 10
â DB2 9 to DB2 10
n d if y o u a r e s t il l o n V 7 o r e a r l ie r , y o u a r e W AY o v e r d u e t o u p d a t e !
Š 201 1 M u llins C ons u lting, Inc. 7
8. Migration Concerns
⢠Issues with skipping a DB2 version
⢠Regular issues with any version migration
â System pre-requisites
⢠System software versions
(z/OS, IMS, CICS, programming languages, etc.)
⢠Fallback PTF
â Deprecated features?
â Defaults changed?
â Building a migration plan
⢠Vendor support?
⢠Test Implementation Plan
⢠Moving to Production
â Validation
â Access path changes?
Š 201 1 M u llins C ons u lting, Inc. 8
9. Skipping DB2 9?
⢠Should you skip from V8 to 10?
â Gauge your organizationâs âbleeding edgeâ tolerance
⢠DB2 10 is still very new; You are on an older version of DB2âŚ
why?
⢠DB2 10 will have more defects at first, then fewer as the
software matures (and DB2 9 is mature, at this point)
â Are there features in DB2 10 that compel you to move
more quickly to it?
â A skip migration project requires a longer timeline, and
involves more risk
â Are there organizational hurdles?
⢠Training â for two versions, not just one!
⢠If you make an informed, educated decision,
migrating directly to DB2 10 from V8 can be a smart
move.
Š 201 1 M u llins C ons u lting, Inc. 9
10. Check the Pre-requisites
⢠Read the information APAR
⢠Read the Whatâs New manual
â GC19-2985-01
⢠Read the Technical Overview redbook
â SG24-7892
⢠System pre-requisites
â System software versions
(z/OS, IMS, CICS, programming languages, etc.)
â Fallback PTF
⢠New Reserved Words
⢠PERIOD
⢠ORGANIZATION
⢠ZONE
Š 201 1 M u llins C ons u lting, Inc. 10
11. Deprecated Features (9 â 10)
⢠Private Protocol Distribution
â No surprise since IBM has been indicating this was on its way out for a number of
releases now. Not too difficult to convert to DRDA (some help w/DSNTP2DP).
⢠ACQUIRE(ALLOCATE) is no longer supported for BIND | REBIND PLAN
â Rebind with ACQUIRE(USE)
⢠REBIND plans & packages that havenât been rebound since V5 or before.
⢠EXPLAIN tables prior to V8 format are no longer supported
(ď UNICODE)
â Information APAR PK85068.
⢠DB2 MQ XML functions and the DB2 XML Extender no longer supported
â Use pureXML.
⢠DB2 Management Clients no longer supported
(DB2 Administration Server, Control Center, and Development Center)
â Data Studio is IBMâs new management client
⢠BookManager no longer supported
â Instead use the PDF versions and/or the Info Center online.
Š 201 1 M u llins C ons u lting, Inc. 11
12. No Longer Suppored: Plans w/DBRMs
⢠As of DB2 10, plans containing DBRMs are no
longer supported
â MEMBER parameter is no longer supported for BIND | REBIND PLAN
â You will have to convert the DBRMs to packages.
⢠REBIND PLAN(X) COLLID(*)
â "*" is the default value
⢠It creates DSN_DEFAULT_COLLID_X (where X is the plan name)
â This enables customer to convert plans with DBRMs bound directly
into them into packages under a collection ID
(DSN_DEFAULT_COLLID_X) automatically.
Š 201 1 M u llins C ons u lting, Inc. 12
13. Deprecated Features (V8 â 9)
⢠Donât forget that if you are skipping from V8 to 10 then you
need to consider the features deprecated for DB2 9, too!
â AIV Extender, Text Extender, and Net Search Extender are removed.
â Net.Data, stabilized at V7, is removed.
⢠WebSphere is IBMâs strategic solution for getting DB2 data to Web applications.
â DB2 Estimator is not provided for DB2 9.
â DB2-managed stored procedure support is removed.
â Simple table space creation support is removed.
â JDBC/SQLJ Driver for OS/390 and z/OS support is removed.
Š 201 1 M u llins C ons u lting, Inc. 13
14. The DB2 Catalog
⢠The Catalog is SMS-managed as of DB2 10.
⢠Links are removed from the DB2 Catalog and Directory.
⢠More usage of LOBs.
â SYSVIEWS.TEXT, SYSTRIGGERS.TEXT,
SYSROUTINES_SRC.CREATEMST, and SYSPACKSTMT.TEXT
⢠Many more table spaces.
â Table â 1 to 1 â Table Space
⢠Each table is in its own partition-by-growth
table space in new-function mode
⢠Each table space uses row-level locking,
and all tables are in reordered-row format.
⢠And for skip-level migration:
â Donât forget the V8 to DB2 9
changes to the DB2 Catalog!
Š 201 1 M u llins C ons u lting, Inc. 14
15. DSNZPARMs
⢠Be sure to include a review of your DSNZPARM
settings in your migration plan.
â New DSNZPARMs
⢠e.g.) CATDDACL, CATDMGCL, CATDSTCL
â Deprecated DSNZPARMs
⢠e.g.) STATCLUS, SEQCACH, etc.
â Removed DSNZPARMs
⢠e.g.) PARTKEYU, TABLES_JOINED_THRESHOLD, etc.
â DSNZPARMs with new default values
⢠e.g.) CHKFREQ
â Old default: 500,000 records
â New default: 5 minutes
⢠Any/all of these can impact
your DB2 subsystem
Willie Faveroâs blog at http://it.toolbox.com/blogs/db2zos/ has several great articles on this topic.
Š 201 1 M u llins C ons u lting, Inc. 15
16. DB2 10:
BIND & Access Path Stuff
⢠Ability to EXPLAIN existing packages
â Command: BIND PACKAGEâŚEXPLAIN (ONLY)
⢠Works for all packages.
â SQL: EXPLAIN PACKAGE
⢠The package being explained must have been created in DB2 9 or above.
â Older packages cannot be explained like this!
⢠CURRENT EXPLAIN MODE special register
â Controls how EXPLAIN behaves for eligible dynamic SQL (SELECT,
INSERT, and the searched form of UPDATE and DELETE).
⢠NO - turns off capture of EXPLAIN information. (default)
⢠YES - turns on capture of EXPLAIN information; plan tables will be updated.
⢠EXPLAIN - this option is the same of YES. However, the dynamic SQL
statements are not executed.
⢠New authority that can be granted: EXPLAIN
Š 201 1 M u llins C ons u lting, Inc. 16
17. DB2 10:
BIND & Access Path Stuff
⢠New DB2 10 feature: Safe Query Optimization
⢠The DB2 Optimizer now considers the uncertainty of
predicate filtering when selecting an index.
â Previously, overestimating the filtering of a predicate was
possible when the value of a host variable was not known
(i.e. no literal).
â As of DB2 10, when indexes have a close cost estimate, the
DB2 Optimizer factors in the uncertainty of matching and
screening predicates.
Š 201 1 M u llins C ons u lting, Inc. 17
18. Access Path Changes
⢠Access Paths
â This is perhaps the most time-consuming and worrisome aspects of
DB2 version migration.
â A new version typically means Optimizer enhancements.
â And that means changes to access paths!
â Changes that occur are not always predictable
⢠There may be trends that you can anticipate, though
â Other migration issues can cause
access path changes, too
⢠Statistics changes
⢠Environment changes
Š 201 1 M u llins C ons u lting, Inc. 18
19. Additional DB2 10
REBIND Issues
⢠Incremental Rebinds
⢠DB2 incrementally rebinds static SQL statements that use
parallelism after migration to Version 10.
â Incremental rebinds can cause performance degradation, so you
should manually rebind those statements.
⢠A query in DSNTIJPM is provided that you can run to determine
which statements can use parallelism.
⢠Thread Constraint Relief
⢠DB2 10 improves the number of concurrent threads that can be
running. To get this relief, though, you must REBIND.
â After you REBIND, the work areas are moved above the bar.
Š 201 1 M u llins C ons u lting, Inc. 19
20. Remembering V7 ď V8 ?
⢠DB2 Version 8 had many typical access path changes that
could be anticipated based on trends
⢠Most organization had the same type of changes
⢠For example:
ď§ Matching Index Scan ď TS Scan (for small tables)
ď§ Non-matching Index Scan ď TS Scan (for large indexes)
⢠So special rules could be applied
based on the trends
Š 201 1 M u llins C ons u lting, Inc. 20
21. DB2 9 and 10 are different
⢠It is true that a migration to DB2 9 typically causes
access path changes, butâŚ
â Different types of changes in every installation
â A general set of special rules is not really applicable
⢠DB2 10 exhibits similar behavior
Š 201 1 M u llins C ons u lting, Inc. 21
2
1
22. Categorize Access Path Changes
⢠Why?
â Reduction of manual effort
â Typically, in a migration scenario,
between 10% to 35 % of all
SQL statements experience
changed access paths
â The good newsâŚ
⢠Many changes can be ignored
Š 201 1 M u llins C ons u lting, Inc. 22
2
2
23. Access Paths Rely on Statistics
⢠Always remember that access paths rely on statistics
⢠The better the statistics, the better the DB2 Optimizer can
be at determining the appropriate access paths
⢠If you are going from V8 to 10: keep in mind
â Between DB2 V8 and DB2 9
⢠The algorithm used for RUNSTATS changed.
⢠Different âopinionâ as to what is clustered.
⢠When will you update RUNSTATS?
⢠Always a good idea, though:
â Save performance and access path information
â To be able to compare before and after
Š 201 1 M u llins C ons u lting, Inc. 23
24. Letâs Talk (briefly) About
Rebinding and Access Paths
Š 201 1 M u llins C ons u lting, Inc. 24
25. When Are Access
Paths Changed?
Application
Development
Program changes:
BIND is required
Maintenance
Statistics change:
REBIND after RS
Optimizer changes:
REBIND
New DB2 Release
Version or PTF
Š 201 1 M u llins C ons u lting, Inc. 25
2
5
26. Migration Scenario
New DB2
Release or PTF
No Program changes
No Statistic changes *
Optimizer changes
(* depending on your strategy)
Š 201 1 M u llins C ons u lting, Inc. 26
27. Version Migration Concerns
Typically, it is not a hard & fast requirement to REBIND all
of your packages and plans when you move to a new
version of DB2.
âş However, it is a really good idea to REBIND the most critical.
There are a lot of optimizer enhancements and performance
improvements that you wonât get without a REBIND.
And there are some REBINDs you cannot avoid.
âş For DB2 9, plans and packages from DB2 V4 or earlier will be automatically
rebound when accessed by DB2 9.
âş For DB2 10:
ď§ Plans and packages from DB2 V5 or earlier will be automatically rebound when
accessed by DB2 10.
ď§ Plans bound with DBRMs are automatically rebound to convert it to a PKLIST and the
DBRMs are bound into packages.
Š 201 1 M u llins C ons u lting, Inc. 27
28. Additional Information
⢠IBM DB2 main web page:
http://www.ibm.com/software/data/db2/zos/
⢠DB2 10 web page:
http://www.ibm.com/software/data/db2/zos/db2-10/
⢠DB2 Information Center: http://www.ibm.com/support/docview.wss?
uid=swg27019288
⢠DB2 for z/OS IBM Redbooks:
http://www.redbooks.ibm.com/cgi-bin/searchsite.cgi?
query=DB2+AND+z/OS&SearchOrder=4&SearchFuzzy=
Š 201 1 M u llins C ons u lting, Inc. 28
29. Summary
Learn the changes
Understand the impact
Plan ahead
REBIND for
performance
Do one thing at a time and;
You can migrate to DB2 10!
Š 201 1 M u llins C ons u lting, Inc. 29
30. Contact Information
http://www.craigsmullins.com/dba_book.htm Craig S. Mullins
Mullins Consulting, Inc.
15 Coventry Court
Sugar Land, TX 77479
http://www.craigsmullins.com
craig@craigsmullins.com
Phone: (281) 494-6153
http://www.craigsmullins.com/cm-book.htm
Š 201 1 M u llins C ons u lting, Inc. 30
Notas do Editor
August 3, IBM announced the end of service (EoS) for DB2 for z/OS Version 8 in IBM announcement letter 910-169 here in the US. That announcement letter states that DB2 for z/OS Version 8 (5625-DB2) , DB2 for z/OS Version 8 Value Unit Edition (VUE) (5697-N29), and DB2 Utilities Suite for z/OS Version 8 (5655-K61) will all be going out of service on April 30, 2012.
DB2 10 supports migration from DB2 9 NFM or from V8 NFM. IBM estimates that about one customer in five migrated using a skip version technique for V5 to V7, and they anticipate a similar number will go from V8 to 10. Why is the migration project for skipping larger? Well, testing and rollout are only a little bit bigger than a single version migration (due to the additional features of 2 versions instead of 1). But education and remediation work will probably be close to double. A good project plan estimate is about 150% of a single release migration. Timing is crucial here; if the project is delayed too long not only will you miss out on improvements in DB2 9 that could have been implemented, but if you extend past April 30, 2012, you may need to pay for extended service on DB2 V8.
Also deprecated are: -- XML Extender [change to use pureXML data type] -- DB2 MQ XML user-defined functions and stored procedures [change to XML functions] -- DB2 Management Clients (DB2 Administration Server, Control Center, and Development Center) are deprecated. IBM's new management client direction for DB2 is Data Studio.
CATDDACL , CATDMGCL , and CATDSTCL data class, management class, and storage class SMS parameters. STATCLUS parameter, also on macro DSN6SPRM, specifies the type of clustering statistics RUNSTATS collects. The default, and recommendation, is ENHANCED clustering statistics which should result in an improved CLUSTERRATION formula. STATCLUS was added to DB2 in DB2 9 on installation panel DSNTIP6 and removed form the panel becoming an opaque parameter in DB2 10. SEQCACH on the macro DSN6SPRM controls whether DB2 prefetch uses sequential access for reading the cache on a 3990 controller. The default is SEQ , use sequential access, BYPASS tells DB2 prefetch to bypass the cache. The recommended setting is SEQ, the default.
By granting the EXPLAIN privilege on an authid or role, you are giving that authid or role the ability to: -- do an EXPLAIN on an SQL statement specifying the keywords ALL/PLAN, STMTCACHE ALL, STMTCACHE STMTID, STMTCACHE STMTTOKEN, and MONITORED STMTS, --issue the SQL statements PREPARE and DESCRIBE TABLE, -- perform a BIND specifying EXPLAIN(ONLY) and SQLERROR(CHECK), -- and explain dynamic SQL statements executing under the new special register CURRENT EXPLAIN MODE = EXPLAIN .
In previous releases of DB2 for z/OS, query performance might be impacted if the DB2 optimization process overestimates the filtering of a predicate, which can occur if the literal value is not known. For example, when the predicate is a range predicate, when data is distributed non-uniformly, or when using host variables or parameter markers. Now, when two indexes have a close cost estimate, the DB2 optimization process considers the uncertainty of matching and screening predicates when choosing the most efficient index. The DB2 optimization process might choose an index with a slightly higher cost estimate than another index, if that index will be more cost-effective.
INCREMENTAL REBINDS DB2 incrementally rebinds the statements that use parallelism after migration to Version 10. Incremental rebinds can cause performance degradation, so you should manually rebind those statements. You can run a query in job DSNTIJPM before you migrate to determine which statements can use parallelism, and are therefore candidates for incremental rebinds. You should consider rebinding those statements after migration, as soon as your Version 10 system is stable. After you migrate to Version 10, you can also run a performance trace, class 3 or class 10 for IFCID 357, to identify the plans and packages that contain static SQL queries that use parallelism, and therefore need to be rebound. THREAD CONSTRAINT RELIEF The goal for DB2 10 for z/OS is for as much as 90% of the DBM1 address space and the DDF address space to be running above the bar. This can result in the ability to run much more concurrent work in a single subsystem and to run from five to ten times more concurrent threads. For instance, if your configuration and application mix can support 500 concurrent threads on a single subsystem on DB2 9, you should be able to support as many as 5000 concurrent threads on a single subsystem with DB2 10. Thread constraint relief requires rebinding your programs.
DB2 best practices web page. These best practices present advice on the optimal way to use DB2 for z/OS to satisfy key business data processing needs. These presentations and articles are authored by leading experts in IBM's development and consulting teams. https://www.ibm.com/developerworks/data/bestpractices/db2zos/