Database error received during update

book

Article ID: 208938

calendar_today

Updated On:

Products

CA Release Automation - DataManagement Server (Nolio) CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

We tried to update from 6.4 to 6.7 version before. We were able to successfully upgrade from version [6.4.0.10072] to version [6.6.0.9640]. But when we wanted to upgrade to version [6.7.0.81] , we got the following database error.

Yesterday we tried to download version 6_6_0_b10323 and upgrade to this version. However, when we got the same error, we had to revert to the version [6.6.0.9640] from the local application backup. Unfortunately, we do not have a chance to restore the database to date 2020-12-28.

2020-12-28 20:08:30,625 [localhost-startStop-1] ERROR (com.nolio.platform.server.dataservices.services.upgrade.UpgradeServiceImpl:268) - Error calling Flyway Migrate
org.flywaydb.core.internal.dbsupport.FlywaySqlScriptException: 
Migration V6.7.0.0.201906031400000__add_rc_modules_perf_indexes_-_ORACLE.sql failed
-----------------------------------------------------------------------------------
SQL State  : 72000
Error Code : 1408
Message    : ORA-01408: such column list already indexed
ORA-06512: at line 9
Location   : C:/Program Files/CA/ReleaseAutomationServer/webapps/datamanagement/resources/db/migration/oracle/V6.7.0.0.201906031400000__add_rc_modules_perf_indexes_-_ORACLE.sql (C:\Program Files\CA\ReleaseAutomationServer\webapps\datamanagement\resources\db\migration\oracle\V6.7.0.0.201906031400000__add_rc_modules_perf_indexes_-_ORACLE.sql)
Line       : 1
Statement  : DECLARE L_INDEXES_COUNT INTEGER;
BEGIN
  SELECT COUNT(*)
    INTO L_INDEXES_COUNT
    FROM USER_INDEXES
   WHERE UPPER(INDEX_NAME) = UPPER('IX_RC_MODULES_JOB_ID');

  IF (L_INDEXES_COUNT = 0) THEN
    EXECUTE IMMEDIATE 'CREATE INDEX IX_RC_MODULES_JOB_ID ON RC_MODULES (JOB_ID)';
  END IF;
END;

Cause

The problem is that we are trying to create the duplicate index in the DB but this is possible if the customer has their own custom structure. Can you check which indexes exist in the DB for the RC_MODULES table? It seems there is another index for the RC_MODULES.JOB_ID column.
 

Environment

Release : 6.6, 6.7

Component : Analyzer Common Services

Resolution

If you will find this index in the customer's DB than we will have to:
  • Remove it manually
  • Remove the record from the schema_version table (the one which is relevant to the V6.7.0.0.201906031400000__add_rc_modules_perf_indexes_-_ORACLE.sql).
     
  • Afterwards we should turn on the nolio server and the script V6.7.0.0.201906031400000__add_rc_modules_perf_indexes_-_ORACLE.sql should be successfully executed.