expdp里的include和exclude?

oracle11.2.0.4版本下:

expdp里只能1个include参数(table:之后不能超过4000字节),或多个exclude参数,且include和excude不能同时存在。

EXPDP fails with UDE-00014: invalid value for parameter, ‘INCLUDE’ specifying a long list of tables (Doc ID 1587384.1)

高版本可自行测试哦

[oracle@lnkf ~]$ cat parfile 
INCLUDE=TABLE:"IN ('T','T1','T2')"
INCLUDE=TABLE:"IN ('J1','J2')"
[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile dumpfile=t.dmp logfile=t.log

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:07:58 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp parfile=parfile dumpfile=t.dmp logfile=t.log 
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39168: Object path TABLE was not found.
ORA-31655: no data or metadata objects selected for job
Job "JYC"."SYS_EXPORT_SCHEMA_01" completed with 2 error(s) at Tue Dec 19 12:08:07 2023 elapsed 0 00:00:06

[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile dumpfile=t.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:08:21 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp parfile=parfile dumpfile=t.dmp logfile=t.log schemas=jyc 
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39165: Schema JYC was not found.
ORA-39168: Object path TABLE was not found.
ORA-31655: no data or metadata objects selected for job
Job "JYC"."SYS_EXPORT_SCHEMA_01" completed with 3 error(s) at Tue Dec 19 12:08:25 2023 elapsed 0 00:00:03

[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp dumpfile=t.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:08:46 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp dumpfile=t.dmp logfile=t.log schemas=jyc 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 320 KB
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/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
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/VIEW/VIEW
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "JYC"."J1"                                  5.015 KB       1 rows
. . exported "JYC"."J2"                                  5.015 KB       1 rows
. . exported "JYC"."T"                                   5.015 KB       1 rows
. . exported "JYC"."T1"                                  5.015 KB       1 rows
. . exported "JYC"."T2"                                  5.015 KB       1 rows
Master table "JYC"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for JYC.SYS_EXPORT_SCHEMA_01 is:
  /oracle/dmp/t.dmp
Job "JYC"."SYS_EXPORT_SCHEMA_01" successfully completed at Tue Dec 19 12:09:09 2023 elapsed 0 00:00:22

[oracle@lnkf ~]$ cat parfile 
INCLUDE=TABLE:"IN ('T','T1','T2')"
INCLUDE=TABLE:"IN ('J1','J2')"
[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile dumpfile=t1.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:09:35 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp parfile=parfile dumpfile=t1.dmp logfile=t.log schemas=jyc 
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39165: Schema JYC was not found.
ORA-39168: Object path TABLE was not found.
ORA-31655: no data or metadata objects selected for job
Job "JYC"."SYS_EXPORT_SCHEMA_01" completed with 3 error(s) at Tue Dec 19 12:09:39 2023 elapsed 0 00:00:03

[oracle@lnkf ~]$ cp parfile parfile1
[oracle@lnkf ~]$ vi parfile
INCLUDE=TABLE:"IN ('T','T1','T2')"
~
~
"parfile" 1L, 35C written
[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile dumpfile=t1.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:10:04 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp parfile=parfile dumpfile=t1.dmp logfile=t.log schemas=jyc 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 192 KB
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "JYC"."T"                                   5.015 KB       1 rows
. . exported "JYC"."T1"                                  5.015 KB       1 rows
. . exported "JYC"."T2"                                  5.015 KB       1 rows
Master table "JYC"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for JYC.SYS_EXPORT_SCHEMA_01 is:
  /oracle/dmp/t1.dmp
Job "JYC"."SYS_EXPORT_SCHEMA_01" successfully completed at Tue Dec 19 12:10:11 2023 elapsed 0 00:00:05

[oracle@lnkf ~]$ vi parfile1
EXCLUDE=TABLE:"IN ('T','T1')"
INCLUDE=TABLE:"IN ('J1','J2')"

~
"parfile1" 2L, 61C written                                                                                     
[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile1 dumpfile=t1.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:11:05 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/oracle/dmp/t1.dmp"
ORA-27038: created file already exists
Additional information: 1


[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile1 dumpfile=t2.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:11:12 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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
UDE-00011: parameter include is incompatible with parameter exclude

[oracle@lnkf ~]$ vi parfile1
EXCLUDE=TABLE:"IN ('T','T1')"
EXCLUDE=TABLE:"IN ('J1','J2')"
~

~
"parfile1" 2L, 61C written                                                                                     
[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile1 dumpfile=t2.dmp logfile=t.log schemas=jyc

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:11:54 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp parfile=parfile1 dumpfile=t2.dmp logfile=t.log schemas=jyc 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
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/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
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/VIEW/VIEW
. . exported "JYC"."T2"                                  5.015 KB       1 rows
Master table "JYC"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for JYC.SYS_EXPORT_SCHEMA_01 is:
  /oracle/dmp/t2.dmp
Job "JYC"."SYS_EXPORT_SCHEMA_01" successfully completed at Tue Dec 19 12:12:10 2023 elapsed 0 00:00:15

[oracle@lnkf ~]$ expdp jyc/jyc directory=oradmp parfile=parfile1 dumpfile=t3.dmp logfile=t.log

Export: Release 11.2.0.4.0 - Production on Tue Dec 19 12:12:58 2023

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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 "JYC"."SYS_EXPORT_SCHEMA_01":  jyc/******** directory=oradmp parfile=parfile1 dumpfile=t3.dmp logfile=t.log 
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
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/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
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/VIEW/VIEW
. . exported "JYC"."T2"                                  5.015 KB       1 rows
Master table "JYC"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for JYC.SYS_EXPORT_SCHEMA_01 is:
  /oracle/dmp/t3.dmp
Job "JYC"."SYS_EXPORT_SCHEMA_01" successfully completed at Tue Dec 19 12:13:14 2023 elapsed 0 00:00:15

[oracle@lnkf ~]$ cat parfile1
EXCLUDE=TABLE:"IN ('T','T1')"
EXCLUDE=TABLE:"IN ('J1','J2')"
[oracle@lnkf ~]$ cat parfile
INCLUDE=TABLE:"IN ('T','T1','T2')"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值