--#
--# Beispiel zum Kopieren
--#
set serveroutput on;
declare
v_err PLS_INTEGER;
begin
dbms_redefinition.copy_table_dependents('TABLE_OWNER',
'SOURCE_TABLE',
'NEW_TABLE',
0,
TRUE,
TRUE,
TRUE ,
true,
v_err);
dbms_output.put_line('errors: '||v_err);
end;
/
--#
--# Syntax und Parameter
--#
DBMS_REDEFINITION.COPY_TABLE_DEPENDENTS(
uname IN VARCHAR2,
orig_table IN VARCHAR2,
int_table IN VARCHAR2,
copy_indexes IN PLS_INTEGER := 0,
copy_triggers IN BOOLEAN := TRUE,
copy_constraints IN BOOLEAN := TRUE,
copy_privileges IN BOOLEAN := TRUE,
ignore_errors IN BOOLEAN := FALSE,
num_errors OUT PLS_INTEGER);
Parameters
Parameter Description
uname
The schema name of the tables.
orig_table
The name of the table being redefined.
int_table
The name of the interim table.
copy_indexes
A flag indicating whether to copy the indexes
0 - don't copy any index
dbms_redefinition.cons_orig_params - copy the indexes using the physical parameters of the source indexes
copy_triggers
TRUE implies clone triggers, FALSE implies do nothing
copy_constraints
TRUE implies clone constraints, FALSE implies do nothing
copy_privileges
TRUE implies clone privileges, FALSE implies do nothing
ignore_errors
TRUE implies if an error occurs while cloning a particular dependent object, then skip that object and continue cloning other dependent objects. FALSE implies that the cloning process should stop upon encountering an error.
num_errors
The number of errors that occurred while cloning dependent objects