© 2016 IBM Corporation
1
What’s new for DB2 Clients and Drivers?
LOTS!
Paul [email protected]
March 2016
V4
V19
© 2016 IBM Corporation
2
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements, or other publicly available sources. IBM has not tested
those products and cannot confirm the accuracy of performance, compatibility, or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products
should be addressed to the suppliers of those products.
The information on the new products is intended to outline our
general product direction and it should not be relied on in making a
purchasing decision. The information on the new products is for
informational purposes only and may not be incorporated into any
contract. The information on the new products is not a commitment,
promise, or legal obligation to deliver any material, code or
functionality. The development, release, and timing of any features
or functionality described for our products remains at our sole
discretion.
This information may contain examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of
individuals, companies, brands, and products. All of these names are fictitious, and any similarity to the names and addresses used by an actual business enterprise is entirely
coincidental.
Trademarks The following terms are trademarks or registered trademarks of other companies and have been used in at least one of the pages of the presentation:
The following terms are trademarks of International Business Machines Corporation in the United States, other countries, or both: DB2 Universal Database, eServer, FlashCopy, IBM,
IMS, iSeries, Tivoli, z/OS, zSeries, Guardium, IBM Smart Analytics Optimizer, Data Encryption Tool for IMS and DB2 Databases, DB2 Administration Tool / DB2 Object Compare for
z/OS, DB2 Audit Management Expert for z/OS, DB2 Automation Tool for z/OS, DB2 Bind Manager for z/OS, DB2 Change Accumulation Tool for z/OS, DB2 Cloning Tool for z/OS, DB2
High Performance Unload for z/OS, DB2 Log Analysis Tool for z/OS, DB2 Object Restore for z/OS, DB2 Path Checker for z/OS, DB2 Query Management Facility for z/OS, DB2 Query
Monitor for z/OS, DB2 Recovery Expert for z/OS, DB2 SQL Performance Analyzer for z/OS, DB2 Table Editor for z/OS , DB2 Utilities Enhancement Tool for z/OS, DB2 Utilities Suite for
z/OS, InfoSphere Change Data Capture, InfoSphere Data Event Publisher, InfoSphere Replication Server, Optim Data Growth Solution for z/OS, Optim Development Studio, Optim
pureQuery Runtime, Optim Query Workload Tuner, Optim Test Data Management Solution for z/OS, Tivoli OMEGAMON XE for DB2 Performance Expert on z/OS
EMC and TimeFinder are trademarks of EMC Corporation
Hitachi is a traademark of Hitchi Ltd
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
Disclaimer/Trademarks
© 2016 IBM Corporation
3
Learning Objectives
Title: What’s new for DB2 Clients and Drivers?
Abstract: IBM’s strategy is to remove the reliance on the DB2 Connect Gateways and
replace DB2 Connect with the IBM Data Server Driver or Clients. While DB2 Connect
licenses (in the form of DB2 Connect license files) are still required, you can replace
DB2 Connect Gateways with the IBM Data Server Driver or Clients and receive
equivalent or superior function. In addition, you can reduce complexity, improve
performance, and deploy application solutions with smaller footprints for your business
users. IBM has also simplified the configuration of clients and drivers by replacing the
database directory with a single XML configuration file.
Objective: The purpose of this presentation is to review changes and enhancements in
creating connections to IBM’s relational databases.
Audience: Architects, Database Administrators, DB2 Connect Support Staff and,
Developers.
Duration: 75 Minutes
© 2016 IBM Corporation
4
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
5
DB2 Adapter for
z/OS Connect
(Rest-full APIs)
New Dec. 2015
© 2016 IBM Corporation
6
DB2 Client and Driver – Some Highlights
Most recent fix packs DB2 10.5 FP6, 10.1 FP5 and 9.7 FP11
DB2 10.5 FP6 – Maintenance release for DB2 LUW
DB2 Version 10.5 Fix Pack 5 adds native database encryption to the DB2
database server. Note: Several driver versions exclude support for this feature
DB2 10.5 FP 4 –
Support for Windows 8 and 2012 R2
Visual Studio 2013
DB2 10.1 FP 2 - DB2 z/OS 11 Driver/Client/Connect Support of New Features
DB2 10.1 FP 2 - Visual Studio 2012
DB2 9.7 FP 6 – SSL with Auth. Client
DB2 9.1 FP 1 – DB2 z/OS 10 Driver/Client/Connect
© 2016 IBM Corporation
7
DB2 Client and Driver–Some Highlights DB2 z/OS 11
DB2 11 for z/OS – “CURRENT APPLICATION COMPATIBILITY” special register DB2 LUW 10.5 FP2
Set the CURRENT APPLICATION COMPATIBILITY special register by setting the application
compatibility property in the db2dsdriver.cfg file or Java connection. When a connection is
established with the server, this property controls dynamic SQL statement behavior.
Bind packages with the APPLCOMPAT option, to control the SQL application compatibility of
the packages for static SQL. The APPLCOMPAT value also provides the default for the
CURRENT APPLICATION COMPATIBILITY special register. You can specify the APPLCOMPAT
option for the GENERIC parameter of the BIND command.
Set the APPLCOMPAT subsystem parameter on the DB2 for z/OS server. (V10R1,V11R1)
The following describes the SQL application behavior for application compatibility settings in
either conversion mode or new-function mode:
If you are in conversion mode, you cannot use new DB2 function. Trying to use new DB2 function or
trying to set application compatibility might result in SQL4700N.
If you are in new-function mode, DB2 function behaves based on the application compatibility value
for the application on the server.
Samples:<configuration>
<databases>
<database name="sample" host="hotelfvt02.torolab.ibm.com" port="21169">
<specialregisters> <parameter name="CURRENT APPLICATION COMPATIBILITY" value="V10R1"/> </specialregisters>
</database>
</database> <database name="sample2" host="hotelfvt02.torolab.ibm.com" port="21169">
</database>
</databases>
</configuration>
© 2016 IBM Corporation
8
DB2 Client and Driver–Some Highlights DB2 z/OS 11
You can now specify array parameters when you are calling a stored procedure
with array input arguments on DB2 for z/OS Version 11 servers in new function
mode (NFM).
The CLI driver implements the implicit COMMIT operation when the application
calls a stored procedure on a DB2 for z/OS server. By implicitly implementing
the COMMIT operation on DB2 for z/OS server, extra network flow to the server
is avoided. The following conditions must be met for the implicit COMMIT
behavior:
The connected database server is DB2 for z/OS Version 11 servers in new
function mode (NFM).
Entire result-set that is returned from the stored procedure is contained
within the single query block.
The query block size can be adjusted with the FET_BUF_SIZE db2cli.ini
keyword or the FetchBufferSize IBM data server driver configuration
keyword.
© 2016 IBM Corporation
9
DB2 Client and Driver–Some Highlights
• Security
– Use RACF keyring based keystores for SSL certificates (JCC)
– Specify cipher suites to use during SSL negotiation (JCC)
– Create read only connections (CLI)
• Performance/High Availability
– Reduced cost of failback (CLI)
– Seamless failover for auto-detected read only transactions (CLI)
– Ability to set global variables efficiently (CLI)
• Serviceability
– Ability to configure SQLCODE triggered dumps
– Online tracing (JCC)
– db2cli option to list the connect license used and force to use server
license
© 2016 IBM Corporation
10
DB2 Client and Driver–Some Highlights
db2.jcc.maxTransportObjects
Specifies the upper limit for the number of transport objects in a global
transport object pool for the connection concentrator and Sysplex workload
balancing. When the number of transport objects in the pool reaches the
db2.jcc.maxTransportObjects value, transport objects that have not been used
for longer than the db2.jcc.maxTransportObjectIdleTime value are deleted from
the pool
For version 3.63 or 4.13 or later of the IBM Data Server Driver for JDBC and
SQLJ, the default is 1000. For earlier versions of the driver, the default is -1.
Any in-service level of DB2 Connect drivers or DB2 Connect server will work
with DB2 V11 CM and V11 NFM
DB2 Connect in service versions are V9.5 and later
Current DB2 LUW Fixpack Support
DB2 LUW 9.7 FP5
DB2 LUW 10 GA
DB2 LUW 10.5 GA
© 2016 IBM Corporation
11
DB2 Client and Driver–Some Highlights
• DB2 Connect - Open Source Charter
– Available for all of the major open source languages and platforms
– Available through standard community repositories
• Node.js: npm install ibm_db
• Python: pip install ibm_db
• Ruby: gem install ibm_db
• PHP: pecl install ibm_db2
• Platform support
– Java 8 support (JCC)
– Next generation OS support – Windows 10, Windows 2016
– Entity Framework 7.0 support (Beta) - .Net Provider
• Type 2 z/OS: IMS Environment
– KeepDynamic support
– Prepared Statement pooling
© 2016 IBM Corporation
12
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
Review of Simplified Database Connections
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
13
DB2 Connect overview
DB2 Connect provides fast and robust connectivity to IBM® mainframe databases for applications running on Linux, UNIX, and Windows operating systems.
DB2® for i, DB2 for z/OS®, and DB2 Server for VM and VSE continue to be the database systems of choice for managing critical data for the largest organizations in the world. There is a great demand to integrate this data with applications running on Linux, UNIX, and Windows operating systems.
DB2 Connect has a number of DB2 Connect server products that are several connection solutions. A DB2 Connect server is a server that concentrates and manages connections from multiple desktop clients and Web applications to DB2 database servers running on mainframes or IBM Power Systems™ servers. You can replace DB2 Connect server with DB2 Connect client and receive equivalent or superior function. In addition, you can reduce complexity, improve performance, and deploy application solutions with smaller footprints for your business users.
DB2 z/OS Lab Strategic Goal:Avoid the use of DB2 Connect Gateways
Source: lnformationCenter DB2 V10.5 LUWhttp://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.wn.doc/doc/c0023092.html?lang=en
© 2016 IBM Corporation
14
IBM Data Server Driver and Clients as requesters: DB2 Connect has several connection solutions, including DB2 Connect Personal
Edition and a number of DB2 Connect server products. A DB2 Connect server is
a server that concentrates and manages connections from multiple desktop
clients and Web applications to DB2 database servers running on mainframes or
IBM Power Systems™ servers. It is strongly recommended that you use a
DB2 Connect client, notably the IBM data server drivers and clients, instead
of the DB2 Connect server. IBM data server drivers and clients provide the
same connection and application development functionality as the DB2
Connect server. However, you can reduce complexity, improve
performance, and deploy application solutions with smaller footprints for
your business users. DB2 Connect license files are required.
With DB2 for LUW Version 9.5 FixPack 3 and later you can implement the DRDA
AR functions for your distributed applications with varied degrees of granularity.
Instead of the current function and large footprint of the DB2 Connect Server, you
can choose from the IBM Data Server Drivers, the IBM Data Server Runtime
Client, and the IBM Data Server Client. The IBM Data Server Drivers include:
– IBM Data Server Driver Package
– IBM Data Server Driver for JDBC and SQLJ
DB2 z/OS Lab Strategic Goal:Avoid the use of DB2 Connect Gateways
Source: lnformationCenter DB2 V9.7 LUWhttp://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.qb.dbconn.doc/doc/r0059046.html
© 2016 IBM Corporation
15
DB2 z/OS Lab Strategic Goal:Elimination of DB2 Connect Gateways… Elimination of DB2 Connect Gateways Provides:
– Simplifies Network Topology
– Application server direct connection to DB2 z/OS
– Lowers DB2 Total Cost of Computing (TCO)
– No other DBMS uses gateways
– Improves Performance
– Elimination of network hop and DB2 Connect Gateway routing
– Improves Availability
– DB2 Connect Gateway clustering eliminated
– Simplifies Code Maintenance
– Update code of clients/drivers only and no coordination of gateway code changes
– DB2 database base features are enabled in the driver and not gateways
– To support a new version of DB2 requires updating the driver and gateways Just Add DB2 Connect License File to Client or Driver or use db2connectactivate utility Be careful when considering the elimination of DB2 Connect Gateways that you don’t violate
current DB2 Connect licensing agreement. If your company has any other version than DB2
Connect Unlimited Edition, I would suggest contacting your IBM Sales Specialist to verify
compliance
Multi-transport models such as Tuxedo, WebLogic, and Encina still require a middle-tier DB2
Connect Server.
No gateway to blame for
Performance issues
Aka “We have a DB2 Connect
Problem”
© 2016 IBM Corporation
16
DB2 Client and Driver – Some HighlightsCentralized License V9.7 FP3
The db2connectactivate utility activates the license for DB2 Connect™ Unlimited
Edition for System z® on any DB2® for z/OS® subsystem that you want to access
directly.
© 2016 IBM Corporation
17
DB2 Client and Driver – Some HighlightsThe db2connectactivate utility (Continued)
Included with IBM DB2 Connect 9.7 Unlimited Edition for System z Quick Start and
Activation download entry from Passport Advantage
The above command creates the routine SYSIBM.DB2CON_LIC in the DB2 subsystem
Don’t Forget: DB2 Connect license upgrade needed at each DB2 Connect
release boundary
© 2016 IBM Corporation
18
To make direct connections(Don’t forget direct connections depend on the appropriate DB2 Connect license)
Add the DB2 Connect license using the db2connectactivate utility to the DB2 z/OS
subsystem
Place the DB2 Connect Java license db2jcc_license_cisuz.jar to the classpath for Java
Use the db2licm utility to add the DB2 Connect license to the client
db2consv_zs.lic – Example: DB2 Connect Unlimited Ed. License
© 2016 IBM Corporation
19
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
–Review of Clients and Drivers Available
–Deployment Strategies
–Review of Client Setup
IBM Data Server Driver Package (aka DS driver)
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
20
IBM Clients and Drivers – DB2 V10.5 LUW
IBM data server client and driver typesThe following lists the IBM data server clients and drivers:
– IBM Data Server Driver Package(DS driver)
– IBM Data Server Driver Package - Without Encryption
– IBM Data Server Driver for JDBC and SQLJ
– IBM Data Server Driver for ODBC and CLI
– IBM Data Server Driver for ODBC and CLI - Without Encryption
– IBM Data Server Runtime Client
– IBM Data Server Client
You can add DB2 Connect™ capability to any client or driver.
The IBM Data Server Driver Package is a lightweight deployment solution that provides runtime support for applications without the need to install the Data Server Runtime Client or Data Server Client. This driver has a small footprint and is designed to be redistributed by independent software vendors (ISVs) and to be used for application distribution in mass deployment scenarios that are typical of large enterprises.
It is also recommended that the IBM Data Server Driver Package be installed first. It can then be configured to work in conjunction with DB2 Connect™.
In addition, a separate product, DB2 Connect Personal Edition, includes all the functionality of IBM Data Server Client plus the capability to connect to midrange and mainframe databases.
Source DB2 V10.1 LUW Information Center: http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.swg.im.dbclient.install.doc/doc/c00226
12.html?cp=SSEPGG_10.5.0%2F1-2&lang=en
© 2016 IBM Corporation
21
IBM Clients and Drivers
IBM DB2 Driver for JDBC and SQLJ (Aka the Java Common Client (JCC)/Universal Driver/Type-4 driver) is a 9 MB fully redistributable client provides JDBC and SQLJ applications access to DB2 data servers. If you are connecting to a DB2 for System i or DB2 for System z data server, you are still required to purchase the DB2 Connect product.
IBM Data Server Driver Package (aka - ds driver): is a 70MB lightweight deployment solution for Windows applications. For applications using ODBC, CLI, .NET, OLE DB, PHP, Ruby, JDBC, or SQLJ, use . IBM Informix Dynamic Server support for .NET, PHP, and Ruby. Combines
The IBM Data Server Runtime Client: is approximately 184MB in size and provides a means for applications to be executed against remote DB2 databases. GUI tools are not shipped with the IBM Data Server Runtime Client. Support for common database access interfaces: JDBC, ADO.NET, OLE DB, ODBC, DB2 Command Line Interface (CLI), PHP, and Ruby. This includes drivers and capabilities to define data sources. IBM Informix Dynamic Server support for PHP, Ruby, .NET and JDBC
The IBM Data Server Client: is a 360MB collection of client application drivers and tools for DB2 and Informix IDS data servers. The set of application drivers for DB2 include: embedded SQL, ODBC/CLI, JDBC/SQLJ, OLEDB, .NET, PHP, Perl, and Ruby. Data access and administration tools are providing including: DB2 Control Center (Windows and Linux) and DB2 Command Line Processor (CLP). The set of application drivers for Informix IDS v11.10, or later, include: JDBC, .NET, PHP, and Ruby. The IBM Database add-ins for Visual Studio 2005 are provided to simplify data access for .NET applications for both DB2 and IDS data servers.
Notes:
– DB2 Control Center and other Client GUI tools are deprecated in DB2 LUW 9.7
– DB2 10 for z/OS Announcement Memo states that DB2 Control Center is not supported
– Use IBM Data Studio and Optim Development Studio (Included with DB2 Connect) for workstation GUI tools – These include the Java Type-4 driver (no-charge) and do not need client/driver.
– IBM Data Server Driver for ODBC, CLI - Included on download site but is intended for ISV applications only
© 2016 IBM Corporation
22
Choosing the right Client/Driver
There is a functional overlap
Should balance functionality with footprint
© 2016 IBM Corporation
23
Client Deployment Strategies
Majority of client workstations are runtime oriented
– End user workstations
– App servers Runtime deployment IBM Data Server Driver
– IBM Data Server Driver is highly recommended - Lightest runtime focused client package
– Common client configuration across multiple levels
– No migration to move to newer levels - No database directory Developer deployment
– Essentially runtime plus tooling
– Start with ds driver
– Add Tooling package:
– Data Studio for Java
– Microsoft Visual Studio Add-Ins for .NET
(IBM Data Sever Package includes ADO.Net provider) Administrator deployment
– Using CLP for administration - Investigate use of CLP Plus
– Use Data Server Runtime Client DBA and All others
– Use Data Server Client Reminder: The larger the client package, the more that is included, the more that needs to be
rebound
Large
MB
Small
MB
Fit for purpose Clients and Drivers
© 2016 IBM Corporation
24
DB2 V9.7, 10.1 and 10.5 Clients and fix packs:http://www.ibm.com/support/docview.wss?uid=swg27007053
Documentation can be downloaded from: http://www.ibm.com/support/docview.wss?uid=swg27038430
© 2016 IBM Corporation
25
So… What would I see at the download site?current client and driver names
Notice the Runtime Client and Client are still available
IBM Data Server Driver Package
© 2016 IBM Corporation
26
1.
DB2 Client and DB2 Connect connection Setup
Excel
IBM Client
Web
Application server
IBM Data Server Client
DB2 Connect
Gateway servers
IBM Client
**Web Application server With DB2 Connect or
Type-4 Java Driver or Data Server Driver
IBM Client
Internet Explorer
DB2 Connect PE
3.
2.
DB2 z/OS
Subsystem Name: DB2T
DNS: my.sysz.com
Port: 446
Location Name: SYSZDB2T
DB2 Client:
DNS: my.db2conn.com
Port: 50000
Location Name: SYSZDB2T
DB2 Connect/PE:
DNS: my.sysz.com
Port: 446
Location Name: SYSZDB2T
DB2 Connect:
DNS: my.sysz.com
Port: 446
Location Name: SYSZDB2T
© 2016 IBM Corporation
27
Examples of manually cataloging client and gateway connections – Using DB2 Client Catalog commands
DB2 client catalog statements:
– catalog tcpip node ndcdb205 remote my.db2conn.com server 50000
ostype os390
– catalog db ndcdb205 at node ndcdb205
DB2 gateway catalog statements:
– catalog tcpip node ndcdb205 remote my.sysz.com server 446 ostype
os390
– catalog db ndcdb205 at node ndcdb205
– catalog dcs database ndcdb205 as ndcdb205
(Note: the dcs connection identifies this as a “host” connection)
© 2016 IBM Corporation
28
Catalog commands:
Node entry:
– Nick name for: communication protocol, and network location
DB entry:
– Database name and alias database name if two database have the
same name
– Authentication - SERVER, SERVER_ENCRYPT, CLIENT, KERBEROS,
and DATA_ENCRYPT
DCS (aka host) entry:
– Identify remote database as z/OS, OS/400, VSE or VM
– Additional parameters:
– SQLCODE map-file, disconnect processing, INTERRUPT_ENABLED, SYSPLEX, LOCALDATE format, Bidirectional CCSID
© 2016 IBM Corporation
29
Configuration Assistant - GUI to setup connections
In addition to configuring database and testing connections, connection profiles can be created too. Connection profiles are useful for replication of client setup. Note: ADO.Net
provider is not include in the “Test Connection” tool.
Test connections with any of the drivers…
Not available in 10.1 and 10.5 anymore….
See “db2cli writecfg “for another option
© 2016 IBM Corporation
30
ODBC Data Source Administrator
The Microsoft ODBD Data Source Administrator tool can update the db2cli.ini file with DB2
properties
© 2016 IBM Corporation
31
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
–Background and Installation
–New tools:
–db2cli.ini, db2dsdriver.cfg
–db2dsdcfgfill, db2cli registerdsn, db2cli validate and
CLPPlus
–SysPlex Setup
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
32
IBM Data Server Driver Package - DB2 LUW 9.5+ IBM Data Server Driver Package is a lightweight deployment solution that provides
runtime support for applications using ODBC, CLI, .NET, OLE DB, PHP, Ruby, JDBC, or SQLJ without the need of installing Data Server Runtime Client or Data Server Client. This driver has a small footprint and is designed to be redistributed by independent software vendors (ISVs), and to be used for application distribution in mass deployment scenarios typical of large enterprises.
The IBM Data Server Driver Package capabilities include:
– The DB2 Command Line Processor Plus (CLPPlus) for dynamically creating, editing, and running SQL statements and scripts.
– Support for applications that use ODBC, CLI, PHP, or Ruby to access databases.
– Support for client applications and applets that are written in Java using JDBC, and for embedded SQL for Java (SQLJ).
– IBM Informix® Dynamic Server support for .NET, PHP, and Ruby.
– Support for running embedded SQL applications. No precompiler or bind capabilities are provided.
– Application header files to rebuild the PHP, Ruby, Python, and Perl drivers. The Python and Perl drivers are not available in IBM Data Server Driver Package; however, you can download and build these drivers using the header files.
– Support for DB2 Interactive Call Level Interface (db2cli).
– Support for the for DRDA® traces (db2drdat). On Windows® operating systems, IBM Data Server Driver Package also provides
support for applications that use .NET or OLE DB to access databases. In addition, this is available as an installable image, and merge modules are available to allow you to easily embed the driver in a Windows Installer-based installation.
© 2016 IBM Corporation
33
IBM Data Server Driver Package Installation/Configuration ODBC, CLI, OLE-DB and.NET or open source (Perl, PHP)
No database directory
The db2dsdriver.cfg file is XML based, A schema file – dsdriver.xsd, is shipped to allow client side validation of the file
The db2dsdcfgfill command copies the existing database directory information
from either the existing IBM Data Server Client or IBM Data Server Runtime Client
into the db2dsdriver.cfg configuration file
No migration of the database directory to move to newer levels
Add valid DB2 Connect license key(s) to the directory:
C:\Program Files\IBM\IBM DATA SERVER DRIVER\license
© 2016 IBM Corporation
34
IBM Data Server Driver Package
Installation/Configuration (continued): Connection information is recorded in either:
– Text file: db2cli.ini
– XML file: db2dsdriver.cfg
– db2cli.ini has priority over db2dsdriver.cfg
• db2cli registerdsn utility will register all the Data Sources available in the db2cli.ini
file or the db2dsdriver.cfg file. The data sources can be registered either as a
System Data Source or as a User Data Source (See IBM DB2 Dirver Package
section for more details on this utility).
• db2cli registerdsn -add -alldsn –system
• db2cli validate utility wil validate and tests the configuration files of: db2cli.ini
and db2dsdriver.cfg
• Command Line Processor Plus (CLPPlus) provides a command line user interface
that you can use to connect databases and to define, edit, and run statements,
scripts, and commands
© 2016 IBM Corporation
35
IBM Data Server Driver Package
Installation/Configuration (continued):• To migrate from the Runtime Client or Client to the IBM Data Server Driver Package
• Uninstall Runtime Client or Client
• Install the IBM Data Server Driver Package (Response file available)
• Note: Microsoft Global Assembly Cache (GAC) Automatically Updated
During Installation
• Include the database connections in the db2dsdriver.cfg (db2cli.ini optional)
• Include the DB2 Connect license for direct connections to DB2 z/OS
• Optional: Run “db2cli registerdsn” to update ODBC Data Source
Administrator for ODBC applications
• For DB2 CLI applications see Information Center:
© 2016 IBM Corporation
36
Data Server Driver Package Installation New Directory
SQLLIB is not used with Data Server Driver Package
© 2016 IBM Corporation
37
Data Server Driver Package – DB2 Connect License
Place the desired DB2 keys in the license directory
– db2consv_zs.lic – Example: DB2 Connect Unlimited Ed. License
– db2jcc_license_cisuz.jar – Example Java Driver License
(Don’t forget to add to classpath for Java)
No db2licm utility! Also Remember 9.7 FP3 - The db2connectactivate utility activates the license for
DB2 Connect™ Unlimited Edition for System z® on any DB2® for z/OS® subsystem
that you want to access directly.
© 2016 IBM Corporation
38
Data Server Driver PackageNew location for driver information
Location:
Pre. Win. 7: C:\Documents and Settings\All Users\Application
Data\IBM\DB2\IBMDBCL1\cfg
Win. 7 and later: C:\ProgramData\IBM\DB2\DB2COPY1\cfg
No DB2 Client Directory
Connection information stored in files:
– db2cli.ini or db2dsdriver.cfg
© 2016 IBM Corporation
39
Sample db2cli.ini file
Information on db2cli.ini file setup:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.apd
v.cli.doc/doc/c0007882.html
Information on db2cli.ini parameters see: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.apdv.
cli.doc/doc/r0007964.html
© 2016 IBM Corporation
40
Sample db2dsdriver.cfg provided – XML FileAlias Section –
Allows more than
one reference to
a database
Database Section –
Allows only one
reference to a database
provides additional
parameters
Global Parameter Section –
Default parameters for all
defined databases
© 2016 IBM Corporation
41
Sample db2dsdriver.cfg provided –Data Studio XML Designer
© 2016 IBM Corporation
42
My db2dsdriver.cfg
Alias
Database/
Location
Name DSName IP/Port
Additional
DB Parameters
For NDC05
Two
names
for
NDC05
© 2016 IBM Corporation
43
db2dsdriver.xsd XML Schema Provided
© 2016 IBM Corporation
44
IBM Data Server Driver Configuration Parameters Available
IBM data server driver configuration keywords db2dsdriver.cfg See:
http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.swg.im.dbclie
nt.config.doc/doc/c0054698.html?cp=SSEPGG_10.5.0%2F2-0-2-5-7-0-7&lang=en
© 2016 IBM Corporation
45
IBM Data Server Driver Configuration Parameters Sample
© 2016 IBM Corporation
46
db2dsdcfgfill Tool to create db2dsdriver.cfg file from your existing DB2 Client or DB2 Runtime setup
Tool is not included with the drivers
Good starting point to create your XML configuration point
© 2016 IBM Corporation
47
db2dsdcfgfill continueddb2dsdcfgfill -i db2 -o c:\
db2dsdriver.cfg
© 2016 IBM Corporation
48
db2cli registerdsn feature registerdsn
– Specifies the db2cli register DSN mode. Use this command parameter to register an ODBC data source name.
– -add dsn_name
– Adds a system or user ODBC data source to the Microsoft ODBC Data Source Administrator. The dsn_name variable specifies a single data source to be added or all data sources present in the db2cli.ini and db2dsdriver.cfg file may be added using the -alldsn parameter. The value of dsn_name must be the data source name and not the DBALIAS name. The data source name must be present in the db2cli.ini or db2dsdriver.cfg file.
– -alldsn : Specify this parameter to register all the data sources available in the db2cli.ini and db2dsdriver.cfg file. This parameter must be used with the -add parameter.
– -user: Specifies to register a user ODBC data source. This is the default if no parameter is specified.
– -system: Specifies to register a system ODBC Data Source
– -remove dsn_name
– Removes a system or user ODBC Data Source from the Microsoft ODBC Data Source Administrator.
– -list
– List all the system or user IBM Data Server ODBC Data Sources registered in the Microsoft ODBC Data Source Administrator.
– -help
– Displays help information related to the db2cli register DSN mode.
© 2016 IBM Corporation
49
db2cli registerdsn… db2cli registerdsn -add -alldsn -system
The –system parameter approximates the
DB2 cli catalog command that registers
ODBC data sources
© 2016 IBM Corporation
50
db2cli32.exe - Windows 7 32-bit and 64-bit Support
Customers that are migrating to Windows 7 seem to be adopting the 64-bit O/S implementation, which supports both 32-bit and 64-bit applications. Starting with DB2 Version 9.7 Fix Pack 4, you can use the db2cli32 command and the db2cli command, if you are using 32-bit and 64-bit ODBC applications in Windows 7 64-Bit O/S. For example:
db2cli registerdsn -add sampledsn –systemdb2cli32 registerdsn -add sampledsn –system
When using the DS “Driver Package” the db2dsdriver.cfg file will be used as input for the db2cli32 command. This will allow registering of the database located in the db2dsdriver.cfg for both 32-bit and 64-bit ODBC database connections.
When using the DS “Client” – the normal catalog ODBC command will register 64-Bit ODBC database connections. Use the db2cli32 command to register 32-Bit ODBC database connections. The db2cli32 command will search for cataloged databases in the DB2 Client instance and the db2dsdriver.cfg file.
© 2016 IBM Corporation
51
db2cli32.exe - Windows 7 32-bit and 64-bit Support...
Creating odbc dsn to the alias
Create a system dsn for dsn alias sampledsn using the following command:
You can test the newly created ODBC dsn using Microsoft applications like MS Excel.
Procedure
1. Launch odbc administrator tool from Control Panel->Administrative Tools-> Data Sources (ODBC) for 64 bit
binary. For 32-bit binary in a 64-bit machine, launch odbc administrator tool from System
Drive:\windows\SysWOW64\odbcad32.exe. Example: c:\windows\syswow64\odbcad32.exe
2. The list of user data sources is displayed, by default. Click System DSN tab.
3. Select the newly created dsn (sampledsn in our example) and click Configure.
4. Provide user name, password and click Connect. The message "Connection tested successfully" is
displayed.
5. Now launch Microsoft applications like MS Excel and use the newly created dsn. To do the same, bring up
MS excel. For example,
1. Launch MS Excel 2003.
2. Go to Data->Import External Data-> New Database Query. The list of odbc dsn's is displayed in a list box.
Note: A 32-bit excel application will show only 32-bit dsn's in the list box and 64-bit excel will show only
64-bit dsn's in the list box.
3. Select the dsn that (sampledsn in our example) you want to connect to, and provide the login details.
4. The list of tables is displayed in the database.
© 2016 IBM Corporation
52
db2cli validate feature
Validates and tests the db2cli.ini or db2dsdriver.cfg files environment configuration.
– -dsn dsn_name
– Specify the data source name to validate.
– -database database:server:port
– Specify the database name, server and port number to validate. The information must
be specified using a colon to separate the database name, server and port number.
For example, TESTDB:dbserver.example.com:19677
– -connect
– db2cli validate will connect to a specified data source name or database and output
information about the connection attempt.
– -user username - Specifies the username to use for the connection.
– -passwd password - Specifies the password to use for the connection.
– -f OUTPUT_FILE
– Specify an optional output file for the results of the db2cli command.
– -help
– Displays help information related to the db2cli validate mode.
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.dbclient.install.doc/doc/r0058814.html
For more details see InfoCenter link below:
© 2016 IBM Corporation
53
db2dsdriver.cfg syntax validationCommand: db2cli validate Can be used to:
– Check the syntax of your db2dsdriver.cfg
– Check the driver version
© 2016 IBM Corporation
54
db2cli validate
Can be used to:
– Check the parameters being
used by a connection entry
– Check the ODBC Data Source
Administrator parameters
being used too
Command: db2cli validate – dsn data_source_name
© 2016 IBM Corporation
55
db2cli writecfg
• Updates the db2dsdriver.cfg configuration file.
• The db2cli writecfg command does not verify the syntax or validate the value
of the specified parameter.
db2cli writecfg add –dsn alias2 –database name2 -host server1.net1.com -port 50001
<dsncollection>
<dsn alias="alias1" name="name1" host="server1.net1.com" port="50001">
<parameter name="DisableAutoCommit" value="TRUE"/>
</dsn>
<dsn alias="alias2" name="name2" host="server1.net1.com" port="50001"/>
</dsncollection>
db2cli writecfg add –database name2 –host server1.net1.com -port 50001 -parameters “LockTimeout=20;
KeepAliveTimeout=20000”
<databases>
<database name="name1" host="server1.net1.com" port="50001">
<parameter name="CurrentSchema" value="OWNER1"/>
</database>
<database name="name2" host="server1.net1.com" port="50001">
parameter name=" LockTimeout" value="20"/>
parameter name="KeepAliveTimeout" value="20000"/>
</database>
</databases>
© 2016 IBM Corporation
56
Order of precedence for obtaining database information
© 2016 IBM Corporation
57
CLPPlus
DB2 Command Line Processor Plus (CLPPlus) for dynamically creating,
editing, and running SQL statements and scripts. Supports aliases in
db2dsdriver.cfg file.
Note: CLPPLUS is not configured automatically
© 2016 IBM Corporation
58
Sample of a CLPPlus connection –- IBM Data Server Driver Package – Java Direct Connection- Replacement for Command Window and Command Line Processor
© 2016 IBM Corporation
59
CLI/.NET Driver
Logical
Connection
3
Logical
Connection
1
Logical
Connection
2
disconnect
at commit/rollback
pooled connections
to DB2 server
Transport
1
Transport
2Thread
3
Thread
1
Thread
2
C Process
Sysplex Workload Balancing using the IBM Data Server Driver
DB2 Group
DB2 forz/OS
Note: CLP does not support Sysplex WLB
CF
DB2 forz/OS
© 2016 IBM Corporation
60
IBM Data Server Driver Package PropertiesProperties for fine-tuning Sysplex workload Balancing direct connections from non-Java applications to DB2 for z/OS
© 2016 IBM Corporation
61
IBM Data Server Driver Package PropertiesBasic Settings for Sysplex Workload BalancingDirect connections from non-Java applications to DB2 for z/OS
© 2016 IBM Corporation
62
Sample WLB Configuration (part of db2dsdriver.cfg)
<databases><database name="STLEC1" host=“MY.ZOS.COM" port="446">
<WLB><parameter name="enableWLB" value="true"/><parameter name="maxTransports" value="100"/><parameter name="maxTransportIdleTime" value="600"/><parameter name="maxTransportWaitTime" value="30"/><parameter name="maxRefreshInterval" value="30"/>
</WLB><ACR>
<parameter name="enableACR" value="true"/><parameter name="enableSeamlessACR" value="true"/>
</ACR></database>
</databases>
© 2016 IBM Corporation
63
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
DB2 z/OS System Profile Monitoring
What is after Clients and Drivers?????
Documentation and References
© 2016 IBM Corporation
64
DB2 z/OS System Profile Monitoring –Versions 10/11lLevel
Enhancements for monitoring system level activities:
Profile table facility enhanced to provide improved threshold monitoring and filtering through new fields/keywords.
–Enhancements apply only to system level monitoring related to threads and connections, not to statement level monitoring and tuning.
Monitor profile extended to support monitoring of:
–Idle thread timeout
–Number of threads
–Number of connections
Monitor profile includes ability to filter by ROLE and client product-specific identifier (PRDID).
–Provides a finer degree of control over the monitor profiles.
Allows thresholds to be enforced at a more granular level, which were previously available at the system level via ZParm.
Provides greater flexibility and control for allocating resources to particular clients, applications and users according to priorities or needs.
© 2016 IBM Corporation
65
DB2 z/OS System Profile Monitoring –Versions 10/11lLevel
Monitoring system level activities related to threads and connections:
Following profile tables must be created:
–DSN_PROFILE_TABLE
–DSN_PROFILE_HISTORY
–DSN_PROFILE_ATTRIBUTES
–DSN_PROFILE_ATTRIBUTES_HISTORY
–Tables will be created by DSNTIJSG job.
1.Specify activity to monitor by creating a profile in DSN_PROFILE_TABLE.
−Four filtering categories:
−IPADDR, PRDID, ROLE/AUTHID and COLLID/PKGNAME
© 2016 IBM Corporation
66
DB2 z/OS System Profile Monitoring –Versions 10/11lLevelLevel
Monitoring system level activities related to threads and connections: (continued)
2.Define monitoring by inserting a row into DSN_PROFILE_ATTRIBUTES.
−Three keywords with two attribute columns:
−MONITOR THREADS: Number of concurrent active threads… cannot exceed MAX_REMOTE_ACTIVE (MAXDBAT).
−MONITOR CONNECTIONS: Number of active and inactive remote connections using TCPIP… cannot exceed MAX_REMOTE_CONNECTED (CONDBAT).
−MONITOR IDLE THREADS: Time (in seconds) that an active server thread should be allowed to remain idle… cannot exceed IDLE_THREAD_TIMEOUT (IDTHOIN).
−ATTRIBUTE1: Specify WARNING or EXCEPTION and can include suffix of “_DIAGLEVEL1” or “_DIAGLEVEL2”.
−ATTRIBUTE2: Specify threshold value.
© 2016 IBM Corporation
67
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
DB2 z/OS System Profile Monitoring
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
68
Introducing z/OS Connect Mobile and Cloud connectivity to backend z/OS assets
Provides a consistent way to discover and call in to application assets on
z/OS
Runs in Liberty profile
Uses RESTful service and JSON payloads.
Capable of converting JSON to data format required by backend service
No additional cost, packaged with WAS, CICS and IMS
IBM DB2 Accessories Suite for z/OS V3.3 includes DB2 Adapter for z/OS
Connect
Java, so runs on specialty engines
Example of invocation
http://<hostname>:<port>/zosConnect/services/CUSTOMER_INQ?
action=invoke<JSON payload>
© 2016 IBM Corporation
69
z/OS Connect Overview
• REST–Representational State
Transfer … the use of HTTP URLs
that map to a ‘service’, such as
‘query account’ or ‘update data’
• JSON–JavaScript Object Notation …
a standard of representing data as a
set of name/value pairs. This is
passed back and forth along with
REST request/responses
• Liberty Profile Server
• Function IBM wrote to run in Liberty
Profile
• No charge function provided with
license entitlement to
© 2016 IBM Corporation
70
Data Studio Tooling for z/OS Connect –End-to-End Development
© 2016 IBM Corporation
71
© 2016 IBM Corporation
72
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
73
InfoSphere Optim Configuration Manager Included with
DB2 Connect Unlimited Advanced Edition for System z
DB2 Administration Solution Pack for z/OS
DB2 Advanced Enterprise Server Edition
Client Management
Identify connections to DB2
Track client/driver versions and parameters
Monitor changes to client and database
Correct client connect parameters
Explore subystems, database, instances and more
Server Management
Redirect connections to different databases
Correct workload balancing and
Performance Management
Change connection parameters
Direct connections to different profiles for:
RLF, DB2 10 Connection Profiles or WLM Service Classes
Correct improperly classified connections
Direct problem applications to penalty boxes
Paul thinks of this as “Super DB2 Connect”...
© 2016 IBM Corporation
74
InfoSphere Optim Configuration Manager
Understand Your
Environment
Explore client and database
server properties
Create a baseline inventory
of clients for upgrades
Solve Problems Faster
Prevent problems by scheduling
configuration compare jobs that
issue Alerts for differences
Keep configurations in synch
Debug problems faster by reviewing
recent changes made to client or
server configurations
Centrally Manage Entire DB2
z/OS Environment
Deploy Location Aliases or
Application Profiles with DB2 for
z/OS v10
Define zParms with DB2 for z/OS
v9 or DB2 for z/OS v10
Show changes made via z Admin
Tool and z Admin OC Tool
Control Clients (JCC, CLI, .NET)
Isolate/Throttle “rogue” Apps to limit
impact on the SYSPLEX
Enforce best practices configuration –
WLM, WLB, WAS Pool or any driver,
data source, special register settings
Redirect client connections for high
availability or staged roll-outNote: With OCM client install
© 2016 IBM Corporation
75
Optim Configuration Manager
Client Management
Every distributed performance problem is a “DB2 Connect” problem
The DB2 Connect gateway is the excuse for many distributed computing problems
Difficult to understand what is going on inside the mainframe black box (System z
cabinets are really black too)
DBAs
Don't have access to application and driver configurations
Don't have access to web application server configurations
Have problem understanding which applications programs that are associated with
DB2 threads
Hang on to DB2 Connect gateways because it is a point of control (Note: no other
relational DBMS needs a gateway for connections)
Customers perceive DB2 Connect gateways providing connection control, but are
actually very limited in abilities
Usually don't have ability revise WLM connection information
Systems Programmers
Can't control and don't trust distributed application program or web server setup
Difficult to education all of the distributed teams about criteria used to prioritize
work
User Id. Is the only trusted connection property
© 2016 IBM Corporation
76
Optim Configuration Manager Can Change
• TCP/IP Connection Information (DNS Names, Ports and Locations)
– Allowing redirection of work to different databases
• Redirect WebSphere applications from test to Q/A databases
• Change connections to different DB2 Sysplex aliases
• Correct TCP/IP DNS names to use z/OS VIPA
• Extended Client Connection Information (ECCI)
(Client Accounting, Client Application, Client User and Client Workstation)
– The client information fields are monitored by DB2 z/OS’s: RLF, Profiles or WLM
Service Classes
• RLF – Limits CPU cycles consumed
• DB2 10 Connection Profiles – Controls number of connections to DB2 z/OS
and connection profiles
• WLM – Manages thread priority
– Correct improperly classified work to limit CPU consumption
– Direct connections to penalty boxes
• Limit the number of CPU cycles
• Restrict the number of concurrently executing treads
• Reduce processing priority
© 2016 IBM Corporation
77
Optim Configuration Manager–Data Tools Runtime Client
• The Vision…
• Aware client (managed client) exchanges information and processing instructions
with the management servers – The very smart driver
Application Environment
DB2 for z/OS
IBM Data
Server Driver
OMPE
Server
DTRC
Client
DB2 for LUWOPM
Server
OCM
Server
pQ
Server
© 2016 IBM Corporation
78
Optim Configuration Manager
Sample:
Client Information
#1
© 2016 IBM Corporation
79
Optim Configuration Manager - Some Samples
Sample:
Client Information
#2
© 2016 IBM Corporation
80
Optim Configuration Manager - Some Samples
Sample: Driver Connection Update #1
© 2016 IBM Corporation
81
Optim Configuration Manager - Some Samples
Sample: Driver Connection Update #2
© 2016 IBM Corporation
82
Optim Configuration Manager - Some SamplesSample: Workload Manager Update #1
© 2016 IBM Corporation
83
Optim Configuration Manager - Some SamplesSample: Workload Manager Update #2
© 2016 IBM Corporation
84
What’s new for DB2 Clients and Drivers?Agenda Highlights
IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Gateways
IBM Data Server Clients and Drivers
IBM Data Server Driver Package (aka DS driver)
What is after Clients and Drivers?????
InfoSphere Optim Configuration Manager – (OCM)
Documentation and References
© 2016 IBM Corporation
85
Documentation and References DB2 Connect User’s Guide – 10.5
• Chapter 6 – Monitoring DB2 Connect Server
• Chapter 9 - Tuning
• Chapter 10 - Trouble Shooting DB2 Connect
DB2 9 for z/OS: Distributed Functions (Redbook SG24-6952)
• Chapter 7 Performance analysis
• Chapter 8 Problem determination
DB2 10 for z/OS Technical Overview (Redbook SG24-7892)
• 9.2 Monitoring and controlling connections and threads at the Server
DB2 11 for z/OS Technical Overview (Redbook SG24-8190)
• 9.1 Client information enhancements
• DB2 Adapter for z/OS Connect:
Http://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/com.ibm.db2z.doc.adapter/src/tpc/adapter_zosconnect.dita?lang=en
• InfoSphere Optim Configuration Manger:
http://www.ibm.com/software/products/en/infosphere-optim-configuration-manager-z
© 2016 IBM Corporation
86
Questions?
© 2016 IBM Corporation
87