你好,游客 登录 注册 搜索
背景:
阅读新闻

数据泵 EXPDP 导出工具的使用

[日期:2012-01-18] 来源:Linux社区  作者:robinson_0612 [字体:大 中 小]

    c.基于表空间导出

    [Oracle@oradb /]$ expdp scott/tiger directory=dump_scott dumpfile=users1.dmp,user2.dmp /

    > compression tablespaces=users

 

    Export: Release 10.2.0.1.0 - Production on Monday, 20 September, 2010 15:17:35

 

    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_TABLESPACE_01":  scott/********/ directory=dump_scott dumpfile=users1.dmp,user2.dmp compression tablespaces=users

    Estimate in progress using BLOCKS method...

    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

    Total estimation using BLOCKS method: 192 KB

    Processing object type TABLE_EXPORT/TABLE/TABLE

    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

    Processing object type TABLE_EXPORT/TABLE/COMMENT

    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

    Processing object type TABLE_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_TABLESPACE_01" successfully loaded/unloaded

    ******************************************************************************

    Dump file set for SCOTT.SYS_EXPORT_TABLESPACE_01 is:

      /home/oracle/dump/scott/users1.dmp

    Job "SCOTT"."SYS_EXPORT_TABLESPACE_01" successfully completed at 15:17:51  

 

    [oracle@oradb /]$ ls -lh /home/oracle/dump/scott

    total 524K

    -rw-r----- 1 oracle oinstall 4.0K Sep 20 15:17 compression.dmp

    -rw-r----- 1 oracle oinstall 224K Sep 20 15:09 dumpscott.dmp

    -rw-r----- 1 oracle oinstall 124K Sep 20 14:55 dumptab.dmp

    -rw-r--r-- 1 oracle oinstall 1.6K Sep 20 15:17 export.log

    -rw-r--r-- 1 oracle oinstall 1.4K Sep 20 14:55 scott.log

    -rw-r----- 1 oracle oinstall 4.0K Sep 20 15:17 user2.dmp

    -rw-r----- 1 oracle oinstall 148K Sep 20 15:17 users1.dmp  

   

    d. 导出整个数据库,且使用并行导出方式

    [oracle@oradb /]$ expdp scott/tiger directory=dump_scott dumpfile=full20_%u.dmp parallel=4 full=y

 

    Export: Release 10.2.0.1.0 - Production on Monday, 20 September, 2010 15:24:02

 

    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

    ORA-31631: privileges are required

    ORA-39161: Full database jobs require privileges

 

    [oracle@oradb /]$ sqlplus /nolog

 

    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Sep 20 15:24:16 2010

 

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

 

    SQL> conn /as sysdba

    Connected.

    Grant succeeded.

 

    SQL> ! 

    [oracle@oradb /]$ expdp scott/tiger directory=dump_scott dumpfile=full20_%u.dmp parallel=6 full=y

    --中间过程省略

    [oracle@oradb dump]$ ls -lh ./scott/fu*

    -rw-r----- 1 oracle oinstall  19M Sep 20 15:36 ./scott/full20_01.dmp

    -rw-r----- 1 oracle oinstall  22M Sep 20 15:34 ./scott/full20_02.dmp

    -rw-r----- 1 oracle oinstall  18M Sep 20 15:36 ./scott/full20_03.dmp

    -rw-r----- 1 oracle oinstall  15M Sep 20 15:36 ./scott/full20_04.dmp

    -rw-r----- 1 oracle oinstall 5.4M Sep 20 15:36 ./scott/full20_05.dmp

    -rw-r----- 1 oracle oinstall 196K Sep 20 15:33 ./scott/full20_06.dmp

 

 

    [oracle@oradb dump]$ ps -ef | grep ora_d

    oracle    3445     1  0 14:19 ?        00:00:01 ora_dbw0_orcl

    oracle    3461     1  0 14:19 ?        00:00:00 ora_d000_orcl

    oracle   23443     1  4 15:32 ?        00:00:01 ora_dm00_orcl

    oracle   23494     1 23 15:32 ?        00:00:08 ora_dw01_orcl

    oracle   23673     1 11 15:33 ?        00:00:02 ora_dw02_orcl

    oracle   23675     1 16 15:33 ?        00:00:03 ora_dw03_orcl

    oracle   23677     1  8 15:33 ?        00:00:01 ora_dw04_orcl

    oracle   23679     1  5 15:33 ?        00:00:00 ora_dw05_orcl

    oracle   23681     1  2 15:33 ?        00:00:00 ora_dw06_orcl

    oracle   23696  2416  0 15:33 pts/1    00:00:00 grep ora_d

linux
相关资讯       Oracle基础教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款