DB2 V10 Migration Guidance


Published on

An overview of the considerations for migrating to DB2 10 for z/OS (from V8 or V9)

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • 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/
  • DB2 V10 Migration Guidance

    1. 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. 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. 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. 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. 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. 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. 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 10n 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 19. Additional DB2 10REBIND 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. 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. 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. 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. 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. 24. Let’s Talk (briefly) About Rebinding and Access Paths© 201 1 M u llins C ons u lting, Inc. 24
    25. 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. 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. 27. Version Migration ConcernsTypically, it is not a hard & fast requirement to REBIND allof your packages and plans when you move to a newversion of DB2.› However, it is a really good idea to REBIND the most critical.There are a lot of optimizer enhancements and performanceimprovements 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. 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. 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. 30. Contact Informationhttp://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