EXPDP导出表数据,排除某张表

EXPDP导出表数据,排除某个表,遇到的问题
今天测试了这个命令,刚开始我是这样写的

$ expdp hed directory=backdir dumpfile=he201807041505.dmp exclude=h_hosps
Export: Release 11.2.0.4.0 - Production on 星期三 7月 4 15:07:07 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
口令: 

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39001: 参数值无效
ORA-39041: 过滤器 "EXCLUDE" 可标识所有对象类型, 也可不标识任何对象类型。

后来仔细看了下这个使用说明,才发现,必须要用使用IN再转义下才行如:
不导出H_HOSPS、MODULE两个表,表名必须要大写,需要使用转义符命令如下:
expdp hed directory=backdir dumpfile=he201807041522.dmp exclude=table:\"in\(\'H_HOSPS\',\'MODULE\'\)\"

猜你喜欢

转载自blog.51cto.com/meiling/2136177
今日推荐