When upgrading from TDM Portal 4.10.239.0 to TDM Portal 4.10.100.0, the gtrep repository migration scripted failed with the following error:
Migration V4.11.0.05__update_pij_job_id.sql failed
--------------------------------------------------
SQL State : 21000
Error Code : 1427
Message : ORA-01427: subquery returning a record of more than one line
Location : db/migration/gtrep/oracle/V4.11.0.05__update_pij_job_id.sql (D:\Apps\CA\CA Test Data Manager Portal\schema-management\file:\D:\Apps\CA\CA Test Data Manager Portal\schema-management\lib\TDMGtrepSchema-4.11.100.0.jar!\db\migration\gtrep\oracle\V4.11.0.05__update_pij_job_id.sql)
Line : 1
Statement : UPDATE GTREP_DATADISC_JOB DISC_JOB
SET DISC_JOB.PII_JOB_ID = (
SELECT DISTINCT PII.PIJ_JOB_ID FROM GTREP_PII_JOB PII, GTREP_PII_RAW_MATCH R WHERE
DISC_JOB.JOB_ID =PII.PIJ_MODEL_ID AND R.RM_JOB_ID = PII.PIJ_JOB_ID AND PII.PIJ_ORIGIN = 'MODEL'
)
, OracleDatabaseException: ORA-01427: subquery returning a record of more than one line
'
oracle.jdbc.OracleDatabaseException: ORA-01427: subquery returning a record of more than one line
at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:513)
... 40 common frames omitted
Wrapped by: java.sql.SQLException: ORA-01427: subquery returning a record of more than one line