Data pump to refresh schema in the same database

Below steps can be followed to import data from one schema to another, inside single db instance.
impdp with network_link is used.


Realted question on OTN --> https://community.oracle.com/message/13652057#13652057
 SQL> create public database link impdpt connect to SYSTEM identified by abc123 using 'DG1';  
 Database link created.  
 SQL>  

 [oracle@prima admin]$ impdp system/abc123 directory=DATA_PUMP_DIR network_link=impdpt schemas=hr remap_schema=hr:hrtn logfile=test_same.log  
 Import: Release 11.2.0.4.0 - Production on Tue Dec 29 02:53:24 2015  
 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.  
 Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production  
 With the Partitioning, OLAP, Data Mining and Real Application Testing options  
 Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** directory=DATA_PUMP_DIR network_link=impdpt schemas=hr remap_schema=hr:hrtn logfile=test_same.log  
 Estimate in progress using BLOCKS method...  
 Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA  
 Total estimation using BLOCKS method: 448 KB  
 Processing object type SCHEMA_EXPORT/USER  
 Processing object type SCHEMA_EXPORT/SYSTEM_GRANT  
 Processing object type SCHEMA_EXPORT/ROLE_GRANT  
 Processing object type SCHEMA_EXPORT/DEFAULT_ROLE  
 Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA  
 Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE  
 Processing object type SCHEMA_EXPORT/TABLE/TABLE  
 . . imported "HRTN"."COUNTRIES"               25 rows  
 . . imported "HRTN"."DEPARTMENTS"              27 rows  
 . . imported "HRTN"."EMPLOYEES"               107 rows  
 . . imported "HRTN"."JOBS"                  19 rows  
 . . imported "HRTN"."JOB_HISTORY"              10 rows  
 . . imported "HRTN"."LOCATIONS"               23 rows  
 . . imported "HRTN"."REGIONS"                 4 rows  
 Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT  
 Processing object type SCHEMA_EXPORT/TABLE/COMMENT  
 Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE  
 Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE  
 Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX  
 Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT  
 Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS  
 Processing object type SCHEMA_EXPORT/VIEW/VIEW  
 Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT  
 Processing object type SCHEMA_EXPORT/TABLE/TRIGGER  
 Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS  
 Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at Tue Dec 29 02:54:09 2015 elapsed 0 00:00:44  
 [oracle@prima admin]$   

Comments

Popular posts from this blog

ORA-16433: The database or pluggable database must be opened in read/write

Wait for unread message on broadcast channel - Blocking Sessions

ORA-14126 - While splitting max value partition