The test application, testconn20.exe, comes with the IBM Data Server Clients and the IBM Data Server Driver. We use this .NET application as the sample application to be deployed. testconn20.exe is very useful to verify a correct installation and can be a help in case of errors.

Note: Add -dtcto the end of the call to testconn20.exe to verify distributed transaction handling with Microsoft Distributed Transaction Manager (MSDTC).

Deploying our application consist of two steps. In the first step we do a silent install of the IBM Data Server Driver. The second step is to install the test application. The most common way to package a .NET application is to provide a msi-file, but in our simple scenario we just copy the application. Finally, we test the application.

We use a response file for the silent install of the driver. We use a modified version of the dsdriver.rsp file from the sample directory of the install image for the driver. Example 4-49shows the content of the response file.

Example 4-49 Response file content

PROD

= IBM_DATA_SERVER_DRIVER

LIC_AGREEMENT

=

ACCEPT

FILE

=

C:\Program Files\IBM\IBM DATA SERVER DRIVER

DEFAULT_CLIENT_INTERFACE_COPY = YES

COMP = DOTNET_DATA_PROVIDER

Having the response file in place, we install the driver with the command shown in Example 4-50.In the example we assume that the x: drive maps to a server location where the install image for the IBM Data Server Driver has been unpacked. We have put the modified response file in the same directory as the setup application.

Example 4-50 Silent install of the IBM Data Server Driver

x:setup -o -m -u x:dsdriver.rsp -l setup.log

After installing the IBM Data Server Driver we test the connection by calling testconn20. Example 4-51shows how to call testconn20 with the connection string provided as a parameter. The output is the result of a successful installation.

210DB2 Deployment Guide

Page 224
Image 224
IBM DB2 manual Example 4-49 Response file content, Example 4-50 Silent install of the IBM Data Server Driver