Search the Reference Library pages:  

Oracle DBMS_SCHEMA_COPY

Version 10.2
 
General Information
Note: This 10.2 package has been dropped from 11.1.0.6
Note: RAC's service-based operations use DBMS_SCHEMA_COPY for  schema pre-compilation on a service basis
Source {ORACLE_HOME}/rdbms/admin/prvtupg.plb
First Available 10.1

Dependencies
CDEF$ DBMS_UPG_DEBUG DBMS_UPG_SYSAUTH_CT$
CON$ DBMS_UPG_INVALIDATE DEPENDENCY$
DBMS_APPS_UPG_WORKING DBMS_UPG_OBJAUTH_C0$ DUAL
DBMS_LOB DBMS_UPG_OBJAUTH_CS$ LINK$
DBMS_METADATA DBMS_UPG_OBJAUTH_CT$ OBJ$
DBMS_SCHEMA_COPY DBMS_UPG_OBJECT$ OBJAUTH$
DBMS_STATS DBMS_UPG_RLS_C0$ PROCEDUREJAVA$
DBMS_SYS_ERROR DBMS_UPG_RLS_CS$ RLS$
DBMS_UPGRADE_INTERNAL DBMS_UPG_RLS_CT$ SYN$
DBMS_UPG_CAT_C0$ DBMS_UPG_STATUS$ SYSAUTH$
DBMS_UPG_CAT_CS$ DBMS_UPG_SYSAUTH_C0$ TRIGGER$
DBMS_UPG_CAT_CT$ DBMS_UPG_SYSAUTH_CS$ USER$
DBMS_UPG_CHANGE$    

Exceptions
Number Description
ORA-39310 CLEAN_FAILED_CLONE was called out of sequence. The prior operation was not a schema clone operation or the prior schema clone operation was successful.
ORA-39311 CLONE_RECOVERY was called out of sequence. The prior operation was not a schema clone operation or the prior schema clone operation was successful.
ORA-39312 The routine DBMS_SCHEMA_COPY.CLEAN_TARGET was called out of sequence. The prior clone operation failed.
ORA-39313 The routine DBMS_SCHEMA_COPY.CLONE was called out of sequence. This error occurred because clone operation was done before.
ORA-39314 SYNC_CODE was called out of sequence. The prior operation was not a schema clone or sync.
ORA-39315 The routine DBMS_SCHEMA_COPY.SWAP was called out of sequence. The error occurred because the prior operation was not a schema clone or sync operation.
ORA-39316 CLEAN_UP was called out of sequence. The prior schema clone operation failed. Call the CLEAN_FAILED_CLONE or CLONE_RECOVERY to clean up or recover from the failed clone operation.
ORA-39317 The routine DBMS_SCHEMA_COPY.VALIDATION_CHECK was called out of sequence. The error occurred because the prior operation was not one of schema clone, sync, or valdation_check.
Object Privileges Must be run using a privileged account
 
CLEAN_FAILED_CLONE
Undocumented dbms_schema_copy.clean_failed_clone(
src_sch  VARCHAR2,
dst_sch  VARCHAR2,
threads  NUMBER);
exec dbms_schema_copy.clean_failed_clone('UWCLASS', 'ABC', 2);
 
CLEAN_TARGET
Removes objects owned by the destination schema if a clone fails dbms_schema_copy.clean_target(
dst_sch  VARCHAR2,
force    BOOLEAN,
threads  NUMBER);
exec dbms_schema_copy.clean_target('ABC', FALSE, 2);
 
CLEAN_UP
Completes the Clone process. Only valid following a cloning. dbms_schema_copy.
src_sch  VARCHAR2,
dst_sch  VARCHAR2);
exec dbms_schema_copy.clean_up('UWCLASS', 'ABC');
 
CLONE

Clones functions, packages, procedures, synonyms, types, and views
dbms_schema_copy.clone(
src_sch  VARCHAR2,
dst_sch  VARCHAR2,
threads  BINARY_INTEGER,
debug    BOOLEAN);
conn / as sysdba

BEGIN
  dbms_schema_copy.clone('UWCLASS', 'ABC', 2, FALSE);
  dbms_schema_copy.clean_up('UWCLASS', 'ABC');
END;
/
 
CLONE_RECOVERY
Undocumented dbms_schema_copy.clone_recovery(
src_sch  VARCHAR2,
dst_sch  VARCHAR2,
threads  NUMBER);
exec dbms_schema_copy.clone_recovery('UWCLASS', 'ABC', 2);
 
SWAP

Undocumented
dbms_schema_copy.swap(
src_sch          VARCHAR2,
dst_sch          VARCHAR2,
ignore_conflict  BOOLEAN,
force_swap       BOOLEAN);
conn / as sysdba

BEGIN
  dbms_schema_copy.clone('ABC', 'DEF', 2, FALSE);
  dbms_schema_copy.clean_up('ABC', 'DEF');
END;
/

conn abc/abc

CREATE VIEW abc_view AS
SELECT table_name, tablespace_name
FROM all_tables;

conn def/def

CREATE VIEW def_view AS
SELECT constraint_name, constriant_type
FROM all_constraints;

conn / as sysdba

exec dbms_schema_copy.swap('ABC', 'DEF', TRUE, TRUE);


conn abc/abc

SELECT view_name FROM user_views;

conn def/def

SELECT view_name FROM user_views;
 
SYNC_CODE
Undocumented dbms_schema_copy.sync_code(
src_sch          VARCHAR2,
dst_sch          VARCHAR2,
ignore_conflict  BOOLEAN,
force_sync       BOOLEAN)
exec dbms_schema_copy.clean_up('UWCLASS', 'ABC', FALSE, TRUE);
 
VALIDATION_CHECK
Undocumented dbms_schema_copy.validation_check(
src_sch  VARCHAR2,
dst_sch  VARCHAR2);
exec dbms_schema_copy.clean_up('ABC', 'DEF');
 
Related Topics
RAC
 
   Home |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us    © 2003 - 2024 psoug.org
-----