ITPub博客

首页 > 数据库 > Oracle > expdp和impdp导出导入表空间

expdp和impdp导出导入表空间

原创 Oracle 作者:ywxj_001 时间:2017-12-25 01:58:06 0 删除 编辑
[oracle@hr1 opt]$ mkdir -p infor1

SQL> create directory scprd as '/opt/infor1';


Directory created.


SQL> grant read,write on directory scprd to system;


Grant succeeded.

[oracle@hr1 opt]$ expdp system/oracle@HR  dumpfile=tablespace_hr.dmp schemas=hr2  DIRECTORY=hr LOGFILE=hr2_exp.log

[oracle@hr1 opt]$ impdp system/oracle@HR  directory=hr dumpfile=tablespace_hr.dmp remap_schema=hr2:hr6, remap_tablespace=hr2_DATA:hr6_DATA  logfile=hr6_imp.log

用remap实现schema和tablespace的导入。

有时候import会报错:
Import: Release 11.2.0.3.0 - Production on Sat Dec 23 23:18:22 2017


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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation

重复执行几次就可以了。


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22996654/viewspace-2149190/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
在零售、金融、互联网行业从事数据库相关工作10余年,有丰富的数据库管理和架构的相关经验。 涉及SQLServer、Oracle、MySQL、PostgreSQL等多种数据库。 目前在一家互联网公司担任DBA经理。 负责整个集团数据库的架构设计和管理工作。

注册时间:2010-01-19

  • 博文量
    247
  • 访问量
    436203