外部表的导入导出问题 (41天)
时间:2022-05-04
本文章向大家介绍外部表的导入导出问题 (41天),主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
今天尝试了一下用exp导出外部表,碰到了一些问题。
----导出
今天导出的时候发现一个严重的问题,导出一个很小的外部表花了很长时间,最后还是报错,而且生成的dump文件有好几个G
[oracle@oel1 ~]$ exp hr/hr file=hr.dmp log=hr.log
Export: Release 10.2.0.1.0 - Production on Fri May 31 21:23:49 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user HR
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user HR
About to export HR's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export HR's tables via Conventional Path ...
. . exporting table ALERT_LOG
Last login: Fri May 31 21:20:56 2013 from 192.168.3.1
[oracle@oel1 ~]$ ll
-rw-r--r-- 1 oracle dba 2551078912 May 31 21:26 hr.dmp
-rw-r--r-- 1 oracle dba 0 May 31 21:23 hr.log
想了一下数据泵需要用到directory,尝试使用expdp导出。这次成功了。
[oracle@oel1 ~]$ export ORACLE_SID=PROD
[oracle@oel1 ~]$ expdp hr/hr dumpfile=hr_dp.dmp DIRECTORY=alert_dir tables=alert_log
Export: Release 10.2.0.1.0 - Production on Friday, 31 May, 2013 21:31:16
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Starting "HR"."SYS_EXPORT_TABLE_01": hr/******** dumpfile=hr_dp.dmp DIRECTORY=alert_dir tables=alert_log
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 0 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for HR.SYS_EXPORT_TABLE_01 is:
/u01/app/oracle/admin/PROD/bdump/hr_dp.dmp
Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at 21:31:37
--导入
导入的时候,导入另外一个用户
[oracle@oel1 ~]$ impdp jeanron/jeanron dumpfile=hr_dp.dmp DIRECTORY=alert_dir tables=alert_log
Import: Release 10.2.0.1.0 - Production on Friday, 31 May, 2013 21:39:27
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name ALERT_DIR is invalid
导入的时候提示找不到diretory,我查了下,没输错啊。
最后给directory赋予了read,write权限给目标用户
SQL> grant read,write on directory alert_dir to jeanron;
Grant succeeded.
SQL> exit
[oracle@oel1 ~]$ impdp jeanron/jeanron dumpfile=hr_dp.dmp DIRECTORY=alert_dir tables=alert_log
Import: Release 10.2.0.1.0 - Production on Friday, 31 May, 2013 21:40:04
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
ORA-31655: no data or metadata objects selected for job
ORA-39154: Objects from foreign schemas have been removed from import
Master table "JEANRON"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "JEANRON"."SYS_IMPORT_TABLE_01": jeanron/******** dumpfile=hr_dp.dmp DIRECTORY=alert_dir tables=alert_log
Job "JEANRON"."SYS_IMPORT_TABLE_01" successfully completed at 21:40:07
看来新特性还得用新特性提供的方法来做。
- MySQL基础入门系列之——字符与日期数据处理
- P2038 无线网络发射器选址
- ggplot2双坐标轴的解决方案
- Modifying namespace in XML document programmatically
- ggplot2学习笔记——图例系统及其调整函数
- 一款脑洞大开的表格可视化神器
- P3908 异或之和
- P1939 【模板】矩阵加速(数列)
- R语言学习笔记之——数据处理神器data.table
- P3389 【模板】高斯消元法
- hihoCoder #1195 : 高斯消元·一
- Python黑帽编程1.3 Python运行时与包管理工具
- P2421 A-B数对(增强版)
- P1824 进击的奶牛
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 学生党学编程,有这个开源项目就够了!
- 【最强ResNet改进系列】Res2Net:一种新的多尺度网络结构,性能提升显著
- Java中的锁以及sychronized实现机制(十)
- Web 指纹识别之路
- RedisTemplate常用集合使用说明-opsForHash(四)
- Mybatis高级查询(二):多表联合查询
- Maven配置多仓库无效?来看看这篇文章
- Spring Boot启动slf4j提示找不到weblogic.xml日志异常
- Angular 应用的DevDependencies
- 轻量级服务网格 - osm
- 漫画:设计模式之 “外观模式”
- 使用 Zotero 在 Markdown 中优雅处理参考文献
- Mybatis plus自动生成业务代码
- 功能强大的CD工具 - flagger
- Swift defer