Online Redefinition fails with ORA-23540: Redefinition not defined or initiated
Problem Description While doing online redefinition on a table dbms_redefinition.copy_table_dependents fails with error ORA-23540 as below. SQL> set serverout on SQL> declare 2 error_count pls_integer := 0; 3 BEGIN 4 dbms_redefinition.copy_table_dependents('MUCI', 'HISTORY', 'HISTORY_',1, true, true, true, false,error_count); 5 dbms_output.put_line('errors := ' || to_char(error_count)); 6 END; 7 / declare * ERROR at line 1: ORA-23540: Redefinition not defined or initiated ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_REDEFINITION", line 1662 ORA-06512: at line 4 Cause of the problem There may be different causes against it. If the schema specified in the dbms_redefinition.copy_table_dependents procedure does not exist already in the database then above error can appears. Suppose it may be the case that you specified schema name as lower case but by default username is created in uppercase. There may b