[20190520]exp imp on th fly.txt
[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的更多相关文章
- 专题实验 EXP & IMP
导入导出时 oracle 提供的实用工具, 如果这些被导出的对象还存在其他的相关对象, 比如要被导出的表上还存在索引, 注释等, 则导出工具会自动将这些相关的对象也提取出来, 并放入到导出的文件中去. ...
- Oracle中用exp/imp命令参数详解【转】
Oracle中用exp/imp命令参数详解 [用 exp 数 据 导 出]:1 将数据库TEST完全导出,用户名system 密码manager 导出到D:\daochu.dmp中 exp sy ...
- exp/imp 与 expdp/impdp 区别
在平常备库和数据库迁移的时候,当遇到大的数据库的时候在用exp的时候往往是需要好几个小时,耗费大量时间.oracle10g以后可以用expdp来导出数据库花费的时间要远小于exp花费的时间,而且文件也 ...
- EXP/IMP 导出生产库表的指定数据到测试库一例
一般来讲,EXP/IMP是上一代导出导入程序,EXPDP/IMPDP是新一代的导出导入程序.对于大数据量的导出导入首选EXPDP/IMPDP,可以用到并行度,对表空间等操作上也更加的灵活.对于小数据量 ...
- 利用exp/imp备份恢复数据库实例
用exp/imp备份数据库: Oracle数据导入导出imp/exp功能:Oracle数据导入导出imp/exp就相当与oracle数据还原与备份. 大多情况都可以用Oracle数据导入导出完成数据的 ...
- EXP/IMP迁移案例,IMP遭遇导入表的表空间归属问题
生产环境: 源数据库:Windows Server + Oracle 11.2.0.1 目标数据库:SunOS + Oracle 11.2.0.3 1.确认迁移需求:源数据库cssf 用户所有表和数据 ...
- Oracle的exp/imp详解
原文地址:Oracle的exp/imp详解 作者:jxlazzw 备份概述 逻辑备份:备份可分为两类 ,物理备份和逻辑备份 物理备份:该方法实现数据库的完整恢复,但需要极大的外部存储设备,例如磁带库, ...
- ORACLE EXP/IMP的使用详解
导入/导出是ORACLE幸存的最古老的两个命令行工具,其实我从来不认为Exp/Imp 是一种好的备份方式,正确的说法是Exp/Imp只能是一个好的转储工具,特别是在小型数据库的转储,表空间的迁移,表的 ...
- exp/imp 参数说明,中英对照
在任意可用exp/imp(导出/导入)命令的主机上,都可以通过exp/imp help=y查看所有的参数说明. 1.exp参数说明 2.imp参数说明 3.exp参数说明(中文) 4.imp参数说明( ...
随机推荐
- Create a Solution using the Wizard 使用向导创建解决方案
In this lesson, you will learn how to create a new XAF solution. You will also be able to run the ge ...
- 项目中使用http referer,为了盗取图片资源
项目背景:因为图片的数据是爬取的别人的图片,而且保存的数据仅仅是图片地址链接,为了减少数据存储和服务器压力,但是这就引发一个问题,有的图片地址没有做防盗处理,可以随意的下载使用:但有些图片的服务器做了 ...
- cookie --中间件
Cookie简介 cookie是服务器存储在用户计算机中的变量,可以让我们用同一个浏览器访问同一个域名的时共享数据. HTTP是一种无状态协议,简单来说,当你从一个页面,然后跳转到同站点的另一个页面时 ...
- ABP入门教程2 - 体系架构
点这里进入ABP入门教程目录 介绍 应用程序代码库的分层是一种广泛接受的技术,可帮助降低复杂性并提高代码可重用性.为了实现分层体系结构,ASP.NET Boilerplate遵循域驱动设计的原理. D ...
- sqlserver中将datetime类型转换为yyyyMMddHHmmss格式
JSON 中时间格式要求yyyyMMddHHmmss,从sqlserver 中转换 语句如下: Select REPLACE(CONVERT(varchar(100), GETDATE(), 112) ...
- 使用java代码操作Redis
1导入pom.xml依赖 <dependency> <groupId>redis.clients</groupId> <artifactId>jedis ...
- maven help 插件
maven help 插件 <build> <plugins> <plugin> <groupId>org.apache.maven.plugins&l ...
- Python 列表生成式 & 字典生成式
Python 列表生成式 & 字典生成式 通过生成式可以更加简洁地生成列表和字典 列表生成式 对比 直接生成数据后加入列表示例: user_list = list() for i in ran ...
- Note | 北航《网络安全》复习笔记
目录 1. 引言 2. 计算机网络基础 基础知识 考点 3. Internet协议的安全性 基础知识 考点 4. 单钥密码体制 基础知识 考点 5. 双钥密码体制 基础知识 考点 6. 消息认证与杂凑 ...
- FreeSql aop功能介绍
前言 FreeSql 是一个功能强大的 .NETStandard 库,用于对象关系映射程序(O/RM),支持 .NETCore 2.1+ 或 .NETFramework 4.6.1+(QQ群:4336 ...