Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am partitioning an existing table. I used the following process:

  1. Checks

    DBMS_REDEFINITION.CAN_REDEF_TABLE(...);
    
    • Successful
  2. 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
  3. 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?

share|improve this question
    
What is the solution to ORA-06502 and ORA-31606?? –  Rajesh Jan 24 '13 at 14:53
    
Are you using XMLType in any of the dependant objects (or is there an xml column in your table that you've edited out?). Also, have you created the %_ONLINE table in the same schema as the owner of the original table? –  Phil Jan 24 '13 at 15:05
    
There are no XML columns in my table nor I am using any xml type . All the tables are in the same schema.. please refer dba.stackexchange.com/questions/33070/… for detailed question. –  Rajesh Jan 25 '13 at 5:51
    
There are only two types of columns 1.DATE 2.NUMBER. Ihave some idexes on the original table as well. –  Rajesh Jan 25 '13 at 6:13
    
Where I can look for any reference to this XML package, which I don't think I am referring?? –  Rajesh Jan 25 '13 at 13:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.