SYMPTOM
In Strategy version 9.x - 10.x, when users open warehouse catalog to import tables from an IBM DB2 for i 6.1 database, the following error is received:
An error was detected while trying to read the warehouse catalog: Invalid Catalog SQL.
Required column 'TAB_NAME' is missing.
Please refer to online help for more information. Do you want to modify the Warehouse Catalog Browser options to try to solve this problem? Please re-run the Warehouse Catalog Browser after you make your changes
CAUSEThis issue is seen because the data returned by the warehouse catalog read SQL does not contain a column named 'TAB_NAME'. The warehouse catalog read SQL is as below. The warehouse catalog expects the result of the following SQL statement to contain a column named 'TAB_NAME'. When the column is not seen, the error message is thrown.
SELECT DISTINCT SYSTEM_TABLE_SCHEMA NAME_SPACE, TABLE_NAME TAB_NAME
FROM QSYS2.SYSCOLUMNS
WHERE TABLE_OWNER = '#LOGIN_NAME#'
AND SYSTEM_TABLE_SCHEMA = '#?Schema_Name?#'
As can be seen from the above SQL statement, TAB_NAME is the column alias defined in the SQL statement. On certain DB2 iSeries 6.1 installations, the column alias is not returned as defined in the SQL. This issue has been described in IBM documentation.
ACTIONAs given on the IBM support website, to fix the issue with column alias not being returned, the fix pack 'R610 SI51950' needs to be applied on the DB2 for i 6.1 database.