exp 边导出边压缩

oracle版本:10204

如果导出的dmp过大,磁盘空间也比较紧张的话,exp可以边导出边压缩,做一个测试:

SQL> create table t as select * from all_objects;

Table created.

SQL> select count(*) from t;   

  COUNT(*)
----------
     53677
[oracle@qht115 ~]$ exp l5m/l5m file=>(gzip>t.dmp.gz) tables=t 

Export: Release 10.2.0.4.0 - Production on Thu Mar 26 10:17:34 2020

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...
. . exporting table                              T      53677 rows exported
Export terminated successfully without warnings.
[oracle@qht115 ~]$ file t.dmp.gz 
t.dmp.gz: gzip compressed data, from Unix, last modified: Thu Mar 26 10:17:34 2020

imp也可以边解压缩边导入

SQL> drop table t;

Table dropped.

[oracle@qht115 ~]$ imp l5m/l5m file=<(gunzip<t.dmp.gz) fromuser=l5m touser=l5m

Import: Release 10.2.0.4.0 - Production on Thu Mar 26 10:20:59 2020

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V10.02.01 via conventional path
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
. importing L5M's objects into L5M
. . importing table                            "T"      53677 rows imported
Import terminated successfully without warnings.

验证一下:

SQL> select count(*) from t;   

  COUNT(*)
----------
     53677

 

参考:http://blog.itpub.net/267265/viewspace-2644894/

发布了197 篇原创文章 · 获赞 19 · 访问量 17万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览