IBM Support

Utilities like madhubunload fail while processing custom tables when executed from Initiate MDS workbench

Question & Answer


Question

When we run utilities like madhubunload from the workbench to unload custom tables, it fails with an error like the following: ERROR ODBC [S1000] [InitiateSystems][ODBC Oracle Wire Protocol driver][Oracle]ORA-00960: ambiguous column naming in select list (DBError=960) These utilities complete successfully from the command line, but not from the workbench. Why are we seeing this error and how can we circumvent it?

Cause

The madhubunload utility is used to load one or more tables from the database to the unl files. When using the utility, we specify the tables to unload and then it looks up a hub.ddl file for the table structure and runs SQLs to unload those tables. A sample command generated by the job in v-11 is:
$WAS_HOME/profiles/AppSrv01/installedApps/cell01/MDM-native-E001.ear/native.war/bin/madhubunload -encoding latin1 -objCode MEM -tabList mpi_memhead mpi_membktd mpi_memcmpd mpi_memqryd mpi_custom1 mpi_custom2 mpi_custom3 mpi_custom4 mpi_custom5 -unlDir $WAS_HOME/profiles/AppSrv01/installedApps/cell01/MDM-native-E001.ear/native.war/work/gcmdm/work/unl/partner -ddlFile $WAS_HOME/profiles/AppSrv01/installedApps/cell01/MDM-native-E001.ear/native.war/work/gcmdm/work/config/hub.ddl

Here the script will look up the ddl file (-ddlFile) and for the corresponding tables (-tabList), it will unload them into the unl directory (-unlDir). The script is not suppose to edit the hub.ddl file and the above command has a mixture of standard MDS tables like memhead and membktd as well as IDS like mpi_custom1.

If the above command has duplicates, say "-tabList mpi_memhead custom1 custom1", then if we run the above command from the workbench, it terminates with the following error on the IDS tables:
16:42:20 ERROR ODBC [S1000] [InitiateSystems][ODBC Oracle Wire Protocol driver][Oracle]ORA-00960: ambiguous column naming in select list (DBError=960)

This is because the job will produce a SQL on that custom table which will list all the columns twice due to the duplicate in the table name. So we will have something like "select memrecno,column1,column2,column3,column4,memrecno,column1,column2,column3,column4 from mpi_custom1 order by memrecno". The query has two listings of memrecno and so it is unable to order order by memrecno and hence we get the ambiguous column error.

Answer

The hub.ddl file used by the workbench jobs is re-created by combing IDS.ddl and <MAD_ROOT>\sql\mpihub.ddl files. Therefore, if there is a same table definition in mpihub.ddl as well as IDS.ddl, then we will have duplicate table definitions in final hub.ddl and that will lead to the problem defined earlier. Therefore removing all Implementation Defined Segments (IDS) from mpihub.ddl should result in successful execution of the workbench job.

The hub.ddl file is not used by the command line utility and therefore, we do not run into this issue with those command line utilities.

[{"Product":{"code":"SSLVY3","label":"Initiate Master Data Service"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Version Independent","Edition":"Edition Independent","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Product Synonym

MDS;Master Data Service;MDM;MDMSE;Master Data Management;IBM Infosphere Master Data Service;MDM Standard Edition;MDM Hybrid Edition

Document Information

Modified date:
16 June 2018

UID

swg21680828