问题描述
在客户系统中,由于空间问题,想要将expdp的逻辑导出文件存储到ASM磁盘组中。
经过测试,expdp导出文件完全可以放在ASM磁盘组中,但是日志文件需要放在文件系统上。
首先建立磁盘组中的Directory:
SQL> create or replace directory obak as '+ORADATA/obak'; Directory created.复制
手工创建目录:
[oracle@oracle ~]$ export ORACLE_SID=+ASM1 [oracle@oracle ~]$ asmcmd ASMCMD> ls ORADATA/ RECOVER/ ASMCMD> cd ORADATA ASMCMD> ls ORADB/ ASMCMD> mkdir obak ASMCMD> ls ORADB/ obak/ ASMCMD> exit复制
如果直接执行导出,会出现错误:
[oracle@oracledb3 ~]$ expdp eygle/eygle DUMPFILE=eygle.dmp DIRECTORY=OBAK CONTENT=METADATA_ONLY Export: Release 10.2.0.5.0 - 64bit Production on Friday, 06 May, 2011 10:49:48 Copyright (c) 2003, 2007, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, Data Mining and Real Application Testing options ORA-39002: invalid operation ORA-39070: Unable to open the log file. ORA-29283: invalid file operation ORA-06512: at "SYS.UTL_FILE", line 536 ORA-29283: invalid file operation复制
专家解答
此时需要找到一个文件系统的路径:
SQL> select directory_name, directory_path from dba_directories; DIRECTORY_NAME ------------------------------ DIRECTORY_PATH --------------------------------------------------------------------------------------------------- DATA_PUMP_DIR /opt/app/oracle/product/10.2.0/db_1/rdbms/log/ OBAK +ORADATA/obak复制
现在为LOGFILE指定独立的路径,即可导出成功:
[oracle@oracle ~]$ expdp eygle/eygleDUMPFILE=eygle.dmp DIRECTORY=OBAK CONTENT=METADATA_ONLY logfile=DATA_PUMP_DIR:expdp01.log Export: Release 10.2.0.5.0 - 64bit Production on Friday, 06 May, 2011 10:53:11 Copyright (c) 2003, 2007, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Real Application Clusters, Data Mining and Real Application Testing options FLASHBACK automatically enabled to preserve database integrity. Starting "EYGLE"."SYS_EXPORT_SCHEMA_01": eygle/******** DUMPFILE=eygle.dmp DIRECTORY=OBAK CONTENT=METADATA_ONLY logfile=DATA_PUMP_DIR:expdp01.log Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/DB_LINK Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/FUNCTION/FUNCTION Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE Processing object type SCHEMA_EXPORT/VIEW/VIEW Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Processing object type SCHEMA_EXPORT/JOB Master table "EYGLE"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ****************************************************************************** Dump file set for EYGLE.SYS_EXPORT_SCHEMA_01 is: +ORADATA/obak/eygle.dmp Job "EYGLE"."SYS_EXPORT_SCHEMA_01" successfully completed at 10:53:40复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
679次阅读
2025-04-18 14:18:38
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
634次阅读
2025-04-15 17:24:06
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
542次阅读
2025-04-20 10:07:02
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
491次阅读
2025-04-17 17:02:24
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
488次阅读
2025-04-22 00:20:37
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
470次阅读
2025-04-22 00:13:51
一页概览:Oracle GoldenGate
甲骨文云技术
467次阅读
2025-04-30 12:17:56
火焰图--分析复杂SQL执行计划的利器
听见风的声音
415次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
372次阅读
2025-04-15 14:48:05
OR+DBLINK的关联SQL优化思路
布衣
352次阅读
2025-05-05 19:28:36