Question & Answer
Question
when attempting to execute the dbutil.bat -getInfo command using the version of DB2 Migration Utility released with RAA 6.1.0.13:
E:\IBM RAA Downloads\DB2 Migration Utility\DB2 Migration Utility 2017- 03-03\raadbutil_windows>dbutil.bat -getinfo
JVM version detected: (1.8.0) Mar 06, 2017 8:28:25 AM com.ibm.dmh.db.DbInfo initialize INFO: Detected DBMS vendor=(IBM) product=(DB2_LUW) version=(10.5) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1377) at com.ibm.dmh.db.DbMetaData.getMetaDataForTriggers(DbMetaData.java:483) at com.ibm.dmh.db.DbMetaData.initialize(DbMetaData.java:566) at com.ibm.dmh.db.DbAdmin.gatherDbMetaData(DbAdmin.java:231) at com.ibm.dmh.db.DbAdmin.initializeDefaultJdbc(DbAdmin.java:197) at com.ibm.dmh.dbutil.Main.initDb(Main.java:146) at com.ibm.dmh.dbutil.Main.getInfo(Main.java:503) at com.ibm.dmh.dbutil.Main.main(Main.java:421) Problem occurred while trying to access database.
Answer
To solve this problem, firstly check the results of the following query:
SELECT name, VARCHAR(text, 32000) FROM SYSIBM.SYSTRIGGERS WHERE TBNAME LIKE 'DMH_%' AND TEXT NOT LIKE '%MODE%' ORDER BY 1
If the MODE DB2SQL clause is missing from the trigger definition, eg, Problem Trigger: CREATE TRIGGER "DMH"."DMHARMD1" AFTER DELETE ON "DMH"."DMH_ARCH_MANIFEST" REFERENCING OLD AS O FOR EACH ROW NOT SECURED BEGIN ATOMIC DELETE FROM DMH_AMF_CLASSPATH WHERE MANIFEST_ID = O.FILE_ID; DELETE FROM DMH_REFS_JBC WHERE FILE_ID = O.FILE_ID; END
Correct Trigger: CREATE TRIGGER DMHARMD1 AFTER DELETE ON DMH_ARCH_MANIFEST REFERENCING OLD AS O FOR EACH ROW MODE DB2SQL BEGIN ATOMIC DELETE FROM DMH_AMF_CLASSPATH WHERE MANIFEST_ID = O.FILE_ID; DELETE FROM DMH_REFS_JBC WHERE FILE_ID = O.FILE_ID; END
The trigger ddl files we ship with the product specify MODE DB2SQL. The trigger ddl files we ship with the product do not specify NOT SECURED (it is the default).
Then the solution is to drop and recreate the triggers with the correct DDL files.
Was this topic helpful?
Document Information
More support for:
Rational Application Analyzer
Operating system(s):
z/OS
Document number:
6140553
Modified date:
13 March 2017
UID
dwa1361870