Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_redefinition

user650888Jan 25 2013 — edited Jan 25 2013
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2013
Added on Jan 25 2013
3 comments
196 views