当前位置:   article > 正文

ORACLE数据库中EXPDP/IMPDP参数INCLUDE/EXCLUDE的使用说明_expdp exclude

expdp exclude

1、参数作用

exclude:用于排除导入/导出某些对象

include:用于指定导入/导出某些对象

 

2、参数语法

exclude=[object_type]:[name_clause],[object_type]:[name_clause]

include=[object_type]:[name_clause],[object_type]:[name_clause]

 

object_type:对象类型,如:table、view、index、procedure、pakage、procobj、db_link等

name_clause:sql表达式,用于过滤对象,如:in ('TABLE_A','TABLE_B')、='TABLE_A'、like '%A'等,这些表达式需要放在双引号“ ”中

注意:若是在命令行中使用,WINDOWS系统中需要在双引号“ ”前加入转义字符:\\''  \\''

如:\\" in ('TABLE_A','TABLE_B') \\"  或者  \\" ='TABLE_A' \\"

 

3、参数使用举例

  1. 1)导入导出指定表TABLE_A和TABLE_B
  2. impdp userName/password directory=J_DATA dumpfile=fileName.DMP include=table:\"in('TABLE_A','TABLE_B')\";
  3. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  4. logfile=logfileName.LOG include=table:\"in('TABLE_A','TABLE_B')\";
  5. 2)导入导出数据时排除TABLE_A和TABLE_B
  6. impdp userName/password directory=J_DATA dumpfile=fileName.DMP
  7. exclude=table:\"in('TABLE_A','TABLE_B')\";
  8. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  9. logfile=logfileName.LOG exclude=table:\"in('TABLE_A','TABLE_B')\";
  10. 3)导入导出指定存储过程PROCEDURE_A和PROCEDURE_B
  11. impdp userName/password directory=J_DATA dumpfile=fileName.DMP
  12. include=procedure:\"in('PROCEDURE_A','PROCEDURE_B')\";
  13. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  14. logfile=logfileName.LOG include=procedure:\"in('PROCEDURE_A','PROCEDURE_B')\";
  15. 4)导入导出数据时排除PROCEDURE_A和PROCEDURE_B
  16. impdp userName/password directory=J_DATA dumpfile=fileName.DMP
  17. exclude=procedure:\"in('PROCEDURE_A','PROCEDURE_B')\";
  18. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  19. logfile=logfileName.LOG exclude=procedure:\"in('PROCEDURE_A','PROCEDURE_B')\";
  20. 5)导入导出指定定时任务JOB_A和JOB_B
  21. impdp userName/password directory=J_DATA dumpfile=fileName.DMP include=procobj:\"in('JOB_A','JOB_A')\";
  22. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  23. logfile=logfileName.LOG include=procobj:\"in('JOB_A','JOB_B')\";
  24. 6)导入导出时排除JOB_A和JOB_B
  25. impdp userName/password directory=J_DATA dumpfile=fileName.DMP
  26. exclude=procobj:\"in('JOB_A','JOB_B')\";
  27. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  28. logfile=logfileName.LOG exclude=procobj:\"in('JOB_A','JOB_B')\";
  29. 7)导入导出所有的表对象
  30. impdp userName/password directory=J_DATA dumpfile=fileName.DMP include=table;
  31. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  32. logfile=logfileName.LOG include=table;
  33. 8)导入导出时排除所有表对象
  34. impdp userName/password directory=J_DATA dumpfile=fileName.DMP exclude=table;
  35. expdp userName/password directory=J_DATA dumpfile=fileName.DMP
  36. logfile=logfileName.LOG exclude=table;
  37. 其他对象类型导入导出同理

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/203517
推荐阅读
相关标签
  

闽ICP备14008679号