SlideShare a Scribd company logo
DB2 for z/OS and Java
    What’s New?


                  Julian Stuhler
                   DB2Night Show
                   September 2011
Agenda

            Introduction
            Java Overview
            Java & DB2: Benefits and Challenges
            So, What’s New?
            Conclusion & Summary




                                                  2



DB2Night Show ©
© 2011 Triton Consulting Ltd
Your Presenter – Julian Stuhler
            DB2 consultant with Triton Consulting, based in the
            UK
            25 years DB2 experience
               •    Database Administration
               •    Systems Programming
               •    Application Development
            IBM Gold Consultant
            IBM Information Champion
            IDUG Best Speaker
            Redbook – DB2 Java Stored Procedures, Learning
            by Example
            IDUG Past President
                                                                  3



DB2Night Show ©
© 2011 Triton Consulting Ltd
Java Overview




DB2Night Show ©
© 2011 Triton Consulting Ltd
What is Java?

            Java is a programming language
               •    Object oriented
               •    Derivative of C++ with simpler syntax and more
                    robust memory management
               •    Code is compiled to architecture neutral byte-code
               •    Secure –built-in controls for preventing malicious
                    code
               •    Portable – device and OS independent


                                                                         5



DB2Night Show ©
© 2011 Triton Consulting Ltd
What is Java?
            Java is a runtime environment
            (aka platform) with 2 major
            components
               •    A Java Virtual Machine (JVM), which
                    runs Java code and insulates it from                       myProg.java
                    underlying hardware / OS
                               Interprets portable Java byte code and   Java API           JVM
                               translates to underlying platform-
                               specific instructions
                               Can be supplied by the web browser,      Hardware / Operating System
                               operating system or middleware (such
                               as Websphere Application Server)
               •    A Java API, which provides a collection
                    of ready-made Java software
                    components for common functions
                                                                                                      6



DB2Night Show ©
© 2011 Triton Consulting Ltd
What is Java?

            Java is a development environment
               •    JDK (Java Development Kit) provides the tools
                    necessary to develop and test a Java program




                                                                    7



DB2Night Show ©
© 2011 Triton Consulting Ltd
Java In The Enterprise
            IBM and other enterprise vendors have
            emphatically endorsed Java
               •    Good fit with IBM’s “open” approach and On
                    Demand strategy
               •    Great counter to Microsoft’s .net
            Many organisations have adopted Java as
            the (or one of the) primary application
            development technologies
               •    Good availability of skilled programming resource
               •    Portability
                                                                        8



DB2Night Show ©
© 2011 Triton Consulting Ltd
Java In The Enterprise
            Huge effort within IBM in recent years to
            support Java as a primary application
            development environment
               •    Hardware support (IFL, zAAP, zIIP, zEnterprise)
               •    Operating System support (USS, Java SDK for
                    z/OS)
               •    Software licensing (IFL)
               •    Middleware development (DB2, Websphere, etc)
               •    Application development tools (Websphere studio,
                    RAD, Eclipse)
               •    Consulting services                                9



DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Benefits and Challenges




DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Benefits
            Good fit to each technology’s strengths
               •    Java runs well on most “application server” hardware
                    platforms
               •    DB2 offers best-of-breed data serving capabilities
                    (resilience, scalability, integrity)
            Availability of developer skills compared to
            “legacy” languages
               •    May change in future – see next slides…
            Portability
            Mature DB2 driver architecture
            Ongoing enhancements to DB2 to make it more
            “Java friendly”

DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Benefits
           Java programs can access DB2 data using the IBM
           Data Server Driver for Java with…
            • … one of the Java database  • … one of two Java
                    APIs                         connection interface calls
                               JDBC                  DriverManager
                               SQLJ                  DataSource
                               pureQuery
               •    … one of the two driver
                    connection types
                               Type 2 (local)
                               Type 4 (remote)

           DB2 stored procedures and User Defined Functions
           can also be written in Java
             pureQuery gives further options – see later
                                                                              12
DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Challenges

            JDBC = Dynamic SQL
               •    Performance
               •    Response time consistency
               •    Authorisation
               •    Monitoring & Accounting (same package for all)
               •    DBM1 Virtual storage (MAXKEEPD)
            Developer skills
               •    Ironically, many educational establishments now
                    consider Java to be an enterprise language, so it
                    is becoming less fashionable to teach
                                                                        13
DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Challenges
            Impedance Mismatch
               •    Java is an Object Oriented language
               •    Relational databases such as DB2 deal with tables and
                    columns
               •    Mismatch requires mapping between the two

                                                      Customer

                   Customer
                                                            Telephone
                                                Address
                                                             Number

         Customer Java Object                    Customer DB2 Tables
                                                                            14
DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Challenges

              Cultural Silos
                •     Many Java developers don’t
                      know (or care) much about the
                      way the back-end database
                      operates – black box approach
                •     Many DBAs don’t understand
                      Java/OO development (e.g.
                      may come from a more
                      traditional COBOL
                      development background)

                                                      15
DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Challenges
            Java Frameworks are designed to improve
            developer productivity
               •    Provide standard functions/facilities
               •    Promote re-use
               •    Free the developer from directly coding lower-level
                    functions such as data access by adding (another)
                    abstraction layer
            Data access frameworks (aka “persistence
            frameworks”) deal with access to relational
            databases
                                                                          16



DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Challenges
            Popular Java data access frameworks
               •    iBatis
               •    Hibernate
               •    JDO
               •    JPA
               •    TopLink
            Many of these interoperate so multiple
            frameworks can be used at once
               •    E.g. The Spring framework can use all of the
                    above data access frameworks
                                                                   17



DB2Night Show ©
© 2011 Triton Consulting Ltd
Java & DB2: Challenges

            Framework issues
               •    Developer will use framework’s own query
                    language, which will be used to generate SQL
               •    Potential performance issues
               •    Potential problem diagnosis issues




                                                                   18
DB2Night Show ©
© 2011 Triton Consulting Ltd
Break




                               19



DB2Night Show ©
© 2011 Triton Consulting Ltd
So, What’s New?




DB2Night Show ©
© 2011 Triton Consulting Ltd
pureQuery - Proposition
            JDBC has performance
            challenges                             Java Application
            SQLJ is not well understood by
            traditional Java developers, and
            not well supported by tooling




                                                                      Named Queries
                                                Query Language
            Other solutions (Hibernate,
            Spring, iBatis, etc) are more      OR Mapping Layer
            popular with Java developers but
            reduce flexibility and make SQL
            problem diagnosis and tuning       Persistence Layer
            difficult
            A solution is required that
            combines the flexibility of
            Hibernate/iBatis with the                     DB2
            efficiency of SQLJ
                                                                                      21
DB2Night Show ©
© 2011 Triton Consulting Ltd
pureQuery – Components
            pureQuery is part of the Optim brand, and consists of
            the following elements
               •    A set of APIs for efficient access to relational data
               •    Eclipse-based tooling for Java and SQL development,
                    delivered in Optim Development Studio – chargeable option,
                    separate components targeted at z/OS and LUW
               •    pureQuery runtime – chargeable option, separate
                    components targeted at z/OS and LUW




                                                                                 22
DB2Night Show ©
© 2011 Triton Consulting Ltd
pureQuery - APIs
            Intended to boost productivity and use best practices for
            RDBMS access
            Aimed at new applications – API calls embedded directly in Java
            code
               •    An alternative API to JDBC and SQLJ, although the same low-level
                    access functions are used
            Uses SQL directly in API calls – no alternative query language
            Choice of static SQL or dynamic SQL variants
            Supports several API styles to fit well into all of the popular Java
            programming models/frameworks
               •    Inline style (familiar JDBC and SQLJ approach)
               •    Method style (similar to JDBC 4 ease of use enhancements)
               •    Named query style (similar to iBatis / Hibernate)
            Supported by Optim Development Studio


                                                                                       23
DB2Night Show ©
© 2011 Triton Consulting Ltd
pureQuery – Development Tools
            Optim Development Studio (ODS)
               •    Previously known as IBM Data Studio
                    Developer
               •    Eclipse based
               •    Supports DB2, IDS and Oracle
                    development
               •    Integrates with other IBM tools (RAD,
                    InfoSphere Data Architect, etc.)
               •    Generate pureQuery access code direct
                    from database objects
               •    SQL assist
               •    Front-end for pureQuery monitoring and
                    runtime components
               •    Dynamic SQL substitution to replace
                    poor SQL
               •    Approx $850 per seat


                                                             24
DB2Night Show ©
© 2011 Triton Consulting Ltd
pureQuery – Runtime
            Allows dynamic SQL (e.g JDBC calls) to be intercepted
            and replaced with static SQL at runtime
               •    Process known as “client optimisation”
            Major Features
               •    Allows dynamic SQL to be executed statically, with associated
                    performance/security advantages
               •    No code changes needed
               •    Works for both Java and .Net applications
               •    Can handle parameter markers in SQL
               •    Targeted against DB2, Informix and Oracle back-end
                    databases
            Internal IBM testing shows up to 40% CPU savings for T2
            applications, and 15-25% for T4 – your mileage may vary!


                                                                                    25
DB2Night Show ©
© 2011 Triton Consulting Ltd
pureQuery – Runtime




Source: IBM White Paper, IBM Optim pureQuery Runtime for z/OS Performance
Running IRWW workload
                                                                            26
DB2Night Show ©
© 2011 Triton Consulting Ltd
DB2 9 for z/OS
            GA in early 2007
            Many new features of interest from a
            Java/Websphere perspective
               •    Native XML support for Java applications
               •    Optimistic locking
               •    Network trusted contexts
               •    BIGINT, VARBINARY and BINARY data types




                                                               27
DB2Night Show ©
© 2009 Triton Consulting Ltd
Network Trusted Contexts




                                28
DB2Night Show ©
© 2009 Triton Consulting Ltd
DB2 10 for z/OS
            New release of DB2 for z/OS went GA in
            October 2010
            Many more new features of interest from a
            Java / Websphere perspective
               •    High performance DBATs
               •    Limited Block Fetch support for Type 2
                    connections
               •    XML enhancements
               •    TIMESTAMP precision can now match Java (6
                    digits of fractional seconds)
               •    New security/audit capabilities can allow custom
                    code to be removed, improving performance
                                                                       29
DB2Night Show ©
© 2011 Triton Consulting Ltd
DB2 10 for z/OS
            More DB2 10 features
               •    WLM_SET_CLIENT_INFO stored procedure (also
                    available for V9 via APAR)
               •    Dynamic statement cache enhancement to be
                    more tolerant of differing literal values
                               Change JCC Driver to include the
                               “enableliteralReplacement=‘YES’” keyword
                               Specified in the data source or connection property
               •    Possibility for significant MAXKEEPD increase
                    due to DBM1 VSCR
               •    Future DB2 10 APAR expected to deliver Plan
                    Stability support for dynamic SQL
                                                                                     30
DB2Night Show ©
© 2011 Triton Consulting Ltd
DB2 10 – High Performance DBATs
            DB2 10 honours use of RELEASE(DEALLOCATE)
            for distributed applications
               •    Ignored for DB2 9 and earlier versions
               •    Can provide significant CPU savings (some beta customers
                    saw 10-20%)
               •    Higher EDM pool usage and potential concurrency issues
                    with DDL and BIND
            Needs JCC packages to be rebound with
            RELEASE(DEALLOCATE) KEEPDYNAMIC(NO)
               •    Consider using different collection for high performance
                    DBATs, as you probably won’t be able to afford to run all
                    connections that way
               •    Remember, focus is now on REAL not VIRTUAL storage
                    monitoring!
                                                                                31
DB2Night Show ©
© 2011 Triton Consulting Ltd
Questions?




                               32
DB2Night Show ©
© 2011 Triton Consulting Ltd
Triton Consulting
                                         The Royal
                                       25 Bank Plain
                                     Norwich NR2 4SF
                                      United Kingdom

                               email:julian.stuhler@triton.co.uk
                                   http://www.triton.co.uk
                                 Tel: +44 (0) 870 2411550
                                 Fax: +44 (0) 870 2411549
                                                                   33
DB2Night Show ©
© 2011 Triton Consulting Ltd

More Related Content

PDF
Java/J2EE Companion
PPT
Effective Application Development with WebSphere Message Broker
PDF
[Uruguay] DB2 for i: 7.1 Overview - Hernando Bedoya
PDF
[Uruguay] DB2 Web Query for i - Hernando Bedoya
ODP
Intro in JavaEE world (TU Olomouc)
PPT
Advanced Pattern Authoring with WebSphere Message Broker
PDF
AD for i in modern world
PPT
Introduction to Patterns in WebSphere Message Broker
Java/J2EE Companion
Effective Application Development with WebSphere Message Broker
[Uruguay] DB2 for i: 7.1 Overview - Hernando Bedoya
[Uruguay] DB2 Web Query for i - Hernando Bedoya
Intro in JavaEE world (TU Olomouc)
Advanced Pattern Authoring with WebSphere Message Broker
AD for i in modern world
Introduction to Patterns in WebSphere Message Broker

What's hot (12)

PPT
Mobile Patterns with WebSphere Message Broker
PDF
Ben Pashkoff - java embedded - 24mai2011
PDF
The New z/VSE Database Connector (DBCLI)
PDF
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
PDF
MJB Technologies
PDF
Enterprise OSGi at eBay
PDF
Blue Ruby SDN Webinar
PDF
X pages jumpstart jmp101
PDF
Kapil Verma: What's new in FrameMaker 10
PPTX
OMG CORBA Component Model tutorial
PDF
News from hursley jens diedrichsen - may 2014
PPTX
Chapter 11:Understanding Client-Side Technologies
Mobile Patterns with WebSphere Message Broker
Ben Pashkoff - java embedded - 24mai2011
The New z/VSE Database Connector (DBCLI)
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
MJB Technologies
Enterprise OSGi at eBay
Blue Ruby SDN Webinar
X pages jumpstart jmp101
Kapil Verma: What's new in FrameMaker 10
OMG CORBA Component Model tutorial
News from hursley jens diedrichsen - may 2014
Chapter 11:Understanding Client-Side Technologies
Ad

Similar to DB2 z/OS & Java - What\'s New? (20)

PDF
Java keynote preso
PDF
JavaOne 2010 Keynote
PDF
01 java 2 micro edition
PPTX
Java chapter 1 basic introduction Unit-1.pptx
PPTX
1. Java Project Guidance for engineering
ODP
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
PPTX
Chapter-1 Introduction.pptx
PPTX
.NET vs Java- Which is best for Custom Software Development.pptx
PPTX
Java enterprise paradise
PPT
Java features
PPTX
C,c++,java,php,.net training institute in delhi, best training institute for ...
PPT
Computer Basics: Computer introductions for beginners
PDF
C# vs Java What are The Differences.pdf
PDF
Trends and directions for application developers
PDF
Application trends db2 day 2015 jorn
PDF
Virtual dev-day-java7-keynote-1641807
PDF
itft-Java evolution
PPT
Java ppt-class_Introduction_class_Objects.ppt
PDF
Lecture-01 _Java Introduction CS 441 Fast
PPT
Java ppt-class_basic data types methods definitions
Java keynote preso
JavaOne 2010 Keynote
01 java 2 micro edition
Java chapter 1 basic introduction Unit-1.pptx
1. Java Project Guidance for engineering
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
Chapter-1 Introduction.pptx
.NET vs Java- Which is best for Custom Software Development.pptx
Java enterprise paradise
Java features
C,c++,java,php,.net training institute in delhi, best training institute for ...
Computer Basics: Computer introductions for beginners
C# vs Java What are The Differences.pdf
Trends and directions for application developers
Application trends db2 day 2015 jorn
Virtual dev-day-java7-keynote-1641807
itft-Java evolution
Java ppt-class_Introduction_class_Objects.ppt
Lecture-01 _Java Introduction CS 441 Fast
Java ppt-class_basic data types methods definitions
Ad

More from Laura Hood (20)

PDF
Top 10 DB2 Support Nightmares #10
PDF
Top 10 DB2 Support Nightmares #9
PDF
Top 10 DB2 Support Nightmares #8
PDF
Top 10 DB2 Support Nightmares #7
PDF
Top 10 db2 support nightmares #6
PDF
Consultancy on Demand - Infographic
PDF
A Time Traveller's Guide to DB2: Technology Themes for 2014 and Beyond
PDF
Top 10 DB2 Support Nightmares #1
PDF
Db2 10 memory management uk db2 user group june 2013 [read-only]
PDF
DB2 10 Security Enhancements
PDF
DbB 10 Webcast #3 The Secrets Of Scalability
PDF
DB2 10 Webcast #2 - Justifying The Upgrade
PDF
DB2 10 Webcast #1 - Overview And Migration Planning
PDF
Time Travelling With DB2 10 For zOS
PDF
DB2DART - DB2Night Show October 2011
PDF
Temporal And Other DB2 10 For Z Os Highlights
PDF
DB210 Smarter Database IBM Tech Forum 2011
PDF
UKGSE DB2 pureScale
PPTX
UKCMG DB2 pureScale
PDF
Episode 4 DB2 pureScale Performance Webinar Oct 2010
Top 10 DB2 Support Nightmares #10
Top 10 DB2 Support Nightmares #9
Top 10 DB2 Support Nightmares #8
Top 10 DB2 Support Nightmares #7
Top 10 db2 support nightmares #6
Consultancy on Demand - Infographic
A Time Traveller's Guide to DB2: Technology Themes for 2014 and Beyond
Top 10 DB2 Support Nightmares #1
Db2 10 memory management uk db2 user group june 2013 [read-only]
DB2 10 Security Enhancements
DbB 10 Webcast #3 The Secrets Of Scalability
DB2 10 Webcast #2 - Justifying The Upgrade
DB2 10 Webcast #1 - Overview And Migration Planning
Time Travelling With DB2 10 For zOS
DB2DART - DB2Night Show October 2011
Temporal And Other DB2 10 For Z Os Highlights
DB210 Smarter Database IBM Tech Forum 2011
UKGSE DB2 pureScale
UKCMG DB2 pureScale
Episode 4 DB2 pureScale Performance Webinar Oct 2010

DB2 z/OS & Java - What\'s New?

  • 1. DB2 for z/OS and Java What’s New? Julian Stuhler DB2Night Show September 2011
  • 2. Agenda Introduction Java Overview Java & DB2: Benefits and Challenges So, What’s New? Conclusion & Summary 2 DB2Night Show © © 2011 Triton Consulting Ltd
  • 3. Your Presenter – Julian Stuhler DB2 consultant with Triton Consulting, based in the UK 25 years DB2 experience • Database Administration • Systems Programming • Application Development IBM Gold Consultant IBM Information Champion IDUG Best Speaker Redbook – DB2 Java Stored Procedures, Learning by Example IDUG Past President 3 DB2Night Show © © 2011 Triton Consulting Ltd
  • 4. Java Overview DB2Night Show © © 2011 Triton Consulting Ltd
  • 5. What is Java? Java is a programming language • Object oriented • Derivative of C++ with simpler syntax and more robust memory management • Code is compiled to architecture neutral byte-code • Secure –built-in controls for preventing malicious code • Portable – device and OS independent 5 DB2Night Show © © 2011 Triton Consulting Ltd
  • 6. What is Java? Java is a runtime environment (aka platform) with 2 major components • A Java Virtual Machine (JVM), which runs Java code and insulates it from myProg.java underlying hardware / OS Interprets portable Java byte code and Java API JVM translates to underlying platform- specific instructions Can be supplied by the web browser, Hardware / Operating System operating system or middleware (such as Websphere Application Server) • A Java API, which provides a collection of ready-made Java software components for common functions 6 DB2Night Show © © 2011 Triton Consulting Ltd
  • 7. What is Java? Java is a development environment • JDK (Java Development Kit) provides the tools necessary to develop and test a Java program 7 DB2Night Show © © 2011 Triton Consulting Ltd
  • 8. Java In The Enterprise IBM and other enterprise vendors have emphatically endorsed Java • Good fit with IBM’s “open” approach and On Demand strategy • Great counter to Microsoft’s .net Many organisations have adopted Java as the (or one of the) primary application development technologies • Good availability of skilled programming resource • Portability 8 DB2Night Show © © 2011 Triton Consulting Ltd
  • 9. Java In The Enterprise Huge effort within IBM in recent years to support Java as a primary application development environment • Hardware support (IFL, zAAP, zIIP, zEnterprise) • Operating System support (USS, Java SDK for z/OS) • Software licensing (IFL) • Middleware development (DB2, Websphere, etc) • Application development tools (Websphere studio, RAD, Eclipse) • Consulting services 9 DB2Night Show © © 2011 Triton Consulting Ltd
  • 10. Java & DB2: Benefits and Challenges DB2Night Show © © 2011 Triton Consulting Ltd
  • 11. Java & DB2: Benefits Good fit to each technology’s strengths • Java runs well on most “application server” hardware platforms • DB2 offers best-of-breed data serving capabilities (resilience, scalability, integrity) Availability of developer skills compared to “legacy” languages • May change in future – see next slides… Portability Mature DB2 driver architecture Ongoing enhancements to DB2 to make it more “Java friendly” DB2Night Show © © 2011 Triton Consulting Ltd
  • 12. Java & DB2: Benefits Java programs can access DB2 data using the IBM Data Server Driver for Java with… • … one of the Java database • … one of two Java APIs connection interface calls JDBC DriverManager SQLJ DataSource pureQuery • … one of the two driver connection types Type 2 (local) Type 4 (remote) DB2 stored procedures and User Defined Functions can also be written in Java pureQuery gives further options – see later 12 DB2Night Show © © 2011 Triton Consulting Ltd
  • 13. Java & DB2: Challenges JDBC = Dynamic SQL • Performance • Response time consistency • Authorisation • Monitoring & Accounting (same package for all) • DBM1 Virtual storage (MAXKEEPD) Developer skills • Ironically, many educational establishments now consider Java to be an enterprise language, so it is becoming less fashionable to teach 13 DB2Night Show © © 2011 Triton Consulting Ltd
  • 14. Java & DB2: Challenges Impedance Mismatch • Java is an Object Oriented language • Relational databases such as DB2 deal with tables and columns • Mismatch requires mapping between the two Customer Customer Telephone Address Number Customer Java Object Customer DB2 Tables 14 DB2Night Show © © 2011 Triton Consulting Ltd
  • 15. Java & DB2: Challenges Cultural Silos • Many Java developers don’t know (or care) much about the way the back-end database operates – black box approach • Many DBAs don’t understand Java/OO development (e.g. may come from a more traditional COBOL development background) 15 DB2Night Show © © 2011 Triton Consulting Ltd
  • 16. Java & DB2: Challenges Java Frameworks are designed to improve developer productivity • Provide standard functions/facilities • Promote re-use • Free the developer from directly coding lower-level functions such as data access by adding (another) abstraction layer Data access frameworks (aka “persistence frameworks”) deal with access to relational databases 16 DB2Night Show © © 2011 Triton Consulting Ltd
  • 17. Java & DB2: Challenges Popular Java data access frameworks • iBatis • Hibernate • JDO • JPA • TopLink Many of these interoperate so multiple frameworks can be used at once • E.g. The Spring framework can use all of the above data access frameworks 17 DB2Night Show © © 2011 Triton Consulting Ltd
  • 18. Java & DB2: Challenges Framework issues • Developer will use framework’s own query language, which will be used to generate SQL • Potential performance issues • Potential problem diagnosis issues 18 DB2Night Show © © 2011 Triton Consulting Ltd
  • 19. Break 19 DB2Night Show © © 2011 Triton Consulting Ltd
  • 20. So, What’s New? DB2Night Show © © 2011 Triton Consulting Ltd
  • 21. pureQuery - Proposition JDBC has performance challenges Java Application SQLJ is not well understood by traditional Java developers, and not well supported by tooling Named Queries Query Language Other solutions (Hibernate, Spring, iBatis, etc) are more OR Mapping Layer popular with Java developers but reduce flexibility and make SQL problem diagnosis and tuning Persistence Layer difficult A solution is required that combines the flexibility of Hibernate/iBatis with the DB2 efficiency of SQLJ 21 DB2Night Show © © 2011 Triton Consulting Ltd
  • 22. pureQuery – Components pureQuery is part of the Optim brand, and consists of the following elements • A set of APIs for efficient access to relational data • Eclipse-based tooling for Java and SQL development, delivered in Optim Development Studio – chargeable option, separate components targeted at z/OS and LUW • pureQuery runtime – chargeable option, separate components targeted at z/OS and LUW 22 DB2Night Show © © 2011 Triton Consulting Ltd
  • 23. pureQuery - APIs Intended to boost productivity and use best practices for RDBMS access Aimed at new applications – API calls embedded directly in Java code • An alternative API to JDBC and SQLJ, although the same low-level access functions are used Uses SQL directly in API calls – no alternative query language Choice of static SQL or dynamic SQL variants Supports several API styles to fit well into all of the popular Java programming models/frameworks • Inline style (familiar JDBC and SQLJ approach) • Method style (similar to JDBC 4 ease of use enhancements) • Named query style (similar to iBatis / Hibernate) Supported by Optim Development Studio 23 DB2Night Show © © 2011 Triton Consulting Ltd
  • 24. pureQuery – Development Tools Optim Development Studio (ODS) • Previously known as IBM Data Studio Developer • Eclipse based • Supports DB2, IDS and Oracle development • Integrates with other IBM tools (RAD, InfoSphere Data Architect, etc.) • Generate pureQuery access code direct from database objects • SQL assist • Front-end for pureQuery monitoring and runtime components • Dynamic SQL substitution to replace poor SQL • Approx $850 per seat 24 DB2Night Show © © 2011 Triton Consulting Ltd
  • 25. pureQuery – Runtime Allows dynamic SQL (e.g JDBC calls) to be intercepted and replaced with static SQL at runtime • Process known as “client optimisation” Major Features • Allows dynamic SQL to be executed statically, with associated performance/security advantages • No code changes needed • Works for both Java and .Net applications • Can handle parameter markers in SQL • Targeted against DB2, Informix and Oracle back-end databases Internal IBM testing shows up to 40% CPU savings for T2 applications, and 15-25% for T4 – your mileage may vary! 25 DB2Night Show © © 2011 Triton Consulting Ltd
  • 26. pureQuery – Runtime Source: IBM White Paper, IBM Optim pureQuery Runtime for z/OS Performance Running IRWW workload 26 DB2Night Show © © 2011 Triton Consulting Ltd
  • 27. DB2 9 for z/OS GA in early 2007 Many new features of interest from a Java/Websphere perspective • Native XML support for Java applications • Optimistic locking • Network trusted contexts • BIGINT, VARBINARY and BINARY data types 27 DB2Night Show © © 2009 Triton Consulting Ltd
  • 28. Network Trusted Contexts 28 DB2Night Show © © 2009 Triton Consulting Ltd
  • 29. DB2 10 for z/OS New release of DB2 for z/OS went GA in October 2010 Many more new features of interest from a Java / Websphere perspective • High performance DBATs • Limited Block Fetch support for Type 2 connections • XML enhancements • TIMESTAMP precision can now match Java (6 digits of fractional seconds) • New security/audit capabilities can allow custom code to be removed, improving performance 29 DB2Night Show © © 2011 Triton Consulting Ltd
  • 30. DB2 10 for z/OS More DB2 10 features • WLM_SET_CLIENT_INFO stored procedure (also available for V9 via APAR) • Dynamic statement cache enhancement to be more tolerant of differing literal values Change JCC Driver to include the “enableliteralReplacement=‘YES’” keyword Specified in the data source or connection property • Possibility for significant MAXKEEPD increase due to DBM1 VSCR • Future DB2 10 APAR expected to deliver Plan Stability support for dynamic SQL 30 DB2Night Show © © 2011 Triton Consulting Ltd
  • 31. DB2 10 – High Performance DBATs DB2 10 honours use of RELEASE(DEALLOCATE) for distributed applications • Ignored for DB2 9 and earlier versions • Can provide significant CPU savings (some beta customers saw 10-20%) • Higher EDM pool usage and potential concurrency issues with DDL and BIND Needs JCC packages to be rebound with RELEASE(DEALLOCATE) KEEPDYNAMIC(NO) • Consider using different collection for high performance DBATs, as you probably won’t be able to afford to run all connections that way • Remember, focus is now on REAL not VIRTUAL storage monitoring! 31 DB2Night Show © © 2011 Triton Consulting Ltd
  • 32. Questions? 32 DB2Night Show © © 2011 Triton Consulting Ltd
  • 33. Triton Consulting The Royal 25 Bank Plain Norwich NR2 4SF United Kingdom email:julian.stuhler@triton.co.uk http://www.triton.co.uk Tel: +44 (0) 870 2411550 Fax: +44 (0) 870 2411549 33 DB2Night Show © © 2011 Triton Consulting Ltd