Prev | Current Page 757 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

In this
example, the primary key has already been defined on CUSTOMER_INTERIM; you could add the
foreign keys, secondary indexes, and grants at this point in the redefinition process. Create the
foreign keys disabled until the redefinition process is complete.
NOTE
To avoid that manual step, you can use the COPY_TABLE_
DEPENDENTS procedure to create all dependent objects on the
interim table. Dependent objects supported via this method include
triggers, indexes, grants, and constraints.
When the redefinition process completes, the indexes, triggers, constraints, and grants on the
interim table will replace those on the original table. The disabled referential constraints on the
interim table will be enabled at that point.
To finish the redefinition, execute the FINISH_REDEF_TABLE procedure of the DBMS_
REDEFINITION package. Its input parameters are the schema name, original table name, and
interim table name:
execute DBMS_REDEFINITION.FINISH_REDEF_TABLE -
('SCOTT','CUSTOMER','CUSTOMER_INTERIM');
You can verify the redefinition by querying the data dictionary:
select table_name, high_value
from DBA_TAB_PARTITIONS
where owner = 'SCOTT';
TABLE_NAME HIGH_VALUE
----------------------- ------------------------
CUSTOMER MAXVALUE
CUSTOMER 'L'
To abort the process after executing the START_REDEF_TABLE procedure, execute the
ABORT_REDEF_TABLE procedure (the input parameters are the schema, original table name,
and interim table name).


Pages:
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769
paraprotex paraprotex primacol biaƂystok zlecenia lokalne calivita