AS400 DB2 tables not showing Primary Key

2006-09-01
2013-04-22
  • Mark Robinson
    Mark Robinson
    2006-09-01

    Hi Everybody.

    Thank you for such a great product.

    I have had some success replicating between Postgres and Mysql but have run into a problem which is discussed in various forums but for which I haven't found a solution.

    I am trying to replicate a DB2 database on an AS400 machine to a MSSQL server.  The Publisher will connect successfully and display the tables, but it is not collecting the metadata (eg primary keys) so it will not allow it to be published.

    I am using the jt400.jar driver.

    Other threads have discussed a problem with GetPrimaryKeys but I have used the same jar with Squirrel on the same database and it will retrieve the metadata without problem.

    I hope I am doing something obviously wrong, or that someone could describe the process they went through to get it working.

    Thanks in advance.

    Mark

     
    • Mark Robinson
      Mark Robinson
      2006-09-01

      Additional Information

      09:29:28,090 INFO [ReplicationServer] [createPublication 358] Create Publication TP37DAT37
      09:29:28,271 INFO [Utility] [getDatabaseHandler 87] DB2 UDB for AS/400
      09:29:28,411 DEBUG [CommonMetaDataInfo] [setPrimaryColumns 683] Resultset  found PrimaryKeys OR Resultset found false
      09:30:25,498 INFO [ReplicationServer] [createPublication 358] Create Publication TP37DAT37
      09:30:25,500 INFO [Utility] [getDatabaseHandler 87] DB2 UDB for AS/400
      09:30:25,920 DEBUG [CommonMetaDataInfo] [setPrimaryColumns 683] Resultset  found PrimaryKeys OR Resultset found false

      Another post recommended modifying the source of the CommonMetaDataInfo class but wasn't specific on what was required.  Any thoughts.

      Cheers,

      Mark