重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4517|回复: 0
打印 上一主题 下一主题

[Oracle] 进行导入导出时报错:ORA-39038

[复制链接]
跳转到指定楼层
楼主
发表于 2021-4-25 17:41:59 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在进行expdp导出数据时报错,模拟如下:
[oracle@test ~]$ expdp sys/oracle directory=dump_dir exclude=schema:\"in\(\'user1\',\'user2\',\'user3\'\)\" dumpfile=test.dmp
Export: Release 11.2.0.4.0 - 64bit Production on Tuesday, 20 April, 2021 13:39:06
Copyright (c) 2003, 2007, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: invalid argument value
ORA-39038: Object path "SCHEMA" is not supported for SCHEMA jobs.

这个错误有相关的文档说明(文档 ID 1362645.1)
ORA-39001: invalid argument value
ORA-39038: Object path "SCHEMA" is not supported for SCHEMA jobs.

CAUSE
The following DataPump export command line was used:

expdp system/passwd directory=test dumpfile=test.exp logfile=test.log EXCLUDE=SCHEMA:\"in \(\'TEST\', \'SCOTT\'\)\"

If you didn't specify what kind of export you want to run, then the default schema export is taken.
The export above runs a SCHEMA export for user SYSTEM and the parameter EXCLUDE=SCHEMA:"IN ('TEST', 'SCOTT') is not a valid.

SOLUTION
To be able to exclude number of SCHEMAs, the export type have to be FULL.
Add  "FULL=Y" to the command line and rerun the export again:

expdp system/passwd directory=test dumpfile=test.exp logfile=test.log EXCLUDE=SCHEMA:\"in \(\'TEST\', \'SCOTT\'\)\" FULL=Y

再次进行导出
[oracle@test ~]$ expdp sys/oracle directory=dump_dir exclude=schema:\"in\(\'user1\',\'user2\',\'user3\'\)\" dumpfile=test.dmp full=y
Export: Release 11.2.0.4.0 - 64bit Production on Tuesday, 20 April, 2021 14:10:02
Copyright (c) 2003, 2007, Oracle.  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
Starting "SYSTEM"."SYS_EXPORT_FULL_01":  sys/******** directory=dump_dir exclude=schema:"in('user1','user2','user3')" dumpfile=a.dmp full=y
Estimate in progress using BLOCKS method...
Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-30 00:21 , Processed in 0.100713 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表