【oracle】 exp 中compress的使用

Posted on 2012-04-19 11:07  雅飞士  阅读(1125)  评论(0编辑  收藏  举报

实验 exp 时候 compress 选项的影响。
SQL> select count(*) from scott.tianya;
  COUNT(*)
----------
  31121561
SQL> select a.owner ,a.bytes/1024/1024 as M from dba_segments a where a.segment_name='TIANYA';
OWNER                                   M
------------------------------ ----------
SCOTT                                1472

首先是加compress=n ,默认是 compress=Y  进行导出操作。

C:\Users\Administrator>exp scott/dang file=c:\tianya.dmp log=c:\tianya.log table
s=tianya rows=n compress=n

Export: Release 10.2.0.3.0 - Production on 星期三 4月 18 12:42:20 2012

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

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
注: 将不导出表数据 (行)

即将导出指定的表通过常规路径...
. . 正在导出表                          TIANYA
成功终止导出, 没有出现警告。

C:\Users\Administrator>imp system/dang file=c:\tianya.dmp fromuser=scott touser=
yafeishi

Import: Release 10.2.0.3.0 - Production on 星期三 4月 18 12:42:30 2012

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

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options

经由常规路径由 EXPORT:V10.02.01 创建的导出文件

警告: 这些对象由 SCOTT 导出, 而不是当前用户

已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 SCOTT 的对象导入到 YAFEISHI
成功终止导入, 没有出现警告。

SQL> select a.owner ,a.bytes/1024/1024 as M from dba_segments a where a.segment_name='TIANYA';
OWNER                                   M
------------------------------ ----------
SCOTT                                1472
YAFEISHI                           0.0625

SQL> select count(*) from yafeishi.tianya;
  COUNT(*)
----------
         0
SQL> select count(*) from scott.tianya;
  COUNT(*)
----------
  31121561

再次实验 compress=y 的情况。
SQL> drop table yafeishi.tianya cascade constraints;
Table dropped

C:\Users\Administrator>exp scott/dang file=c:\tianya.dmp log=c:\tianya.log table
s=tianya rows=n

Export: Release 10.2.0.3.0 - Production on 星期三 4月 18 12:42:20 2012

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

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
注: 将不导出表数据 (行)

即将导出指定的表通过常规路径...
. . 正在导出表                          TIANYA
成功终止导出, 没有出现警告。

C:\Users\Administrator>imp system/dang file=c:\tianya.dmp fromuser=scott touser=
yafeishi

Import: Release 10.2.0.3.0 - Production on 星期三 4月 18 12:42:30 2012

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

连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options

经由常规路径由 EXPORT:V10.02.01 创建的导出文件

警告: 这些对象由 SCOTT 导出, 而不是当前用户

已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入
. 正在将 SCOTT 的对象导入到 YAFEISHI
成功终止导入, 没有出现警告。

SQL> select a.owner ,a.bytes/1024/1024 as M from dba_segments a where a.segment_name='TIANYA';
OWNER                                   M
------------------------------ ----------
SCOTT                                1472
YAFEISHI                             1472

SQL> select count(*) from yafeishi.tianya;
  COUNT(*)
----------
         0
SQL> select count(*) from scott.tianya;
  COUNT(*)
----------
  31121561

Copyright © 2024 雅飞士
Powered by .NET 8.0 on Kubernetes