在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 不存在
导出成功终止, 但出现警告。
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/