AnsweredAssumed Answered

DB2 - QRR Execute Code block for missing columns that are physically present

Question asked by kendraks kendraks on Jun 22, 2015
This is intended as a help to someone on SugarCRM 7.x on DB2:

After an update from to 7.5.2 I had a DB2 database execute code block at the end of the QRR. I executed that block which wanted to add missing columns and had database errors stating the columns existed. 

db2 ALTER TABLE emails ADD COLUMN team_id char(36) ;

"TEAM_ID" is a duplicate name.. SQLCODE=-612, SQLSTATE=42711

When I drilled directly into the DB2 database and table I confirmed that the column in question did exist and was the correct datatype.

I was finally able to speak to an ASE and he suggested I backup the EMAILS table (per this example), create a new empty table (in this example EMAILS) and then copy in the data from the backup. His thoughts were indexing or something was preventing Sugar and DB2 from recognizing the table correctly. He was kind enough to give me the create table code to create another EMAILS table. 

After I did this table switching, I only had some indexing issues to clear up - dropping and recreating indexes. 

This cleared up my issue for updates. I post this in hopes it will help another SugarCRM on DB2 administrator.