Dav*_*idR 2 oracle datapump oracle-xe
概括:
我正在使用 expdp / impdp 从测试/演示数据库 (Oracle 11.2) 导出数据库,并将其导入到我自己机器上的 Oracle Express (11g) 实例中。
导入失败,因为它尝试在源服务器的位置创建导入的数据库文件。从字面上看,我的源 temo / test 数据库位于带有 E:\ 驱动器的机器上。但是我的电脑只有一个 C:\ 驱动器。我收到错误,因为它在 E:\ 驱动器上找不到东西。
这个错误感觉就像一条红鲱鱼。要么我误用了我的工具,要么我收到了一条稍微虚假的错误消息。
问题:
非常感谢。
完整说明
我在演示服务器上运行这个命令:
expdp name/password@localhost:1521/demo full=y directory=DATA_PUMP_DIR dumpfile=demo.dmp logfile=exportDemo.log
Run Code Online (Sandbox Code Playgroud)
我已将该文件复制到我的笔记本中,复制到 Oracle 中的相应文件夹 (C:\oraclex\app\oracle\admin\XE\dpdump)。然后我运行这个命令:
impdp SYSTEM/password@localhost:1521/XE directory=DATA_PUMP_DIR dumpfile=demo.dmp logfile=impdpDemo.log full=y
Run Code Online (Sandbox Code Playgroud)
该命令运行了一段时间,但出现错误:
;;;
Import: Release 11.2.0.2.0 - Production on Sat Jun 11 10:32:21 2016
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
;;;
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_FULL_01": SYSTEM/********@localhost:1521/XE directory=DATA_PUMP_DIR dumpfile=demo.dmp logfile=impdpDemo.log full=y
Processing object type DATABASE_EXPORT/TABLESPACE
ORA-31684: Object type TABLESPACE:"UNDOTBS1" already exists
ORA-31684: Object type TABLESPACE:"TEMP" already exists
ORA-31684: Object type TABLESPACE:"USERS" already exists
ORA-39083: Object type TABLESPACE failed to create with error:
ORA-01119: error in creating database file 'E:\ORACLE\PRODUCT\11.2.0\ORADATA\DEMO\MOBILE01.DBF'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
Run Code Online (Sandbox Code Playgroud)
这是日志的开始,但在整个导入过程中会发生此错误的变化,并最终失败。
REMAP_DATAFILE
选项(https://docs.oracle.com/database/121/SUTIL/GUID-7C9DDBED-91AC-4FA2-AB91-1FF214DA89B0.htm#SUTIL926)。或者,您可以在目标数据库上预先创建所有表空间。