Search This Blog

Friday, November 20, 2009

Expdp and impdp examples

#############################################################################################
# #
# impdp using network_link #
# #
#############################################################################################

Note:
--------------------------------------------------------------------------------------------
Database Link that link to Source database. In my example , I create the following database
link.
--------------------------------------------------------------------------------------------
SQL>create or replace public database link LINUX
connect to system identified by oracle using 'TOM';

---Create ALL depended tablespace ( default tablespace and temporary tablespace)


WINDOWS
+++++++

C:\>impdp system/oracle schemas=papikos network_link=LINUX

Import: Release 10.2.0.1.0 - Production on Friday, 13 July, 2007 15:05:08

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** schemas=papikos network_link=LINUX
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 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/TABLE/TABLE
. . imported "PAPIKOS"."P1" 100 rows
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 15:07:00

#############################################################################################
# #
# impdp using REMAP_TABLESPACE #
# #
#############################################################################################

Note:
--------------------------------------------------------------------------------------------
The user katerina has default tablespace the tablespace TOOLS. During the import I
remap the katerinas's tablespace to TBS1.
--------------------------------------------------------------------------------------------
C:\>impdp system/oracle schemas=katerina2 remap_tablespace=tools:TBS1 network_link=LINUX

Import: Release 10.2.0.1.0 - Production on Friday, 13 July, 2007 16:25:24

Copyright (c) 2003, 2005, Oracle. All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** schemas=katerina2 remap_tablespace=tools:TBS1 network_link=
LINUX
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 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/TABLE/TABLE
. . imported "KATERINA2"."K1" 100 rows
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully completed at 16:26:22