Oracle9i Supplied PL/SQL Packages and Types Reference Release 2 (9.2) Part Number A96612-01 |
|
DBMS_REDEFINITION , 3 of 3
This procedure determines if a given table can be redefined online. This is the first step of the online redefinition process. If the table is not a candidate for online redefinition, an error message is raised.
DBMS_REDEFINITION.can_redef_table ( uname IN VARCHAR2, tname IN VARCHAR2, options_flag IN BINARY_INTEGER := 1);
If the table is not a candidate for online redefinition, an error message is raised.
This procedure initiates the redefinition process. After verifying that the table can be redefined online, you create an empty interim table (in the same schema as the table to be redefined) with the desired attributes of the post-redefinition table.
DBMS_REDINITION.start_redef_table ( uname IN VARCHAR2, orig_table IN VARCHAR2, int_table IN VARCHAR2, col_mapping IN VARCHAR2 := NULL, options_flag IN BINARY_INTEGER := 1);
This procedure completes the redefinition process. Before this step, you can create new indexes, triggers, grants, and constraints on the interim table. The referential constraints involving the interim table must be disabled. After completing this step, the original table is redefined with the attributes and data of the interim table. The original table is locked briefly during this procedure.
DBMS_REDFINITION.finish_redef_table ( uname IN VARCHAR2, orig_table IN VARCHAR2, int_table IN VARCHAR2);
Parameters | Description |
---|---|
uname |
The schema name of the tables. |
orig_table |
The name of the table to be redefined. |
int_table |
The name of the interim table. |
This procedure keeps the interim table synchronized with the original table. This step is useful in minimizing the amount of synchronization needed to be done by finish_reorg_table
before completing the online redefinition. This procedure can be called between long running operations (such as create index) on the interim table to sync it up with the data in the original table and speed up subsequent operations.
DBMS_REDFINITION.sync_interim_table ( uname IN VARCHAR2, orig_table IN VARCHAR2, int_table IN VARCHAR2);
Parameter | Description |
---|---|
uname |
The schema name of the table. |
orig_table |
The name of the table to be redefined. |
int_table |
The name of the interim table. |
This procedure cleans up errors that occur during the redefinition process. This procedure can also be used to abort the redefinition process any time after start_reorg_table
has been called and before finish_reorg_table
is called.
DBMS_REDEFINITION.abort_redef_table ( uname IN VARCHAR2, orig_table IN VARCHAR2, int_table IN VARCHAR2);
Parameter | Description |
---|---|
uname |
The schema name of the tables. |
orig_table |
The name of the table to be redefined. |
int_table |
The name of the interim table. |
|
Copyright © 2000, 2002 Oracle Corporation. All Rights Reserved. |
|