SRM startup error - Error occurred while applying schema change Name: 1067 Errorcode: 1050

Document ID : KB000030990
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

After upgrade of Spectrum from 9.2 to 9.3/9.4/10/0, we might see the following SRM error at startup in stdout.log or Catalina.out

"ERROR) - Error occurred while applying schema change Name: 1067 (Product version: 9.3.0) - Changing the primary key for bucketactivitylog table to improve the performance com.aprisma.spectrum.app.web.db.schemachange.FatalSchemaChangeException: com.aprisma.spectrum.app.web.db.schemachange.SchemaChangeException: SQLException while running RuntimeSchemaChange1067 Schema Change Errorcode: 1050 "

This might be seen when the reporting tables are not completely migrated from mysql engine to innodb engine.

Solution: 

Perform the following commands on the Oneclick server to fix the issue

1.     <!--[endif]-->Logon to Oneclick server -> cmd -> bash –l ->cd mysql/bin

2.     <!--[endif]-->Connect to reporting database using mysql

            ./mysql –uroot –proot reporting 
3. Run this query at mysql prompt -> show tables like '%bucketactivity%' ;

4. Check how many tables are listed from the above query. 

     Case 1: If it lists two tables bucketactivitylog and 
       bucketactivitylog_tmp then perform the following: 
           a. Run query -> drop table bucketactivitylog_tmp; 
           b. Restart the tomcat. 

     Case 2: If only bucketactivitylog_tmp is listed then do the following: 
             a. Run query -> rename table bucketactivitylog_tmp to bucketactivitylog; 
             b. Restart the tomcat.  

This will fix the SRM initialization error and converts the rest of the reporting tables to innodb engine format.