ITPub博客

首页 > 数据库 > Oracle > ORA-39038

ORA-39038

原创 Oracle 作者:goolen 时间:2014-09-18 16:28:18 0 删除 编辑
今天一朋友说expdp导出数据报错,模拟如下:
[oracle@goolen ~]$ expdp system/oracle directory=dump_dir exclude=schema:\"in\(\'user1\',\'user2\',\'user3\'\)\" dumpfile=a.dmp 
Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 18 September, 2014 13:39:06
Copyright (c) 2003, 2007, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.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@goolen ~]$ expdp system/oracle directory=dump_dir exclude=schema:\"in\(\'user1\',\'user2\',\'user3\'\)\" dumpfile=a.dmp full=y
Export: Release 10.2.0.4.0 - 64bit Production on Friday, 19 September, 2014 10:28:53
Copyright (c) 2003, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_FULL_01":  system/******** 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



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

请登录后发表评论 登录
全部评论

注册时间:2011-10-20

  • 博文量
    121
  • 访问量
    731656