结论: 只要命令敲对,文件名写正确,impdp操作不受影响
一、模拟开始
scott用户下的表
点击(此处)折叠或打开
-
SQL> conn scott/tiger
Connected.
SQL>
SQL> select count(*) from tab;
COUNT(*)
----------
4
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
点击(此处)折叠或打开
-
SQL> conn / as sysdba
Connected.
SQL>
SQL>
SQL> create user liuyaya identified by oracle account unlock;
User created.
SQL> SQL>
SQL>
SQL>
SQL> grant connect,resource to liuyaya;
Grant succeeded.
SQL>
SQL> conn liuyaya/oracle
Connected.
SQL> select count(1) from tab;
COUNT(1)
----------
0
点击(此处)折叠或打开
-
SQL> conn sys/oracle as sysdba
Connected.
SQL> create or replace directory expdp_dir_scott01 as '/soft';
Directory created.
SQL> grant read,write on directory expdp_dir_scott01 to scott;
Grant succeeded.
SQL> exit
点击(此处)折叠或打开
-
[oracle@redhat6 ~]$ expdp scott/tiger directory=expdp_dir_scott01 schemas=scott datafile=scott01.dmp logfile=scott01.log parallel=2;
LRM-00101: unknown parameter name 'datafile'
[oracle@redhat6 ~]$ expdp scott/tiger directory=expdp_dir_scott01 schemas=scott dumpfile=scott01.dmp logfile=scott01.log parallel=2;
Export: Release 11.2.0.4.0 - Production on Thu Jun 21 19:15:52 2018
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 "SCOTT"."SYS_EXPORT_SCHEMA_01": scott/******** directory=expdp_dir_scott01 schemas=scott dumpfile=scott01.dmp logfile=scott01.log parallel=2
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 192 KB
. . exported "SCOTT"."DEPT" 5.929 KB 4 rows
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
. . exported "SCOTT"."EMP" 8.562 KB 14 rows
. . exported "SCOTT"."SALGRADE" 5.859 KB 5 rows
. . exported "SCOTT"."BONUS" 0 KB 0 rows
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/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Master table "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SCOTT.SYS_EXPORT_SCHEMA_01 is:
/soft/scott01.dmp
Job "SCOTT"."SYS_EXPORT_SCHEMA_01" successfully completed at Thu Jun 21 19:16:13 2018 elapsed 0 00:00:20
点击(此处)折叠或打开
-
[oracle@redhat6 ~]$ cd /soft
[oracle@redhat6 soft]$ ls
database scott01.dmp scott01.log zjgd_back
[oracle@redhat6 soft]$ mv scott01.dmp liuyaya.dmp
[oracle@redhat6 soft]$ ls
database liuyaya.dmp scott01.log zjgd_back
导入到新建用户liuyaya
点击(此处)折叠或打开
-
[oracle@redhat6 soft]$ impdp \'/ as sysdba\' directory=expdp_dir_scott01 dumpfile=liuyaya.dmp remap_schema=scott:liuyaya logfile=liuyaya.log parallel=2
Import: Release 11.2.0.4.0 - Production on Thu Jun 21 20:18:01 2018
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
Master table "SYS"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYS"."SYS_IMPORT_FULL_01": "/******** AS SYSDBA" directory=expdp_dir_scott01 dumpfile=liuyaya.dmp remap_schema=scott:liuyaya logfile=liuyaya.log parallel=2
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "LIUYAYA"."DEPT" 5.929 KB 4 rows
. . imported "LIUYAYA"."EMP" 8.562 KB 14 rows
. . imported "LIUYAYA"."SALGRADE" 5.859 KB 5 rows
. . imported "LIUYAYA"."BONUS" 0 KB 0 rows
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/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYS"."SYS_IMPORT_FULL_01" successfully completed at Thu Jun 21 20:18:05 2018 elapsed 0 00:00:02
[oracle@redhat6 soft]$ sqlplus liuyaya/oracle
SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 21 20:18:18 2018
Copyright (c) 1982, 2013, Oracle. 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
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
二、 总结
将改了名字的dmp文件顺利导入到其他schema下,证明
数据库导出文件可以改名字,对导入操作无影响
编辑推荐:
下一篇:
相关推荐
-
雷神推出 MIX PRO II 迷你主机:基于 Ultra 200H,玻璃上盖 + ARGB 灯效
2 月 9 日消息,雷神 (THUNDEROBOT) 现已宣布推出基于英
-
制造商 Musnap 推出彩色墨水屏电纸书 Ocean C:支持手写笔、第三方安卓应用
2 月 10 日消息,制造商 Musnap 现已在海外推出一款 Oce
热文推荐
- APEX 动态操作案例学习
APEX 动态操作案例学习
26-03-03 - PostgreSQL通过mysql_fdw连通MySQL实战
PostgreSQL通过mysql_fdw连通MySQL实战
26-03-03 - Ubiquiti 推出 Wi-Fi 7 接入点 Unifi U7 Mesh:BE5000,兼容室内外环境
- Redis数据存储原理和结构解读
Redis数据存储原理和结构解读
26-03-03 - MySQL主从复制过滤配置的完整方案
MySQL主从复制过滤配置的完整方案
26-03-03 - Mysql严格模式小结
Mysql严格模式小结
26-03-03 - Oracle数据泵导入导出数据的实现
Oracle数据泵导入导出数据的实现
26-03-03 - 英特尔酷睿 Ultra 9 290HX Plus 处理器再曝:GeekBench 多核比 285HX 高 8%
- 《魔兽世界:至暗之夜》DLC 上线,微星发布联名限量 RTX 5070 显卡
- MONTECH 君主推出 BETA 2 系列 ATX 3.1 直出线铜牌电源
