dbms_redefinition
I have two questions related to dbms_redefinition
1.
begin
dbms_redefinition.can_redef_table( schema1', 'mytable');
end;
ORA-12090: cannot online redefine table
mytable is a normal non partitioned table, i am not sure how to check and make it redefinable, goal is to transfer data from non partitioned mytable into newly partitioned mytable2
2.
test_t1 is nonpartitioned table, test_t2 is newly partitioned table
begin
dbms_redefinition.can_redef_table( 'myschema', 'TEST_T1' );
end;
-- copies data
BEGIN
dbms_redefinition.start_redef_table( 'myschema' 'TEST_T1','TEST_T2' );
END;
It works until here, But when I try to copy indexes, constraints, triggers
DECLARE
nerr number;
begin
dbms_redefinition.copy_table_dependents
( 'myschema', 'TEST_T1', 'TEST_T2',
copy_indexes => dbms_redefinition.cons_orig_params,
copy_triggers => TRUE,
copy_constraints => TRUE,
copy_privileges => TRUE,
copy_statistics => TRUE,
num_errors => :nerr );
END;
why do I get index , triggers and constraint names as TMP$$_ORIGINALNAME for test_t2 ? Is there a way I can get the original names ?
Eg: if test_t1 has index defined on one of its columns as idx_n1, then I need the same name for test_t2 also, not TMP$$_IDX_N1