[20190520]exp imp on th fly.txt

--//以前做的测试,查找浪费许多时间,做1个记录。
--//注:仅仅linux 操作系统,bash shell版本不能太低就可以实现,现在安装的linux bash shell应该都没有问题。

1.环境:
SCOTT@book> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

2.测试exp:
exp on the fly, run:
create table t as select * from all_objects;

$ exp scott/book file=>(gzip>t.dmp.gz)  tables=t buffer=8388608
Export: Release 11.2.0.4.0 - Production on Mon May 20 08:58:15 2019
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table                              T      83245 rows exported
Export terminated successfully without warnings.

$ file t.dmp.gz
t.dmp.gz: gzip compressed data, from Unix, last modified: Mon May 20 08:58:15 2019

SCOTT@book> rename t to ty;
Table renamed.

3.测试imp:
imp on the fly, run:

$ imp scott/book full=y  file=<(gunzip <t.dmp.gz) buffer=8388608
Import: Release 11.2.0.4.0 - Production on Mon May 20 09:00:42 2019
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V11.02.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing SCOTT's objects into SCOTT
. importing SCOTT's objects into SCOTT
. . importing table                            "T"      83245 rows imported
Import terminated successfully without warnings.
imp scott/book full=y  file=<(gunzip <t.dmp.gz) buffer=8388608

SCOTT@book> select count(*) from t union all select  count(*) from ty;
  COUNT(*)
----------
     83245
     83245

4.也可以通过管道实现所谓的不落地方式,只要建立将p.dmp.gz建立为管道文件:
$ mkfifo p.dmp.gz
$ ls -l p.dmp.gz
prw-r--r-- 1 oracle oinstall 0 2019-05-20 09:04:27 p.dmp.gz

--//再执行如下:
$ cat ad.sh
#! /bin.bash
exp scott/book file=>(gzip>p.dmp.gz)  tables=t buffer=8388608 &
sleep 5
imp scott/btbtms@192.168.100.33:1521/test full=y  file=<(gunzip <p.dmp.gz) buffer=8388608 &
wait

SCOTT@test> select count(*) from t ;
  COUNT(*)
----------
     83245

--//注expdp,impdp不支持这样方式,实际上expdp,impdp已经支持数据压缩(早期仅仅支持元数据),没有必要这样做,意义不大。

[20190520]exp imp on th fly.txt的更多相关文章

  1. 专题实验 EXP & IMP

    导入导出时 oracle 提供的实用工具, 如果这些被导出的对象还存在其他的相关对象, 比如要被导出的表上还存在索引, 注释等, 则导出工具会自动将这些相关的对象也提取出来, 并放入到导出的文件中去. ...

  2. Oracle中用exp/imp命令参数详解【转】

    Oracle中用exp/imp命令参数详解 [用 exp 数 据 导 出]:1  将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中   exp sy ...

  3. exp/imp 与 expdp/impdp 区别

    在平常备库和数据库迁移的时候,当遇到大的数据库的时候在用exp的时候往往是需要好几个小时,耗费大量时间.oracle10g以后可以用expdp来导出数据库花费的时间要远小于exp花费的时间,而且文件也 ...

  4. EXP/IMP 导出生产库表的指定数据到测试库一例

    一般来讲,EXP/IMP是上一代导出导入程序,EXPDP/IMPDP是新一代的导出导入程序.对于大数据量的导出导入首选EXPDP/IMPDP,可以用到并行度,对表空间等操作上也更加的灵活.对于小数据量 ...

  5. 利用exp/imp备份恢复数据库实例

    用exp/imp备份数据库: Oracle数据导入导出imp/exp功能:Oracle数据导入导出imp/exp就相当与oracle数据还原与备份. 大多情况都可以用Oracle数据导入导出完成数据的 ...

  6. EXP/IMP迁移案例,IMP遭遇导入表的表空间归属问题

    生产环境: 源数据库:Windows Server + Oracle 11.2.0.1 目标数据库:SunOS + Oracle 11.2.0.3 1.确认迁移需求:源数据库cssf 用户所有表和数据 ...

  7. Oracle的exp/imp详解

    原文地址:Oracle的exp/imp详解 作者:jxlazzw 备份概述 逻辑备份:备份可分为两类 ,物理备份和逻辑备份 物理备份:该方法实现数据库的完整恢复,但需要极大的外部存储设备,例如磁带库, ...

  8. ORACLE EXP/IMP的使用详解

    导入/导出是ORACLE幸存的最古老的两个命令行工具,其实我从来不认为Exp/Imp 是一种好的备份方式,正确的说法是Exp/Imp只能是一个好的转储工具,特别是在小型数据库的转储,表空间的迁移,表的 ...

  9. exp/imp 参数说明,中英对照

    在任意可用exp/imp(导出/导入)命令的主机上,都可以通过exp/imp help=y查看所有的参数说明. 1.exp参数说明 2.imp参数说明 3.exp参数说明(中文) 4.imp参数说明( ...

随机推荐

  1. 2018简约商务工作汇报工作总结公司培训团队介绍PPT模

    这几款ppt模板都是简约大气类型的,32页足够丰富,有完整结构框架,可以修改文字图片直接套用模板,是通用的商务ppt模板. 模版来源:http://ppt.dede58.com/gongzuohuib ...

  2. pip方式安装Jupyter

    pip方式安装Jupyter 如你的cmd命令窗口无法识别pip命令,请配置下环境变量(将python的''Scripts''文件夹路径添加至''path''变量里面). 使用以下命令更新pip和安装 ...

  3. WPF-自定义控件引用外部样式+转换器

    引用单个外部样式 <UserControl.Resources> <ResourceDictionary Source="pack://application:,,,/XM ...

  4. Linux-3.14.12内存管理笔记【建立内核页表(1)】

    前面已经分析过了Intel的内存映射和linux的基本使用情况,已知head_32.S仅是建立临时页表,内核还是要建立内核页表,做到全面映射的.下面就基于RAM大于896MB,而小于4GB ,切CON ...

  5. jmeter使用问题——数据库无法连接

    使用Jmeter 数据库连接配置组件,执行sql时jmeter日志报错 WARN o.a.j.p.j.p.AbstractJDBCProcessor: SQL Problem in 查询账号申诉ID: ...

  6. Mybatis的动态sql以及分页

    mybatis动态sql If.trim.foreach <select id="selectBooksIn" resultType="com.jt.model.B ...

  7. go语言设计模式之template

    template.go package template import ( "strings" ) type MessageRetriever interface { Messag ...

  8. apache配置文件说明及一些指令

    httpd命令和apachectl命令 [root@localhost ~]# httpd -h Usage: httpd [-D name] [-d directory] [-f file] [-C ...

  9. alipay sign error

    阴影部分地址参数有问题: <PAY_COMPLETE_PAGE_URL><![CDATA[https://baoxian.itaiping.com/ae-console/remote ...

  10. "One or more types required to compile a dynamic expression cannot be found. Are you missing references to Microsoft.CSharp.dll and System.Core.dll?"的解决方法

    #事故现场: 在一个.net 4.0 的项目中使用dynamic,示例代码如下: private static void Main(string[] args) { dynamic obj; obj ...