Vous êtes sur la page 1sur 3

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Oct 7 23:08:59 2012 Copyright (c) 1982, 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 SQL> select table_name from user_tables; TABLE_NAME -----------------------------DEPT EMP BONUS SALGRADE SQL> DISC Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 Production With the Partitioning, OLAP and Data Mining options SQL> HOST Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. Creating DIRECTORY before commencing EXPDP utility SQL> CONN /AS SYSDBA Connected. SQL> CREATE OR REPLACE DIRECTORY EXT_DIR AS 'F:/ORABB_DIR/DUMP'; Directory created. SQL> GRANT READ,WRITE ON DIRECTORY EXT_DIR TO SCOTT; Grant succeeded. Running command line utility EXPDP to export tables of scott schema F:\Documents and Settings\Biswabrata Banerjee>expdp scott/tiger dumpfile=test.dmp directory=ext_dir Export: Release 10.2.0.1.0 - Production on Sunday, 07 October, 2012 23:30:23 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

Starting "SCOTT"."SYS_EXPORT_SCHEMA_01": scott/******** dumpfile=test.dmp directory=ext_dir Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 192 KB Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE 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/TABLE/COMMENT Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS . . exported "SCOTT"."DEPT" 5.656 KB 4 rows . . exported "SCOTT"."EMP" 7.820 KB 14 rows . . exported "SCOTT"."SALGRADE" 5.585 KB 5 rows . . exported "SCOTT"."BONUS" 0 KB 0 rows Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ***************************************************************************** Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is: F:\ORABB_DIR\DUMP\TEST.DMP Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at 23:30:37

F:\Documents and Settings\Biswabrata Banerjee>sqlplus biswa/biswa SQL*Plus: Release 10.2.0.1.0 - Production on Sun Oct 7 23:31:34 2012 Copyright (c) 1982, 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 SQL> impdp biswa/biswa dumpfile=test.dmp directory=ext_dir remap_schema=scott:biswa SP2-0734: unknown command beginning "impdp bisw..." - rest of line ignored. SQL> host Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. Importing tables from scott F:\Documents and Settings\Biswabrata Banerjee>impdp biswa/biswa dumpfile=test.dmp directory=ext_dir remap_schema=scott:b iswa Import: Release 10.2.0.1.0 - Production on Sunday, 07 October, 2012 23:34:41

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 Master table "BISWA"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "BISWA"."SYS_IMPORT_FULL_01": biswa/******** dumpfile=test.dmp directory=ext_dir remap_schema=scott:biswa Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA . . imported "BISWA"."DEPT" 5.656 KB 4 rows . . imported "BISWA"."EMP" 7.820 KB 14 rows . . imported "BISWA"."SALGRADE" 5.585 KB 5 rows . . imported "BISWA"."BONUS" 0 KB 0 rows 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/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "BISWA"."SYS_IMPORT_FULL_01" successfully completed at 23:34:46

F:\Documents and Settings\Biswabrata Banerjee>exit SQL> show user USER is "BISWA" SQL> select table_name from user_tables; TABLE_NAME -----------------------------ANYDATA_TEST TBL COURSES EMP_NESTED DEPT EMP BONUS SALGRADE 8 rows selected. SQL>

Go through http://www.oracle-dba-online.com/data_pump_utility.htm link for more understanding of oracles DATAPUMP utility.

Vous aimerez peut-être aussi