【练习】数据移动---导入(IMPDP)
1.导入表并验证:
04:54:48 SYS@ORA11GR2>grant connect,resource to jj identified by jj; Grant succeeded. 04:55:43 SYS@ORA11GR2>conn jj/jj
Connected. 2.[oracle@host03 datadump]$ impdp system/oracle directory=dir_dp dumpfile=emp30.dmp remap_schema=scott:jj Import: Release 11.2.0.4.0 - Production on Wed Dec 14 04:56:54 2016 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
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** directory=dir_dp dumpfile=emp30.dmp remap_schema=scott:jj
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "JJ"."EMP" 8.25 KB 6 rows
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
ORA-39083: Object type REF_CONSTRAINT failed to create with error:
ORA-00942: table or view does not exist
Failing sql is:
ALTER TABLE "JJ"."EMP" ADD CONSTRAINT "FK_DEPTNO" FOREIGN KEY ("DEPTNO") REFERENCES "JJ"."DEPT" ("DEPTNO") ENABLE
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Wed Dec 14 04:57:01 2016 elapsed 0 00:00:06 3.验证:d.
04:56:41 JJ@ORA11GR2>select tname from tab; TNAME
------------------------------
EMP
2.导入schema:
①删除用户
04:59:18 SYS@ORA11GR2>drop user scott cascade; User dropped.
②创建用户
05:00:32 SYS@ORA11GR2>create user scott identified by tiger; User created. 05:00:45 SYS@ORA11GR2>grant connect,resource to scott; Grant succeeded. ③[oracle@host03 datadump]$ impdp system/oracle directory=dir_dp dumpfile=scott_all_tab.dmp Import: Release 11.2.0.4.0 - Production on Wed Dec 14 05:04:51 2016 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
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** directory=dir_dp dumpfile=scott_all_tab.dmp
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "SCOTT"."S1_BASE" 5.914 KB 3 rows
. . imported "SCOTT"."SALGRADE" 5.859 KB 5 rows
. . imported "SCOTT"."BONUS" 0 KB 0 rows
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Wed Dec 14 05:04:55 2016 elapsed 0 00:00:03
④05:05:18 SCOTT@ORA11GR2>select tname from tab; TNAME
------------------------------
BONUS
S1_BASE
SALGRADE
【练习】数据移动---导入(IMPDP)的更多相关文章
- 使用数据泵导入(impdp)和导出(expdp)
数据泵技术是Oracle Database 10g 中的新技术,它比原来导入/导出(imp,exp)技术快15-45倍.速度的提高源于使用了并行技术来读写导出转储文件. expdp使用 使用EXPDP ...
- PLSQL_数据泵导入导出数据Impdp/ Expdp(概念)
2014-08-31 Created By BaoXinjian
- Oracle使用——数据泵导入导出数据库——impdp/expdp使用
使用前提 EXPDP和IMPDP只可以在Oracle服务端使用. EXP导出的文件只可以使用IMP导入,不适用于IMPDP导入文件:EXPDP导出的文件只可以使用IMPDP导入,而不适用于IMP导出文 ...
- linux下用数据泵导入导出(impdp、expdp)
expdp和impdp expdp假设a用户的默认表空间是a,导出用户a所有数据: 如果是多实例 需要在命令行或终端手工指定实例 set ORACLE_SID=实例名 否则回报ORA-12560: T ...
- 针对数据泵导出 (expdp) 和导入 (impdp)工具性能降低问题的检查表 (文档 ID 1549185.1)
针对数据泵导出 (expdp) 和导入 (impdp)工具性能降低问题的检查表 (文档 ID 1549185.1) 文档内容 适用于: Oracle Database – Enterprise Edi ...
- oracle中使用impdp数据泵导入数据提示“ORA-31684:对象类型已经存在”错误的解决
转载请注明出处:http://blog.csdn.net/dongdong9223/article/details/47448751 本文出自[我是干勾鱼的博客] oracle中使用impdp数据泵导 ...
- Oracle逻辑导入数据(IMP/IMPDP)
使用IMPDP导入数据的前提是数据是使用EMPDP导出的,同样也是在DOS窗口下直接输入IMPDP和登录数据库的用户名,即可导人数据. impdp导到指定用户下: impdp student/1234 ...
- Oracle 数据泵(IMPDP/EXPDP)导入导出总结
Oracle数据泵导入导出是日常工作中常用的基本技术之一,它相对传统的逻辑导入导出要高效,这种特性更适合数据库对象数量巨大的情形,因为我日常运维的数据库对象少则几千,多则几万甚至几十万,所以传统exp ...
- 【EXPDP/IMPDP】ORACLE数据泵导入导出案例(expdp & impdp)
概要: 因项目需要,通常需要将生产库下的部分数据抽取并恢复到测试库上 本文主要介绍数据泵导入导出的几种情况以及错误处理 案例环境: rhel-server-6.5-x86_64 oracle 11.2 ...
- Oracle使用数据泵导入/导出数据(expdp/impdp)
Oracle使用数据泵导入/导出数据(expdp/impdp) A电脑上的操作(expdp数据导出) 运行cmd: 登录数据库,输入命令:sqlplus 使用管理员角色登录需要在用户名后加" ...
随机推荐
- Swift笔记
最近从Xcode6 beta4开始到现在的Xcode6.0.1,使用Swift一段时间了,Swift大体来说,语法与java.c++比较接近,相比objective-c要友好多了,也更容易上手,这里记 ...
- Lua 自定义函数string.split
function string.split(str, delimiter) if str==nil or str=='' or delimiter==nil then return ...
- create dll project based on the existing project
Today, I have to create a dll project(called my.sln), the dllmain.cpp/.h/ is already in another proj ...
- Digital root(数根)
关于digital root可以参考维基百科,这里给出基本定义和性质. 一.定义 数字根(Digital Root)就是把一个数的各位数字相加,再将所得数的各位数字相加,直到所得数为一位数字为止.而这 ...
- 【OpenGL】 第一篇 OpenGL概览
---------------------------------------------------------------------------------------------------- ...
- 【ZOJ1003】Crashing Balloon(DFS)
Crashing Balloon Time Limit: 2 Seconds Memory Limit: 65536 KB On every June 1st, the Children's ...
- WP8应用上传失败查错
开发的一个应用,好久没有更新. 最近做了些修改,在设备上安装测试,没什么 问题,上传到STORE,收到反馈说有两个操作必挂. 知道了直接设备安装测试和从STORE上下载,会有些不同. http://s ...
- 学C日志
学C历程 这里记录的都是笔记 忘记了好回头看看~ 提示 :如果在双击自己编译的程序运行时一下就消失不见了 可以在程序代码末尾加上 system("pause"); 程序就会等待到输 ...
- js 循环切换图片
function changeLot(){ var minIndex = 1; var maxIndex = 100; var curIndex = 10; var src = $("ul ...
- 关于flume配置加载(二)
为什么翻flume的代码,一方面是确实遇到了问题,另一方面是想翻一下flume的源码,看看有什么收获,现在收获还谈不上,因为要继续总结.不够已经够解决问题了,而且确实有好的代码,后续会继续慢慢分享,这 ...