Bo's Oracle Station

查看: 1618|回复: 0

课程第4次

[复制链接]
匿名
匿名  发表于 2019-9-12 21:37:01 |阅读模式
  1. [oracle@station79 ~]$ expdp hr/oracle_4U  directory=dir1  dumpfile=t_bank_invoice.dmp  tables=t_bank_invoice version=11.2.0.4.0         

  2. Export: Release 11.2.0.4.0 - Production on Sat Aug 31 20:28:51 2019

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

  4. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  5. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  6. and Real Application Testing options
  7. Starting "HR"."SYS_EXPORT_TABLE_01":  hr/******** directory=dir1 dumpfile=t_bank_invoice.dmp tables=t_bank_invoice version=11.2.0.4.0
  8. Estimate in progress using BLOCKS method...
  9. Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
  10. Total estimation using BLOCKS method: 64 KB
  11. Processing object type TABLE_EXPORT/TABLE/TABLE
  12. . . exported "HR"."T_BANK_INVOICE"                       10.39 KB       6 rows
  13. Master table "HR"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
  14. ******************************************************************************
  15. Dump file set for HR.SYS_EXPORT_TABLE_01 is:
  16.   /home/oracle/dir1/t_bank_invoice.dmp
  17. Job "HR"."SYS_EXPORT_TABLE_01" successfully completed at Sat Aug 31 20:28:59 2019 elapsed 0 00:00:06

  18. [oracle@station79 ~]$ ls
  19. 9isqlldr.tgz             Desktop    Downloads       Pictures                 sqlldr       update2_t04209_uname.sql
  20. create_t04209_uname.sql  dir1       grid.rsp        Public                   Templates    update_t04209_uname.sql
  21. db.rsp                   dir2       Music           RMasmcmd.sh              tpasswd.ctl  Videos
  22. demo                     Documents  oradiag_oracle  select_t04209_uname.sql  tpasswd.sql
  23. [oracle@station79 ~]$ cd dir1
  24. [oracle@station79 dir1]$ ls
  25. empxt000_16116.log  empxt001_25736.log  export.log             EXT_TPASSWD_16116.log  t_bank_invoice.dmp
  26. empxt000_25734.log  empxt1.dat          EXT_TPASSWD_16116.bad  passwd.dat
  27. [oracle@station79 dir1]$
复制代码
datapump作业,定名字,做暂停,重新开始:
  1. [oracle@station79 ~]$ expdp \'sys/oracle_4U as sysdba\' directory=dir1  dumpfile=dir1:'full%U.dmp',dir2:'full%U.dmp'  parallel=4 filesize=20M   full=y  job_name=job_full

  2. Export: Release 11.2.0.4.0 - Production on Sat Aug 31 20:42:09 2019

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

  4. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  5. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  6. and Real Application Testing options
  7. Starting "SYS"."JOB_FULL":  "sys/******** AS SYSDBA" directory=dir1 dumpfile=dir1:full%U.dmp,dir2:full%U.dmp parallel=4 filesize=20M full=y job_name=job_full
  8. Estimate in progress using BLOCKS method...
  9. Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
  10. Total estimation using BLOCKS method: 1.677 GB
  11. . . exported "SH"."CUSTOMERS"                            9.853 MB   55500 rows
  12. . . exported "PM"."ONLINE_MEDIA"                         7.854 MB       9 rows
  13. . . exported "APEX_030200"."WWV_FLOW_PAGE_PLUGS"         5.205 MB    7416 rows
  14. . . exported "SH"."COSTS":"COSTS_Q1_1998"                139.5 KB    4411 rows
  15. . . exported "SH"."COSTS":"COSTS_Q1_1999"                183.5 KB    5884 rows
  16. . . exported "SH"."COSTS":"COSTS_Q1_2000"                120.6 KB    3772 rows
  17. . . exported "SH"."COSTS":"COSTS_Q1_2001"                227.8 KB    7328 rows
  18. . . exported "SH"."COSTS":"COSTS_Q2_1998"                79.52 KB    2397 rows
  19. . . exported "SH"."COSTS":"COSTS_Q2_1999"                132.5 KB    4179 rows
  20. . . exported "SH"."COSTS":"COSTS_Q2_2000"                119.0 KB    3715 rows
  21. . . exported "SH"."COSTS":"COSTS_Q2_2001"                184.5 KB    5882 rows
  22. . . exported "SH"."COSTS":"COSTS_Q3_1998"                131.1 KB    4129 rows
  23. . . exported "SH"."COSTS":"COSTS_Q3_1999"                137.3 KB    4336 rows
  24. . . exported "SH"."COSTS":"COSTS_Q3_2000"                151.4 KB    4798 rows
  25. . . exported "SH"."COSTS":"COSTS_Q3_2001"                234.4 KB    7545 rows
  26. . . exported "SH"."COSTS":"COSTS_Q4_1998"                144.7 KB    4577 rows
  27. . . exported "SH"."COSTS":"COSTS_Q4_1999"                159.0 KB    5060 rows
  28. Processing object type DATABASE_EXPORT/TABLESPACE
  29. . . exported "SH"."COSTS":"COSTS_Q4_2000"                160.2 KB    5088 rows
  30. . . exported "SH"."COSTS":"COSTS_Q4_2001"                278.4 KB    9011 rows
  31. Processing object type DATABASE_EXPORT/PROFILE
  32. Processing object type DATABASE_EXPORT/SYS_USER/USER
  33. Processing object type DATABASE_EXPORT/SCHEMA/USER
  34. . . exported "SH"."SALES":"SALES_Q1_1998"                1.412 MB   43687 rows
  35. Processing object type DATABASE_EXPORT/ROLE
  36. . . exported "SH"."SALES":"SALES_Q1_1999"                2.071 MB   64186 rows
  37. . . exported "SH"."SALES":"SALES_Q1_2000"                2.012 MB   62197 rows
  38. . . exported "SH"."SALES":"SALES_Q1_2001"                1.965 MB   60608 rows
  39. . . exported "SH"."SALES":"SALES_Q2_1998"                1.160 MB   35758 rows
  40. . . exported "SH"."SALES":"SALES_Q2_1999"                1.754 MB   54233 rows
  41. Processing object type DATABASE_EXPORT/GRANT/SYSTEM_GRANT/PROC_SYSTEM_GRANT
  42. Processing object type DATABASE_EXPORT/SCHEMA/GRANT/SYSTEM_GRANT
  43. . . exported "SH"."SALES":"SALES_Q2_2000"                1.802 MB   55515 rows
  44. . . exported "SH"."SALES":"SALES_Q2_2001"                2.051 MB   63292 rows
  45. ^C
  46. Export> help
  47. ------------------------------------------------------------------------------

  48. The following commands are valid while in interactive mode.
  49. Note: abbreviations are allowed.

  50. ADD_FILE
  51. Add dumpfile to dumpfile set.

  52. CONTINUE_CLIENT
  53. Return to logging mode. Job will be restarted if idle.

  54. EXIT_CLIENT
  55. Quit client session and leave job running.

  56. FILESIZE
  57. Default filesize (bytes) for subsequent ADD_FILE commands.

  58. HELP
  59. Summarize interactive commands.

  60. KILL_JOB
  61. Detach and delete job.

  62. PARALLEL
  63. Change the number of active workers for current job.

  64. REUSE_DUMPFILES
  65. Overwrite destination dump file if it exists [N].

  66. START_JOB
  67. Start or resume current job.
  68. Valid keyword values are: SKIP_CURRENT.

  69. STATUS
  70. Frequency (secs) job status is to be monitored where
  71. the default [0] will show new status when available.

  72. STOP_JOB
  73. Orderly shutdown of job execution and exits the client.
  74. Valid keyword values are: IMMEDIATE.


  75. Export> stop_job
  76. Are you sure you wish to stop this job ([yes]/no): yes

  77. [oracle@station79 ~]$ expdp \'sys/oracle_4U as sysdba\' attach=job_full                                                                  
  78. Export: Release 11.2.0.4.0 - Production on Sat Aug 31 20:43:19 2019

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

  80. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  81. With the Partitioning, Automatic Storage Management, OLAP, Data Mining
  82. and Real Application Testing options

  83. Job: JOB_FULL
  84.   Owner: SYS                           
  85.   Operation: EXPORT                        
  86.   Creator Privs: TRUE                           
  87.   GUID: 916A112E2A8E1409E0534F00A8C02185
  88.   Start Time: Saturday, 31 August, 2019 20:42:10
  89.   Mode: FULL                           
  90.   Instance: orcl
  91.   Max Parallelism: 4
  92.   EXPORT Job Parameters:
  93.   Parameter Name      Parameter Value:
  94.      CLIENT_COMMAND        "sys/******** AS SYSDBA" directory=dir1 dumpfile=dir1:full%U.dmp,dir2:full%U.dmp parallel=4 filesize=20M full=y job_name=job_full
  95.   State: STOP PENDING                  
  96.   Bytes Processed: 1,155,383,896
  97.   Percent Done: 97
  98.   Current Parallelism: 4
  99.   Job Error Count: 0
  100.   Dump File: /home/oracle/dir1/full%u.dmp
  101.     size: 20,971,520
  102.   Dump File: /home/oracle/dir1/full01.dmp
  103.     size: 20,971,520
  104.     bytes written: 20,971,520
  105.   Dump File: /home/oracle/dir2/full%u.dmp
  106.     size: 20,971,520
  107.   Dump File: /home/oracle/dir2/full01.dmp
  108.     size: 20,971,520
  109.     bytes written: 20,971,520
  110.   Dump File: /home/oracle/dir1/full02.dmp
  111.     size: 20,971,520
  112.     bytes written: 20,971,520
  113.   Dump File: /home/oracle/dir2/full02.dmp
  114.     size: 20,971,520
  115.     bytes written: 20,971,520
  116.   Dump File: /home/oracle/dir1/full03.dmp
  117.     size: 20,971,520
  118.     bytes written: 20,971,520
  119.   Dump File: /home/oracle/dir2/full03.dmp
  120.     size: 20,971,520
  121.     bytes written: 20,971,520
  122.   Dump File: /home/oracle/dir1/full04.dmp
  123.     size: 20,971,520
  124.     bytes written: 20,971,520
  125.   Dump File: /home/oracle/dir2/full04.dmp
  126.     size: 20,971,520
  127.     bytes written: 20,971,520
  128.   Dump File: /home/oracle/dir1/full05.dmp
  129.     size: 20,971,520
  130.     bytes written: 20,971,520
  131.   Dump File: /home/oracle/dir2/full05.dmp
  132.     size: 20,971,520
  133.     bytes written: 20,971,520
  134.   Dump File: /home/oracle/dir1/full06.dmp
  135.     size: 20,971,520
  136.     bytes written: 20,971,520
  137.   Dump File: /home/oracle/dir2/full06.dmp
  138.     size: 20,971,520
  139.     bytes written: 20,971,520
  140.   Dump File: /home/oracle/dir1/full07.dmp
  141.     size: 20,971,520
  142.     bytes written: 20,971,520
  143.   Dump File: /home/oracle/dir2/full07.dmp
  144.     size: 20,971,520
  145.     bytes written: 20,971,520
  146.   Dump File: /home/oracle/dir1/full08.dmp
  147.     size: 20,971,520
  148.     bytes written: 20,971,520
  149.   Dump File: /home/oracle/dir2/full08.dmp
  150.     size: 20,971,520
  151.     bytes written: 20,971,520
  152.   Dump File: /home/oracle/dir1/full09.dmp
  153.     size: 20,971,520
  154.     bytes written: 20,971,520
  155.   Dump File: /home/oracle/dir2/full09.dmp
  156.     size: 20,971,520
  157.     bytes written: 20,971,520
  158.   Dump File: /home/oracle/dir1/full10.dmp
  159.     size: 20,971,520
  160.     bytes written: 20,971,520
  161.   Dump File: /home/oracle/dir2/full10.dmp
  162.     size: 20,971,520
  163.     bytes written: 20,971,520
  164.   Dump File: /home/oracle/dir1/full11.dmp
  165.     size: 20,971,520
  166.     bytes written: 20,971,520
  167.   Dump File: /home/oracle/dir2/full11.dmp
  168.     size: 20,971,520
  169.     bytes written: 20,971,520
  170.   Dump File: /home/oracle/dir1/full12.dmp
  171.     size: 20,971,520
  172.     bytes written: 4,096
  173.   Dump File: /home/oracle/dir2/full12.dmp
  174.     size: 20,971,520
  175.     bytes written: 20,971,520
  176.   Dump File: /home/oracle/dir1/full13.dmp
  177.     size: 20,971,520
  178.     bytes written: 20,971,520
  179.   Dump File: /home/oracle/dir2/full13.dmp
  180.     size: 20,971,520
  181.     bytes written: 20,971,520
  182.   Dump File: /home/oracle/dir1/full14.dmp
  183.     size: 20,971,520
  184.     bytes written: 20,971,520
  185.   Dump File: /home/oracle/dir2/full14.dmp
  186.     size: 20,971,520
  187.     bytes written: 20,971,520
  188.   Dump File: /home/oracle/dir1/full15.dmp
  189.     size: 20,971,520
  190.     bytes written: 20,971,520
  191.   Dump File: /home/oracle/dir2/full15.dmp
  192.     size: 20,971,520
  193.     bytes written: 20,971,520
  194.   Dump File: /home/oracle/dir1/full16.dmp
  195.     size: 20,971,520
  196.     bytes written: 20,971,520
  197.   Dump File: /home/oracle/dir2/full16.dmp
  198.     size: 20,971,520
  199.     bytes written: 20,971,520
  200.   Dump File: /home/oracle/dir1/full17.dmp
  201.     size: 20,971,520
  202.     bytes written: 20,971,520
  203.   Dump File: /home/oracle/dir2/full17.dmp
  204.     size: 20,971,520
  205.     bytes written: 20,971,520
  206.   Dump File: /home/oracle/dir1/full18.dmp
  207.     size: 20,971,520
  208.     bytes written: 20,971,520
  209.   Dump File: /home/oracle/dir2/full18.dmp
  210.     size: 20,971,520
  211.     bytes written: 20,971,520
  212.   Dump File: /home/oracle/dir1/full19.dmp
  213.     size: 20,971,520
  214.     bytes written: 20,971,520
  215.   Dump File: /home/oracle/dir2/full19.dmp
  216.     size: 20,971,520
  217.     bytes written: 20,971,520
  218.   Dump File: /home/oracle/dir1/full20.dmp
  219.     size: 20,971,520
  220.     bytes written: 20,971,520
  221.   Dump File: /home/oracle/dir2/full20.dmp
  222.     size: 20,971,520
  223.     bytes written: 20,971,520
  224.   Dump File: /home/oracle/dir1/full21.dmp
  225.     size: 20,971,520
  226.     bytes written: 20,971,520
  227.   Dump File: /home/oracle/dir2/full21.dmp
  228.     size: 20,971,520
  229.     bytes written: 20,971,520
  230.   Dump File: /home/oracle/dir1/full22.dmp
  231.     size: 20,971,520
  232.     bytes written: 20,971,520
  233.   Dump File: /home/oracle/dir2/full22.dmp
  234.     size: 20,971,520
  235.     bytes written: 20,971,520
  236.   Dump File: /home/oracle/dir1/full23.dmp
  237.     size: 20,971,520
  238.     bytes written: 20,971,520
  239.   Dump File: /home/oracle/dir2/full23.dmp
  240.     size: 20,971,520
  241.     bytes written: 20,971,520
  242.   Dump File: /home/oracle/dir1/full24.dmp
  243.     size: 20,971,520
  244.     bytes written: 20,971,520
  245.   Dump File: /home/oracle/dir2/full24.dmp
  246.     size: 20,971,520
  247.     bytes written: 20,971,520
  248.   Dump File: /home/oracle/dir1/full25.dmp
  249.     size: 20,971,520
  250.     bytes written: 20,971,520
  251.   Dump File: /home/oracle/dir2/full25.dmp
  252.     size: 20,971,520
  253.     bytes written: 20,971,520
  254.   Dump File: /home/oracle/dir1/full26.dmp
  255.     size: 20,971,520
  256.     bytes written: 20,971,520
  257.   Dump File: /home/oracle/dir2/full26.dmp
  258.     size: 20,971,520
  259.     bytes written: 20,971,520
  260.   Dump File: /home/oracle/dir1/full27.dmp
  261.     size: 20,971,520
  262.     bytes written: 20,971,520
  263.   Dump File: /home/oracle/dir2/full27.dmp
  264.     size: 20,971,520
  265.     bytes written: 20,971,520
  266.   Dump File: /home/oracle/dir1/full28.dmp
  267.     size: 20,971,520
  268.     bytes written: 20,971,520
  269.   Dump File: /home/oracle/dir2/full28.dmp
  270.     size: 20,971,520
  271.     bytes written: 8,306,688
  272.   Dump File: /home/oracle/dir1/full29.dmp
  273.     size: 20,971,520
  274.     bytes written: 14,995,456
  275.   
  276. Worker 1 Status:
  277.   Process Name: DW00
  278.   State: WORK WAITING                  
  279.   
  280. Worker 2 Status:
  281.   Process Name: DW01
  282.   State: WORK WAITING                  
  283.   
  284. Worker 3 Status:
  285.   Process Name: DW02
  286.   State: WORK WAITING                  
  287.   
  288. Worker 4 Status:
  289.   Process Name: DW03
  290.   State: WORK WAITING                  
  291.   
  292. Worker 5 Status:
  293.   Process Name: DW04
  294.   State: WORK WAITING                  
  295.   
  296. Worker 6 Status:
  297.   Process Name: DW05
  298.   State: WORK WAITING                  
  299.   
  300. Worker 7 Status:
  301.   Process Name: DW00
  302.   State: WORK WAITING                  

  303. Export>
复制代码
  1. expdp hr/oracle_4U directory=dir1 dumpfile=my.dmp  schemas=hr job_name=my_job  exclude=table:"in \(\'T_BANK_INVOICE\'\)", procedure:" in \(\'SECURE_DML\'\)"  "query='employees:where department_id=90'"
复制代码
  1. directory=dir1
  2. dumpfile=my2.dmp  
  3. schemas=hr
  4. job_name=my2_job  
  5. exclude=table:"in ('T_BANK_INVOICE')", procedure:"in ('SECURE_DML')"  
  6. query='employees:where department_id=90'
复制代码
-------补充,查表空间:
  1. select  * from dba_objects o where o.owner='HR';


  2. select  distinct s.tablespace_name from dba_segments  s where s.owner='HR';
复制代码




回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-20 01:16 , Processed in 0.037187 second(s), 24 queries .

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