expdp会导出空表

在11g中,expdp会把空表也导出,虽然还没有分配segment
               exp是找不到没有分配segment的表
SQL> conn song/song
已连接。
SQL> drop table test purge;


表已删除。


SQL> create table test (id number);


表已创建。




SQL> SELECT COUNT(*) FROM DBA_SEGMENTS WHERE SEGMENT_NAME='TEST' AND OWNER='SONG';


  COUNT(*)
----------
         0


SQL> EXIT
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开


[oracle11g@ogg2 ~]$ expdp song/song directory=DATA_PUMP_DIR dumpfile=t.dmp tables=test


Export: Release 11.2.0.1.0 - Production on 星期二 5月 6 21:29:54 2014


Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
启动 "SONG"."SYS_EXPORT_TABLE_01":  song/******** directory=DATA_PUMP_DIR dumpfile=t.dmp tables=test 
正在使用 BLOCKS 方法进行估计...
处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 0 KB
处理对象类型 TABLE_EXPORT/TABLE/TABLE
. . 导出了 "SONG"."TEST"                                   0 KB       0 行
已成功加载/卸载了主表 "SONG"."SYS_EXPORT_TABLE_01" 
******************************************************************************
SONG.SYS_EXPORT_TABLE_01 的转储文件集为:
  /ora11g/app/oracle/admin/ora11g/dpdump/t.dmp
作业 "SONG"."SYS_EXPORT_TABLE_01" 已于 21:30:12 成功完成




[oracle11g@ogg2 ~]$ sqlplus song/song


SQL*Plus: Release 11.2.0.1.0 Production on 星期二 5月 6 21:30:34 2014


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




连接到: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> drop table test purge;


表已删除。


SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
[oracle11g@ogg2 ~]$ impdp song/song directory=DATA_PUMP_DIR dumpfile=t.dmp


Import: Release 11.2.0.1.0 - Production on 星期二 5月 6 21:31:03 2014


Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.


连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已成功加载/卸载了主表 "SONG"."SYS_IMPORT_FULL_01" 
启动 "SONG"."SYS_IMPORT_FULL_01":  song/******** directory=DATA_PUMP_DIR dumpfile=t.dmp 
处理对象类型 TABLE_EXPORT/TABLE/TABLE
处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
. . 导入了 "SONG"."TEST"                                   0 KB       0 行
作业 "SONG"."SYS_IMPORT_FULL_01" 已于 21:31:21 成功完成


[oracle11g@ogg2 ~]$ sqlplus song/song


SQL*Plus: Release 11.2.0.1.0 Production on 星期二 5月 6 21:31:33 2014


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




连接到: 
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> select * from test;


未选定行




SQL> SELECT COUNT(*) FROM DBA_SEGMENTS WHERE SEGMENT_NAME='TEST' AND OWNER='SONG';


  COUNT(*)
----------
         0


[oracle11g@ogg2 ~]$ exp song/song tables=test file=/ora11g/test.dmp


Export: Release 11.2.0.1.0 - Production on 星期二 5月 6 21:37:39 2014


Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.




连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集


即将导出指定的表通过常规路径...
EXP-00011: SONG.TEST 不存在
导出成功终止, 但出现警告。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25099483/viewspace-1155443/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25099483/viewspace-1155443/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值