- PS C:\Users\Apple> impdp hr/oracle_4U directory=dirwin network_link= dblink1 remap_tablespace=tbs1:users tablespaces=tbs1 flashback_time='20
- 19-08-31:23:17:23'
- Import: Release 11.2.0.4.0 - Production on 星期四 9月 19 20:54:35 2019
- 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-39002: 操作无效
- ORA-39070: 无法打开日志文件。
- ORA-39087: 目录名 DIRWIN 无效
- PS C:\Users\Apple> sqlplus /nolog
- SQL*Plus: Release 11.2.0.4.0 Production on 星期四 9月 19 20:55:00 2019
- Copyright (c) 1982, 2013, Oracle. All rights reserved.
- SQL> conn / as sysdba
- 已连接。
- SQL> grant read,write on directory dirwin to hr;
- 授权成功。
- SQL> exit
- 从 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
- PS C:\Users\Apple> impdp hr/oracle_4U directory=dirwin network_link= dblink1 remap_tablespace=tbs1:users tablespaces=tbs1 flashback_time='20
- 19-08-31:23:17:23'
- Import: Release 11.2.0.4.0 - Production on 星期四 9月 19 20:55:21 2019
- 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
- 启动 "HR"."SYS_IMPORT_TABLESPACE_01": hr/******** directory=dirwin network_link= remap_tablespace=tbs1:users tablespaces=tbs1 flashback_time=2019-08-31:23:17:23
- 正在使用 BLOCKS 方法进行估计...
- 处理对象类型 TABLE_EXPORT/TABLE/TABLE_DATA
- 使用 BLOCKS 方法的总估计: 128 KB
- 处理对象类型 TABLE_EXPORT/TABLE/TABLE
- . . 导入了 "HR"."T05217_HR1" 1 行
- . . 导入了 "HR"."T05217_HR2" 1 行
- 作业 "HR"."SYS_IMPORT_TABLESPACE_01" 已于 星期四 9月 19 20:55:39 2019 elapsed 0 00:00:15 成功完成
- PS C:\Users\Apple>
复制代码 datapump外部表“导出”:
- CREATE TABLE hr.ext_emp_query_results
- ORGANIZATION EXTERNAL
- (
- TYPE ORACLE_DATAPUMP
- DEFAULT DIRECTORY dir1
- LOCATION ('emp1.exp','emp2.exp','emp3.exp')
- )
- PARALLEL 5
- AS
- SELECT e.first_name,e.last_name,d.department_name
- FROM hr.employees e, hr.departments d
- WHERE e.department_id = d.department_id AND
- d.department_name in
- ('Marketing', 'Purchasing');
复制代码 datapump外部表“导入”:
- SQL> create table ext_emp_win (FIRST_NAME varchar2(20),
- 2 LAST_NAME varchar2(25),
- 3 DEPARTMENT_NAME varchar2(30))
- 4 organization external
- 5 ( type ORACLE_DATAPUMP
- 6 DEFAULT DIRECTORY dirwin
- 7 LOCATION ('emp1.exp','emp2.exp','emp3.exp'))
- 8 parallel 6;
- 表已创建。
- SQL>
复制代码 -----
https://www.botangdb.com/forum.php?mod=viewthread&tid=923&highlight=main.cf
|