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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值