Bo's Oracle Station

查看: 1502|回复: 0

课程第5次

[复制链接]
匿名
匿名  发表于 2019-9-19 20:56:21 |阅读模式
  1. PS C:\Users\Apple> impdp  hr/oracle_4U  directory=dirwin  network_link= dblink1 remap_tablespace=tbs1:users   tablespaces=tbs1  flashback_time='20
  2. 19-08-31:23:17:23'

  3. Import: Release 11.2.0.4.0 - Production on 星期四 9月 19 20:54:35 2019

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

  5. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  6. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  7. ORA-39002: 操作无效
  8. ORA-39070: 无法打开日志文件。
  9. ORA-39087: 目录名 DIRWIN 无效


  10. PS C:\Users\Apple> sqlplus /nolog

  11. SQL*Plus: Release 11.2.0.4.0 Production on 星期四 9月 19 20:55:00 2019

  12. Copyright (c) 1982, 2013, Oracle.  All rights reserved.

  13. SQL> conn / as sysdba
  14. 已连接。
  15. SQL> grant read,write on directory dirwin to hr;

  16. 授权成功。

  17. SQL> exit
  18. 从 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  19. With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
  20. PS C:\Users\Apple> impdp  hr/oracle_4U  directory=dirwin  network_link= dblink1 remap_tablespace=tbs1:users   tablespaces=tbs1  flashback_time='20
  21. 19-08-31:23:17:23'

  22. Import: Release 11.2.0.4.0 - Production on 星期四 9月 19 20:55:21 2019

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

  24. 连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
  25. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  26. 启动 "HR"."SYS_IMPORT_TABLESPACE_01":  hr/******** directory=dirwin network_link= remap_tablespace=tbs1:users tablespaces=tbs1 flashback_time=2019-08-31:23:17:23
  27. 正在使用 BLOCKS 方法进行估计...
  28. 处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
  29. 使用 BLOCKS 方法的总估计: 128 KB
  30. 处理对象类型 TABLE_EXPORT/TABLE/TABLE
  31. . . 导入了 "HR"."T05217_HR1"                                1 行
  32. . . 导入了 "HR"."T05217_HR2"                                1 行
  33. 作业 "HR"."SYS_IMPORT_TABLESPACE_01" 已于 星期四 9月 19 20:55:39 2019 elapsed 0 00:00:15 成功完成

  34. PS C:\Users\Apple>
复制代码
datapump外部表“导出”:
  1. CREATE TABLE hr.ext_emp_query_results
  2. ORGANIZATION EXTERNAL
  3.   (
  4.     TYPE ORACLE_DATAPUMP
  5.     DEFAULT DIRECTORY dir1
  6.     LOCATION ('emp1.exp','emp2.exp','emp3.exp')
  7.   )
  8. PARALLEL 5
  9. AS
  10. SELECT e.first_name,e.last_name,d.department_name
  11. FROM   hr.employees e, hr.departments d
  12. WHERE  e.department_id = d.department_id AND
  13.        d.department_name in
  14.                      ('Marketing', 'Purchasing');
复制代码
datapump外部表“导入”:
  1. SQL> create table ext_emp_win (FIRST_NAME  varchar2(20),
  2.   2  LAST_NAME varchar2(25),
  3.   3  DEPARTMENT_NAME  varchar2(30))
  4.   4  organization external
  5.   5  ( type  ORACLE_DATAPUMP
  6.   6  DEFAULT DIRECTORY dirwin
  7.   7  LOCATION ('emp1.exp','emp2.exp','emp3.exp'))
  8.   8  parallel 6;

  9. 表已创建。

  10. SQL>
复制代码
-----
https://www.botangdb.com/forum.php?mod=viewthread&tid=923&highlight=main.cf



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-20 00:52 , Processed in 0.037128 second(s), 24 queries .

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