博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
外部表的导入导出问题
阅读量:2446 次
发布时间:2019-05-10

本文共 3720 字,大约阅读时间需要 12 分钟。

今天尝试了一下用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
看来新特性还得用新特性提供的方法来做。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23718752/viewspace-762667/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23718752/viewspace-762667/

你可能感兴趣的文章
windows 10 修复_如何修复Windows的10大烦恼
查看>>
系统映像恢复 进不了系统_如何从Windows系统映像中恢复特定文件
查看>>
如何学习Photoshop的极客指南,第2部分:面板
查看>>
如何在iPhone上将实时照片转换为视频或GIF
查看>>
xbmc_从iPhone或iPod Touch控制XBMC
查看>>
编程爱好者网站_读书爱好者的最佳免费网站
查看>>
为什么运行微波会杀死Wi-Fi连接?
查看>>
matlab生成文本乱码_如何生成完全随机/乱码文本的段落
查看>>
siri捷径调用谷歌翻译_告诉它使用Google助理,以减少Siri的麻烦
查看>>
outlook转发邮件步骤_Microsoft Outlook中的快速步骤指南
查看>>
macos 托盘文件预览_如何在Ubuntu的文件管理器中快速预览文件(如macOS中的“ Quick Look”)...
查看>>
macos 快速启动启动台_无法获取macOS通知? 这是解决方法(无需重新启动)
查看>>
为什么您可能不应该将您的企业网站运出家门
查看>>
如何在Android上使用Amazon Underground免费获取大量应用内购买
查看>>
如何使用HDHomeRun在计算机,游戏机和其他设备上观看直播电视
查看>>
如何在没有智能手机的情况下使用Google Authenticator和其他两因素身份验证应用程序...
查看>>
如何显示密件抄送人员地址_什么是密件抄送,以及为什么不使用它会成为一个可怕的人...
查看>>
询问HTG:增强Wi-Fi连接性,校准显示器并执行基于计算机的恶作剧
查看>>
将code添加到上下文菜单_通过将选项卡添加到资源管理器,创建上下文菜单项等来轻松调整Windows 7和Vista...
查看>>
询问HTG:选择要备份的文件,将扫描仪用作复印机,并将iPad配置为第二台显示器...
查看>>