Migration fails with the following error: "FATAL ORA-20001: UpgradeSchema_Data_ Migration.Data_Migration: User-Defined Exception"
This is caused by a setting in Oracle that causes a query to fail as its handling it differently than expected. You see the following error in the migration log:
TASK_ID BATCH_NUM ERROR_TYPE ERRANT_STMT ERROR
---------- ---------- ---------- -------------------------------------------------------------------------------- ------------------------------
8 1 FATAL update REPORTFILTEROPERAND ORA-43907: This argument must
set OPERAND = TO_CHAR(TO_NUMBER(OPERAND) / 1152921504 be a literal or bind variable.
606846976)
where OPERAND != '0'
and MOD(TO_NUMBER(OPERAND DEFAULT -1 ON CONVERSI
ON ERROR), 1152921504606846976) = 0
and FILTERID in (select FILTERID from REPORT
FILTER where VARIABLE in ('incident.mess
age.attachment.size', 'incident.message.
file.size') and OPERANDUNIT = 'mb')
8 1 FATAL ORA-20001: UpgradeSchema_Data_ Migration.Data_Migration: User-Defined Exception
First you can verify if this indeed is the case by running the following query in sqlplus while connected to the protect instance as protect.
SELECT OPERAND, TO_NUMBER(OPERAND DEFAULT -1 ON CONVERSION ERROR) as OPERANDNUM FROM REPORTFILTEROPERAND;
You should get an error while running this. You can run the following in the sqlplus session:
alter session set cursor_sharing=exact;
Now try running the select statement again and it should work fine. If this is the case, please update this at the system level so it always applies. More information can be found in the below link.
https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/CURSOR_SHARING.html