Question

We are using the zendDBi database and are attempting to setup a MySQL table from an existing DB2 table. Using the method found here: http://wsip-174-79-32-155.ph.ph.cox.net/wiki/index.php/MySql/DB2StorageEngineDocument (in the section titled “Existing IBM i DB2 Tables” near the bottom of the page).

This works for most tables but for one table in particular it does not seem to be working.

I’m able to create the MySQL table and copy the FRM files however when I try to access the table via mysql I get the error “Got error 2102 'The file has changed and might not be compatible with the MySQL table definition' from IBMDB2I”

I read a similar article here: http://forums.zend.com/viewtopic.php?f=77&t=104778

However no FID file is created. (this did work for another table). Here is what I have tried so far:

  • Checked file permissions on the mysql frm file
  • Checked the permissions on the DB2 table
  • Using “flush tables” command in MySQL
  • Manually creating an FID file with the correct identification number
  • Set IBMDB2I as default engine in my.conf
  • Making sure the table does not contain zoned decimal fields

I’m curious as to what to try next.

Here is the SQL create statement for the original table from iSeries Navigator. as you can see there are only 2 data types.

    CREATE TABLE GB1555AFGD.Z1OCTLSP ( 
    ZZSALE CHAR(10) NOT NULL DEFAULT '' , 
    ZZAGRP CHAR(4) NOT NULL DEFAULT '' , 
    ZZPCOD CHAR(1) NOT NULL DEFAULT '' , 
    ZZDAMT DECIMAL(17, 4) NOT NULL DEFAULT 0 , 
    ZZPPCT DECIMAL(5, 2) NOT NULL DEFAULT 0 , 
    ZZBCHK DECIMAL(17, 4) NOT NULL DEFAULT 0 , 
    ZZOLMT DECIMAL(17, 4) NOT NULL DEFAULT 0 , 
    ZZOBJT DECIMAL(17, 4) NOT NULL DEFAULT 0 , 
    ZZTCHK DECIMAL(17, 4) NOT NULL DEFAULT 0 , 
    ZZMGID CHAR(10) NOT NULL DEFAULT '' , 
    ZZMPCT DECIMAL(5, 2) NOT NULL DEFAULT 0 , 
    ZZLSAL DECIMAL(17, 4) NOT NULL DEFAULT 0 , 
    ZZBRNO CHAR(35) NOT NULL DEFAULT '' , 
    ZZBNKA CHAR(17) NOT NULL DEFAULT '' , 
    ZZDDTP CHAR(1) NOT NULL DEFAULT '' , 
    ZZTXNO CHAR(3) NOT NULL DEFAULT '' , 
    ZZSPM1 CHAR(60) NOT NULL DEFAULT '' , 
    ZZSPM2 CHAR(60) NOT NULL DEFAULT '' , 
    ZZSPM3 CHAR(60) NOT NULL DEFAULT '' , 
    ZZSPM4 CHAR(60) NOT NULL DEFAULT '' , 
    ZZROM CHAR(6) NOT NULL DEFAULT '' , 
    ZZCKCD CHAR(1) NOT NULL DEFAULT '' , 
    ZZFAXYN CHAR(1) NOT NULL DEFAULT '' , 
    ZZPRNYN CHAR(1) NOT NULL DEFAULT '' , 
    ZZFAX CHAR(35) NOT NULL DEFAULT '' , 
    ZZTIME CHAR(8) NOT NULL DEFAULT '' , 
    ZZTIMEC CHAR(1) NOT NULL DEFAULT '' , 
    ZZEMLYN CHAR(1) NOT NULL DEFAULT '' , 
    ZZEMAIL CHAR(60) NOT NULL DEFAULT '' , 
    ZZRCAP CHAR(1) NOT NULL DEFAULT '' ) ;

I'm not sure if it matters but the tables I'm having difficulty with were created in an older OS. Currently we are on 7.1 however these tables were likely created in v3r2 or v5r4. so maybe there is something missing?

No correct solution

OTHER TIPS

I know I'm a year late to the party, but for anyone else searching here... This may be a problem that was fixed with a PTF in IBM i 7.1. Make sure that you have PTF SI50864 applied (and, if possible, all the latest PTFs listed in http://www-01.ibm.com/support/docview.wss?uid=nas267d12878076e4827862574e2003c6d4a )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top