I am partitioning an existing table. I used the following process:
Checks
DBMS_REDEFINITION.CAN_REDEF_TABLE(...);- Successful
Create duplicate table
CREATE TABLE "USER"."MYTABLE_ONLINE" ( "SERIAL_ID" NUMBER(15,0), "CONTEXTID" NUMBER(15,0) NOT NULL ENABLE, "MYTIME_TIME" DATE DEFAULT SYSDATE ) PARTITION BY RANGE ("INSERTED_TIME") INTERVAL (NUMTODSINTERVAL(1,'DAY')) (PARTITION "p1_1" VALUES LESS THAN (TO_DATE('01-jan-2012','DD-MON-YYYY' )))- Successful
Copy dependencies
DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS(v_name, 'MYTABLE', 'MYTABLE_ONLINE', copy_indexes=>dbms_redefinition.cons_orig_params, copy_triggers=>TRUE, copy_constraints=>TRUE, copy_privileges=>TRUE, ignore_errors=>FALSE, num_errors=>error_count, copy_statistics=>false);
And I get the following error.
ORA-06502: PL/SQL: numeric or value error
ORA-31606: XML context 27 does not match any previously allocated context
ORA-06512: at "SYS.DBMS_METADATA", line 1475
ORA-06512: at "SYS.DBMS_METADATA", line 7481
ORA-06512: at "SYS.DBMS_REDEFINITION", line 803
ORA-06502: PL/SQL: numeric or value error
ORA-31606: XML context 27 does not match any previously allocated context
ORA-06512: at "SYS.DBMS_REDEFINITION", line 1869
ORA-06512: at line 6
06502. 00000 - "PL/SQL: numeric or value error%s"
*Cause:
*Action:
How can I fix this?
%_ONLINEtable in the same schema as the owner of the original table? – Phil Jan 24 at 15:05