In contrast to other "participating" server analyzers such as those for T-SQL and PL/SQL which use an offline analysis method (selected schemas/databases are extracted to file by the CAST Delivery Manager Tool and the analyzed offline), the analyzer for DB2 UDB requires live access to the DB2 UDB server during the analysis process. Therefore, if your Delivery Manager has packaged DB2 UDB schemas for analysis via the CAST Delivery Manager Tool and you now have DB2 UDB Analysis Units in the Current Version tab in the CAST Management Studio, you need to ensure that the CAST Management Studio can access the target server(s). The image below shows a DB2 UDB Schema Analysis Unit in the Current Version tab in the CAST Management Studio, which corresponds to the selection of one DB2 UDB schema (named CASTPUBS) for analysis:
When packaging schemas hosted on a DB2 UDB server, the CAST Delivery Manager Tool will only package and deliver the following:
- The connection parameters for your target DB2 UDB server
- A list of schemas you need to analyze defined manually or via connection to the database.
The connection parameters you defined in the CAST Delivery Manager Tool (see How do I create a package for an application database) will be transferred to the CAST Management Studio during the delivery process. These connection parameters will be stored in a JDBC Connection Profile, which you can view in the Current Version tab in the CAST Management Studio:
Click the JDBC Connection Profile to view the details - these should exactly match the connection details provided by the Delivery Manager in the CAST Delivery Manager Tool:
Test the connection
CAST recommends testing that the JDBC Connection Profile can access the target DB2 UDB server by using the Test connection option - note that this connection will use a JDBC protocol and does not rely on a DB2 UDB client layer to establish the connection:
ODBC User DSN entry
Although the JDBC connection parameters defined in the CAST Delivery Manager Tool are transferred to the CAST Management Studio, the underlying DB2 UDB analyzer relies on the presence of a 64-bit ODBC User DSN entry on the machine on which the CAST Management Studio is being run from in order to establish a connection for analysis purposes. The JDBC Connection Profile is not used at all during the analysis. You therefore need to ensure that:
- You have a compatible DB2 UDB client connection layer installed on the machine on which the CAST Management Studio is being run from
- You have created a 64-bit ODBC User DSN entry that references the target DB2 UDB server as defined in the JDBC connection profile present in the CAST Management Studio
DB2 UDB client connection layer
Before you can configure a 64-bit ODBC User DSN entry for your target DB2 UDB server, you must install and configure a 64-bit DB2 UDB client connection layer. CAST highly recommends that you install the "full" 64-bit client layer (named "IBM Data Server Client" as shown in the image below) as oppose to any "small foot print" client connection layer. Installation and configuration of this client connection layer are beyond the scope of this document.
Configuring a 64-bit ODBC User DSN entry
The following is description of process of configuring a 64-bit ODBC User DSN entry on the machine on which the CAST Management Studio is being run from in order to establish a connection for analysis purposes.
- CAST is a 64-bit application, therefore, open your Windows 64-bit ODBC configuration utility from the Control Panel > Administrative Tools > Data Sources (ODBC)
- In the utility, click the User DSN tab and then click the Add button as highlighted below:
- In the dialog box that is displayed, select the IBM DB2 UDB ODBC DRIVER - DB2COPY1 item as highlighted below, and then click the Finish button:
- In the dialog box that is displayed, enter a name for your Data source and then select an appropriate Database alias that points to the target DB2 UDB server. If this is the first time you have configured a DB2 UDB ODBC entry, the Database alias list will be empty and you should therefore click the Add button as displayed below:
Note that if you already have a Database alias configured for your target server, you can select it in the Database alias list. However, you must ensure that the "host name" value configured in the alias matches the value entered for the "Host" field in the JDBC Connection profile in the CAST Management Studio. If the values do not match, you can create a new alias as described below.
- In the dialog box that is displayed, ensure you are working in the Data Source tab and then enter a DB2 login/password combination that has sufficient privileges to perform an analysis (the User ID MUST be a member of the DB2ADMINS group) - ensure you tick the Save password option:
- In the TCP/IP tab, configure the connection parameters as follows:
|ODBC Option||Value||Matching entry in the JDBC Connection Profile|
|Database name||Enter the name of the database on the target DB2 UDB server in which the required schemas for analysis are stored.||Database (marked as 3 in the image to the right)|
|Database alias||Enter a name for this alias. CAST recommends that the name you enter here matches the value entered for the "Host" field in the JDBC Connection profile in the CAST Management Studio.||Host (marked as 1 in the image to the right)|
|Host name||Enter the internet host name (or machine name) for the machine that hosts your DB2 UDB server. The name you enter here MUST match the value entered for the "Host" field in the JDBC Connection profile in the CAST Management Studio. If these values do not match, the CAST Management Studio will not know which ODBC entry to use during the analysis.||Host (marked as 1 in the image to the right)|
|Port number||Enter the port number on which your database runs. The default value used in DB2 UDB environments is 50000.||Port (marked as 2 in the image to the right)|
- Click OK - no other settings in other tabs need to be modified.
- You will now return to the Windows ODBC utility where you will see your newly defined ODBC User DSN:
- You can validate the connection by selecting the data source and clicking the Configure button. This will take you to the alias configuration where you can test the connection in the Data Source tab:
- The ODBC User DSN has now been configured and you should be able to run a successful analysis from the CAST Management Studio: