Troubleshooting

When running jobs using the Db2 connector, you might encounter errors that can be fixed by troubleshooting and adjusting values for properties or configurations.

If you encounter errors while running a job, ensure that rows are inserted correctly into your target tables. When processing rows, a Db2® database will reject all remaining rows to be processed after one of the following conditions occurs:

  • A row cannot be inserted, and the value of the array size property is greater than 1
  • The defined string length of the source data exceeds the defined length of its target column
  • The source data contains a row with a character string that exceeds the length of the target column

Troubleshooting and adjusting values to enhance performance

Lower the array size property
To see detailed, row-level information about a failure, set the value of the array size property to 1. You modify this usage property on the Properties tab of the stage editor under the Session category. Setting the array size to 1 might affect performance.
Follow good development practices
To identify problems early in the development process, begin by defining the simplest possible job and confirm that the job runs successfully before adding complexity. Test the job frequently and do not add additional complexity until the job runs successfully.
Use SQL Builder to write SQL statements
To ensure that your SQL code is written properly, use the SQL Builder in the stage editor to build your SQL statements. If you have hand-coded your SQL statements and are experiencing problems, try using the SQL Builder to recreate the statements.
Avoid schema reconciliation problems
To avoid schema reconciliation problems, use the Import Connector Metadata wizard to import metadata. If the problems continue, modify the schema reconciliation usage properties. You modify these properties on the Properties tab of the stage editor under the Session category. Select No for Fail on size mismatch and Fail on type mismatch.
Use clean data
Use a Transformer stage to cleanse the data before sending it to the Db2 Connector stage. Adding a Transformer stage to your job might affect performance.
Use the same character set on the client and server
Make sure that the job and the Db2 database use the same character set. The character set that is used by a project or job might not match the character set for the schema that is defined in the Db2 database. For example, this problem can occur when the Db2 database uses the default character set for Linux®, UTF-8, but the job uses the default character set for Microsoft Windows, Windows-1252. To resolve this problem, change the National Language Support (NLS) properties at the project or job level so that the project or job uses the same character set as the Db2 database. To modify NLS properties for a job, select Edit > Job Properties, and click the NLS tab.
Use dedicated Stored Procedure stage
To work with stored procedures in a Db2 database, use the dedicated Stored Procedure stage.
Columns positional binding
When positional binding is used, the first value that is specified in the SELECT statement is assigned to the first column, the second value is assigned to the second column, and so on. The Db2 Connector stage does not use positional binding. Instead, the Db2 Connector stage binds columns that are listed in a SELECT statement to IBM InfoSphere DataStage columns by matching names. If a job uses expressions in the SELECT statement that do not have aliases that match IBM InfoSphere DataStage columns, the Db2 Connector stage cannot match the expression column to an IBM InfoSphere DataStage column. If you want to use the Db2 Connector stage, you can add an alias to such expressions that matches the IBM InfoSphere DataStage column name.