What`s new for DB2 Clients and Drivers?

Transcription

What`s new for DB2 Clients and Drivers?
®
What’s new for DB2 Clients and Drivers?
LOTS!
Paul Wirth
[email protected]
V3
© 2008 IBM Corporation
IBM Software Group | Information Management software
Disclaimer and Trademarks
Information contained in this material has not been submitted to any formal IBM review and is
distributed on "as is" basis without any warranty either expressed or implied. Measurements data
have been obtained in laboratory environment. Information in this presentation about IBM's future
plans reflect current thinking and is subject to change at IBM's business discretion. You should
not rely on such information to make business plans. The use of this information is a customer
responsibility.
IBM MAY HAVE PATENTS OR PENDING PATENT APPLICATIONS COVERING SUBJECT
MATTER IN THIS DOCUMENT. THE FURNISHING OF THIS DOCUMENT DOES NOT IMPLY
GIVING LICENSE TO THESE PATENTS.
TRADEMARKS: THE FOLLOWING TERMS ARE TRADEMARKS OR ® REGISTERED
TRADEMARKS OF THE IBM CORPORATION IN THE UNITED STATES AND/OR OTHER
COUNTRIES: AIX, AS/400, DATABASE 2, DB2, e-business logo, Enterprise Storage Server,
ESCON, FICON, OS/390, OS/400, ES/9000, MVS/ESA, Netfinity, RISC, RISC SYSTEM/6000,
System i, System p, System x, System z, IBM, Lotus, NOTES, WebSphere, z/Architecture, z/
OS, zSeries
The FOLLOWING TERMS ARE TRADEMARKS OR REGISTERED TRADEMARKS OF THE
MICROSOFT CORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES:
MICROSOFT, WINDOWS, WINDOWS NT, ODBC, WINDOWS 95
For additional inform ation see ibm .com /legal/copytrade.phtm l
2
IBM Software Group | Information Management software
What’s new for DB2 Clients and Drivers?
Agenda
 Highlights
– My List of Key Client and Driver Fixpacks
 IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Modules
 IBM Data Server Clients and Drivers
 IBM Data Server Driver Package
 IBM Data Server Driver for ODBC/CLI
 Documentation and References
o
It’s s
sy…
z/Ea
3
IBM Software Group | Information Management software
DB2 Client and Driver – Some Highlights
 DB2 9.1
– FP1 DB2 9 for z/OS LOB Progressive Streaming for locator Values
• IBM Data Server Provider for .NET support of trusted context
– FP2 DB2 .NET Data Provider is enhanced and support is added for the .NET Framework
2.0.
– FP5 Secure Sockets Layer (SSL) protocol is supported by database clients.
 DB2 9.5 Informix client and driver support, new name IBM Clients/Drivers
– Java driver DB2 9 for z/OS Trusted Context support
– FP1 IBM® Data Server Driver for JDBC and SQLJ Version 4.0 includes a number of
JDBC 4.0 capabilities. To use these capabilities, you need an SDK for Java, Version 6.
– FP2 Secure Sockets Layer (SSL) protocol is supported by database clients.
– FP3 Client-side support for DB2 for z/OS® Sysplex capabilities in IBM data server
clients and non-Java data server drivers that have a DB2 Connect license. Dec. 2008
• The IBM Data Server Drivers now include application header files for open source
drivers, support OLE DB, and can use a new configuration file.
– FP4 db2drdat is shipped with Data Server driver Package from 9.5 FixPack 4 and
higher.
4
IBM Software Group | Information Management software
DB2 Client and Driver – Some Highlights…
 DB2 9.7
– Deprecation Control Center and DB2 Admin Server Tools
– FP2 Includes DB2 Command Line Processor Plus (CLPPlus) for dynamically creating,
editing, and running SQL statements and scripts. Supports aliases in db2dsdriver.cfg
file.
– FP2 IBM Data Server Driver provides registerdsn, a command line utility to register
ODBC DSN on Windows ODBC Driver Manager. (This is key for IBM Data Server
Driver adoption for Microsoft web servers that have ADO.Net, OLE-DB and ODBC
applications installed.)
– FP2 32–bit drivers included in 64–bit package
• Starting in Version 9.7 Fix Pack 2, the 32-bit versions of IBM Data Server Provider for
.NET are included in the 64-bit driver package. When you install the 64-bit drivers, the
32-bit drivers are also installed, in a separate directory named, sqllib\bin\netf20_32.
5
IBM Software Group | Information Management software
DB2 Client and Driver – Some Highlights…
 DB2 9.7 continued…
– FP3 Full support for db2dsdriver configuration file extended to IBM data server
clients for CLI and open source applications
• Starting in Version 9.7 Fix Pack 3, the db2dsdriver.cfg configuration file can be used to retrieve
all database connection information and properties for CLI and open source applications that
use IBM® Data Server Client and IBM Data Server Runtime Client.
• In previous releases, IBM Data Server Client and IBM Data Server Runtime Client used the
db2dsdriver.cfg configuration file to retrieve only Sysplex-related settings. In Version 9.7 Fix
Pack 3 and later, CLI and open source applications that use IBM Data Server Client and IBM
Data Server Runtime Client can use information from the db2dsdriver.cfg configuration file to
connect to a supported database. Other applications that use IBM Data Server Client and IBM
Data Server Runtime Client, such as .NET applications or applications that use embedded SQL,
can retrieve only Sysplex-related settings from this configuration file.
• Starting in Version 9.7 Fix Pack 3, IBM Data Server Provider for .NET supports DB2 Universal
Database™ Version 10 for z/OS® which includes support for client disable dynamic statement
cache, extended indicators, Timestamp with timezone, and New explain features.
– FP3a Current Fix Pack recommended for DB2 10 for z/OS support
• I also recommend this Fix Pack as the minimum level for IBM Data Server Driver
Package adoption
6
IBM Software Group | Information Management software
What’s new for DB2 Clients and Drivers?
Agenda
 Highlights
 IBM’s Strategy Is To Remove The Reliance On The DB2
Connect Modules
– Review of Simplified Database Connections
– Avoidance of Binding Driver Packages
 IBM Data Server Clients and Drivers
 IBM Data Server Driver Package
 IBM Data Server Driver for ODBC/CLI
 Documentation and References
o
It’s s
sy…
z/Ea
7
IBM Software Group | Information Management software
DB2 z/OS Lab Strategic Goal:
Avoid the use of DB2 Connect Gateways
IBM Data Server Drivers and Clients as requesters:
 The IBM strategy is to remove the reliance on the DB2 Connect modules and
replace DB2 Connect with the IBM Data Server Drivers or Clients. While DB2
Connect licenses (in the form of DB2 Connect license files) are still required, you
can replace DB2 Connect modules with the IBM Data Server Drivers 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.
 With DB2 for LUW Version 9.5 FixPack 3 or FixPack 4 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 DB2 Connect, 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 for JDBC and SQLJ
 IBM Data Server Driver for ODBC and CLI
 IBM Data Server Driver Package
Source: IBM Redbook - DB2 9 for z/OS: Distributed Functions
SG24-6952 Section 2.3
8
IBM Software Group | Information Management software
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
– 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
 Just Add DB2 Connect License File to Client or Driver
 Be careful when considering the elimination of DB2 Connect Gateways that you
don’t violate current DB2 Connect licensing agreement. If you 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.
9
IBM Software Group | Information Management software
SQL Packages
 Adoption of IBM Data Server Drivers reduces the needs for client package binds
 Dynamic SQL packages standardized between CLI, .NET and JCC in V8
 Only changed once since then (driven by z/OS unique change)
 Changes documented:
http://www.ibm.com/developerworks/wikis/display/DB2/DB2+and+.NET
+FAQs#DB2and.NETFAQs-ChangesinCLI%2F.NETandJDBCpackages
 Changes in CLI / .NET and JDBC packages
– The packages were standardized in V8 of the DB2 LUW and DB2 Connect
clients. The following is the change history of these packages:
 Dynamic packages SYSSHxyy, SYSSNxyy, SYSLHxyy, SYSLNxyy:
– V8 GA - created
 SYSSTAT misc static statements:
– V8 GA - created
– V9.1 FP2, V9.5 GA - added additional sections for Jcc z/OS type 2
 Rebinds only need to happen when upgrading across one of the change points listed
above. For example, upgrading fro V8 GA to V9.1 GA would not require a rebind.
However, any upgrade from V9.1 FP1 would technically require a rebind because the
SYSSTAT package changed. However, the change affected the Jcc z/OS type 2
driver only, thus CLI and .NET, and other servers, need not rebind as they will be
unaffected by the change.
IBM Software Group | Information Management software
What’s new for DB2 Clients and Drivers?
Agenda
 Highlights
 IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Modules
 IBM Data Server Clients and Drivers
– Review of Clients and Drivers Available
– Deployment Strategies
– Review of Client Setup
 IBM Data Server Driver Package
 IBM Data Server Driver for ODBC/CLI
 Documentation and References
o
It’s s
sy…
z/Ea
11
IBM Software Group | Information Management software
IBM Clients and Drivers 9.7
 The IBM Data Server Runtime Client: is approximately 360MB 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 184MB 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.
 IBM Data Server Driver for ODBC, CLI: is a 54MB lightweight deployment solution for Windows
applications. It provides runtime support for applications using DB2 CLI API, ODBC API, or .NET API
without the need of installing the Data Server Client or the Data Server Runtime Client. IBM Informix
Dynamic Server support for .NET, PHP, and Ruby.
 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 This 2 MB fully redistributable client provides JDBC and SQLJ applications access to
DB2 data servers without installing and maintaining DB2 client code. 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: 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 IBM Data Server Driver for
ODBC, CLI and IBM DB2 Driver for JDBC plus .Net DB2® Command Line Processor Plus
(CLPPlus) for dynamically creating, editing, and running SQL statements and scripts.
IBM Software Group | Information Management software
Choosing the right Client/Driver
 There is a functional overlap
 Should balance functionality with footprint
13
IBM Software Group | Information Management software
Client Deployment Strategies
Small
MB
 Majority of client workstations are runtime oriented
– End user workstations
– App servers
 Runtime deployment IBM Data Server Driver
– IBM Data Server Driver 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 IBM Data Server 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
Large
MB
 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
IBM Software Group | Information Management software
DB2 V8, V9, V9.5 and V9.7 Clients and fix packs:
http://www.ibm.com/support/docview.wss?rs=56&uid=swg27007053
Documentation can be downloaded from:
http://www.ibm.com/support/docview.wss?rs=71&uid=swg27009474
IBM Software Group | Information Management software
So… W hat would I
see at the
download site?
DB2 9.7 Fixpack 2
current client and
driver names
Notice the Runtime
Client and Client
are still available
IBM Software Group | Information Management software
DB2 Client and DB2 Connect connection Setup
1.
IBM Client
Internet Explorer
DB2 z/OS
Subsystem Name: DB2T
DNS: my.sysz.com
Port: 446
Location Name: SYSZDB2T
DB2 Connect PE
DB2 Connect/PE:
DNS: my.sysz.com
Port: 446
Location Name: SYSZDB2T
2.
**Web Application server With DB2 Connect or
Excel
Type-4 Java Driver or IBM Data Server Driver
IBM Client
DB2 Connect
DB2 Client:
DNS: my.db2conn.com
Port: 50000
Location Name: SYSZDB2T
Gateway servers
3.
Web
Application server
IBM Client
IBM Data Server Client
DB2 Connect/PE:
DNS: my.sysz.com
Port: 446
Location Name: SYSZDB2T
IBM Software Group | Information Management software
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)
IBM Software Group | Information Management software
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
IBM Software Group | Information Management software
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.
Test connections with
any of the drivers…
IBM Software Group | Information Management software
What’s new for DB2 Clients and Drivers?
Agenda
 Highlights
 IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Modules
 IBM Data Server Clients and Drivers
 IBM Data Server Driver Package
– Background and Installation
– New tools:
• db2cli.in, db2dsdriver.cfg
• db2dsdcfgfill, db2cli registerdsn, db2cli validate and CLPPlus
• SysPlex Setup
 IBM Data Server Driver for ODBC/CLI
 Documentation and References
o
It’s s
sy…
z/Ea
21
IBM Software Group | Information Management software
IBM Data Server Driver Package
 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.
22
IBM Software Group | Information Management software
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
IBM Software Group | Information Management software
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
• Use db2cli registerdsn utility to 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
• New db2cli validate utility to 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
IBM Software Group | Information Management software
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)
• 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:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.swg.im.dbclient.install.doc/doc/t0007315.html
IBM Software Group | Information Management software
Data Server Driver Package Installation
 New Directory
 SQLLIB Not used anymore
26
IBM Software Group | Information Management software
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!
27
IBM Software Group | Information Management software
Data Server Driver Package
New location for driver information
 C:\Documents and Settings\All Users\Application Data\IBM\DB2\IBMDBCL1\cfg
 No DB2 Client Directory
 Connection information stored in files:
• db2cli.ins or db2dsdriver.cfg
28
IBM Software Group | Information Management software
Sample db2cli.ini file
 Information on db2cli.ini file setup:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.db2.luw.apdv.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
29
IBM Software Group | Information Management software
Sample db2dsdriver.cfg provided – XML File
Alias 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
30
IBM Software Group | Information Management software
Sample db2dsdriver.cfg provided –
Data Studio XML Designer
31
IBM Software Group | Information Management software
My db2dsdriver.cfg
Database/
Location
DSName
Alias Name
IP/Port
Two
names
for
NDC05
Additional
DB Parameters
For NDC05
32
IBM Software Group | Information Management software
db2dsdriver.xsd XML Schema Provided
33
IBM Software Group | Information Management software
IBM Data Server Driver Configuration Parameters Available
For Additional Information on db2dsdriver.cfg See: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.swg.im.dbclient.config.doc/doc/c0054555.html
34
IBM Software Group | Information Management software
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
35
IBM Software Group | Information Management software
db2dsdcfgfill continued
db2dsdcfgfill -i db2 -o c:\
db2dsdriver.cfg
36
IBM Software Group | Information Management software
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.
37
IBM Software Group | Information Management software
db2cli registerdsn…
db2cli registerdsn -add -alldsn -system
The –system parameter approximates the
DB2 cli catalog command that registers
ODBC data sources
38
IBM Software Group | Information Management software
db2cli registerdsn feature (Continued)
Note: 64-Bit W indows 7 and 32-Bit ODBC driver support
 That the registerdsn tool only updates W indow 7 64-Bit O/S
64-Bit ODBC Data Source Administrator. T
 There is a special build available in V9.7 FP3 for 64-Bit
W indows 7, that will provide a tool to register 32-Bit ODBC data
sources in addition to 64-bit ODBC data sources.
39
IBM Software Group | Information Management software
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.
40
IBM Software Group | Information Management software
db2cli validate
Command: db2cli validate
 Can be used to:
– Check the syntax of your db2dsdriver.cfg
– Check the driver version
41
IBM Software Group | Information Management software
db2cli validate
Command: db2cli validate – dsn data_source_name
 Can be used to:
– Check the parameters
being used by a
connection entry
– Check the ODBC Data
Source Administrator
parameters being used
too
42
IBM Software Group | Information Management software
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 installed automatically
43
IBM Software Group | Information Management software
Sample of a CLPPlus connection –
- IBM Data Server Driver Package – Java Direct Connection
- Replacement for Command W indow and Command Line
Processor
44
IBM Software Group | Information Management software
Sysplex Workload Balancing using the IBM
Data Server Driver
DB2 Group
C Process
Thread
1
CLI/.NET Driver
Logical
Connection
1
Thread
2
Logical
Connection
2
Thread
3
Logical
Connection
3
DB2 for
z/OS
Transport
1
CF
Transport
2
disconnect
at commit/rollback
pooled connections
to DB2 server
Note: CLP does not support Sysplex WLB
DB2 for
z/OS
IBM Software Group | Information Management software
IBM Data Server Driver Package Properties
Properties for fine-tuning Sysplex workload balancing for direct
connections from non-Java applications to DB2 for z/OS
46
IBM Software Group | Information Management software
IBM Data Server Driver Package Properties…
Properties for enabling only Sysplex workload balancing for
connections from non-Java applications to DB2 for z/OS
47
IBM Software Group | Information Management software
IBM and Continues Improvement for Microsoft .Net…
 If the failure occurs on the first SQL operation in a transaction, and seamless failover is enabled
(and applicable), the client can replay the failed SQL operation as part of Automatic Client
Reroute (ACR) processing. If the connection is successful, no error is reported to the
application.
 If ACR is enabled, an application that encounters a connectivity failure is routed to another
member of the Sysplex. If seamless failover is disabled or not applicable, the error SQL30108N
is returned to the application.
 To perform ACR, the client must use a TCP/IP connection and have a DB2® Connect™ license.
The following Version 9.5 Fix Pack 3 or later clients provide support for ACR:
IBM® Data Server Client, IBM Data Server Runtime Client, IBM Data Server Driver
Package
 Automatic client reroute settings in the db2dsdriver.cfg configuration file
 enableAcr: Specifies whether the ACR feature is on (true) or off (false). This setting defaults to
true when transaction-level load balancing is enabled (the enableWLB setting is true). If ACR is
disabled, any other settings for ACR are ignored.
 enableSeamlessAcr: Specifies whether the ACR with seamless failover feature is on (true) or
off (false). If ACR is enabled and the target server is DB2 for z/OS, seamless ACR is enabled by
default. If the target server is not DB2 for z/OS, this setting is ignored, and seamless ACR is not
supported.
IBM Software Group | Information Management software
Sample WLB Configuration
(part of db2dsdriver.cfg)
<databases>
<database name="STLEC1" host="9.30.30.5" 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>
49
IBM Software Group | Information Management software
What’s new for DB2 Clients and Drivers?
Agenda
 Highlights
 IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Modules
 IBM Data Server Clients and Drivers
 IBM Data Server Driver Package
 IBM Data Server Driver for ODBC/CLI
– Background and Installation
 Documentation and References
o
It’s s
sy…
z/Ea
50
IBM Software Group | Information Management software
Data Server Driver for ODBC and CLI
 Data Server Driver for ODBC and CLI is a lightweight deployment solution designed for
independent software vendors (ISV) deployments. This driver, also referred to as cli driver,
provides runtime support for applications using ODBC API, or CLI API without need of
installing the Data Server Client or the Data Server Runtime Client. This driver is available
only as a tar file, not as an installable image. Messages are reported only in English.
 Subset of IBM Data Server Driver Package
 The IBM Data Server Driver for ODBC and CLI provides:
– runtime support for the CLI API;
– runtime support for the ODBC API;
– runtime support for the XA API;
– database connectivity;
– support for DB2 Interactive Call Level Interface (db2cli);
– LDAP Database Directory support; and
– tracing, logging, and diagnostic support.
 Register Data Server Driver for ODBC and CLI with the Microsoft® ODBC driver manager
using the db2oreg1.exe utility.
 Use db2cli registerdsn utility to register all the Data Sources available in the db2cli.ini file
51
IBM Software Group | Information Management software
IBM Data Server Driver for ODBC/CLI
Installation/Configuration:
 No database directory, you pick and installation directory and any name
you like
 There is no installation program for the IBM Data Server Driver for ODBC
and CLI. You must install the driver manually:
– Copy the compressed file that contains the driver onto the target
machine from the internet or a DB2 Version 9 installation CD.
– Uncompress that file into your chosen install directory on the target
machine. (Optional: remove the compressed file.)
 Add valid DB2 Connect license key to the directory:
C:\...\clidriver\license
 Connection information is recorded in either:
– Text file: db2cli.ini
– XML file: db2dsdriver.cfg
– Db2cli.ini has priority over db2dsdriver.cfg
IBM Software Group | Information Management software
IBM Data Server Driver for ODBC/CLI
Installation/Configuration (continued):
• Use the utility “db2oreg1.exe –i” to register IBM Data Server Driver for ODBC
• Use db2cli registerdsn utility to register all the Data Sources available in the
db2cli.ini file or the db2dsdriver.cfg file at the same time. The data sources can
be registered either as a System Data Source or as a User Data Source (See
IBM DB2 Driver Package section for more details on this utility).
• db2cli registerdsn -add -alldsn –system
• Note you can use the utility “db2oreg1.exe –setup” to create sample
db2cli.ini and db2dsdriver.cfg files
• Use the new db2cli validate utility to validates and tests the CLI
environment configuration files of db2cli.ini and db2dsdriver.cfg
• Command Line Processor Plus (CLPPlus) is not included with this driver
IBM Software Group | Information Management software
IBM Data Server Driver for ODBC/CLI
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 for ODBC/CLI
• Include the database connections in the db2dsdriver.cfg (db2cli.ini
optional)
• Include the DB2 Connect license for direct connections to DB2 z/OS
• Execution the utility “db2oreg1.exe –i” to register IBM Data Server Driver
for ODBC with ODBC Data Source Administrator
• Execution the utility “db2cli registerdsn –add –dsnall -system” to
update ODBC Data Source Administrator for ODBC applications
• For DB2 CLI applications environment setup see Information Center:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/
com.ibm.db2.luw.apdv.cli.doc/doc/t0023864.html
IBM Software Group | Information Management software
IBM Data Server Driver for ODBC/CLI
• User named installation directory
• I installed the ODBC and CLI driver in C:\Program Files\IBM
and used the default uncompressed directory name of “clidriver”
• Just copy the uncompressed directory to your selected location
55
IBM Software Group | Information Management software
IBM DB2 Driver for ODBC and CLI
db2oreg1.exe –setup
 Use the utility “db2oreg1.exe –setup” to create sample db2cli.ini and
db2dsdriver.cfg files
 The directory will also be created too
 You just need to supply the db2dsdriver.cfg and db2cli.ini files with the
needed connection information
56
IBM Software Group | Information Management software
IBM DB2 Driver for ODBC and CLI
 For details on the setup of db2cli.ini and db2dsdriver.cfg files
please see IBM DB2 Driver Package section
57
IBM Software Group | Information Management software
What’s new for DB2 Clients and Drivers?
Agenda
 Highlights
 IBM’s Strategy Is To Remove The Reliance On The DB2 Connect
Modules
 IBM Data Server Clients and Drivers
– Review of Clients and Drivers Available
– Client Deployment Strategies
 IBM Data Server Driver Package
 IBM Data Server Driver for ODBC/CLI
 Documentation and References
o
It’s s
sy…
z/Ea
58
IBM Software Group | Information Management software
DB2 Client Monitoring and Tuning
 DB2 Connect User’s Guide
– Chapter 21 - CLI/ODBC application performance tuning
– Chapter 22 - Trouble Shooting DB2 Connect
– Chapter 23 – DB2 Traces with DB2 Connect
– Chapter 24 – DRDA Trace Files
 DB2 9 for z/OS: Distributed Functions
(Redbook SG24-6952)
– Chapter 7 Performance analysis
– Chapter 8 Problem determination
IBM Software Group | Information Management software
DB2 9 for z/OS: Distributed Functions
My favorite and a MUST have!
 DB2® for z/OS® Distributed Data Facility (DDF) is
a built-in component that provides the connectivity
to and from other servers or clients over the
network. DDF is a full-function DRDA-compliant
transaction monitor which, equipped with thread
pooling and connection management, can support
very large networks. Different z/OS workload
management priorities can be assigned to
different, user-specified classes of DDF-routed
application work.
 In this IBM® Redbooks® publication, we describe
how to set up your DDF environment and how to
deploy the DDF capabilities in different
configurations, including how to develop
applications that access distributed databases.
www.redbooks.ibm.com/abstracts/sg246952.html
60
IBM Software Group | Information Management software
Suggested IBM Manuals to learn more..
61
IBM Software Group | Information Management software
The main place for all documentation is InfoCenter
http://publib.boulder.ibm.com/infocenter/imzic/
62
IBM Software Group | Information Management software
DB2 LUW Information Centers
https://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/
com.ibm.db2.luw.common.doc/doc/t0021844.html
63
IBM Software Group | Information Management software
Data Studio’s Information Center
http://publib.boulder.ibm.com/infocenter/idm/v2r2/index.jsp
64
IBM Software Group | Information Management software
The End!
65