`
fengzgxing
  • 浏览: 239696 次
  • 性别: Icon_minigender_1
  • 来自: 四川
社区版块
存档分类
最新评论

imp exp迁移用户数据,不知源用户名解决方法

阅读更多
原文转载于:http://blog.chinaunix.net/u/7121/showart_321915.html

将数据从一个用户导入到另一个用户所遇到的问题。

第一步:导入数据

[oracle@olivenan oracle]$ imp MASAMK/MASAMK   file=/opt/data/TB_GPIDF_GPPERSON_TREND_ANALY.dmp ignore=y rows=n;

Import: Release 9.2.0.4.0 - Production on Fri Jun 15 14:36:22 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.00.01 via conventional path
IMP-00013: only a DBA can import a file exported by another DBA
IMP-00000: Import terminated unsuccessfully

导入出错,原因是导出的用户不是MASAMK,而是其它用户。我们的解决方法是试图找到导出该数据的用户。

第二步:接下来使用fromuser,touser进行操作。

接下来使用fromuser,touser进行操作,由于不知fromuser应取何值,随便给个就行。
[oracle@olivenan oracle]$ imp system/oracle  fromuser=test touser=masamk file=/opt/data/TB_GPIDF_GPPERSON_TREND_ANALY.dmp ignore=y rows=n;

Import: Release 9.2.0.4.0 - Production on Fri Jun 15 14:19:19 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.00.01 via conventional path

Warning: the objects were exported by GPIDF, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
IMP-00034: Warning: FromUser "TEST" not found in export file
Import terminated successfully with warnings.

注意上面的红色字体,标识数据是从GPIDF用户导出。

第三步:接下来,可以将数据导入到system用户下,不建议这样做。

[oracle@olivenan oracle]$ imp system/oracle   file=/opt/data/TB_GPIDF_GPPERSON_TREND_ANALY.dmp ignore=y rows=n full=y;

Import: Release 9.2.0.4.0 - Production on Fri Jun 15 14:20:54 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.00.01 via conventional path

Warning: the objects were exported by GPIDF, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing GPIDF's objects into SYSTEM
Import terminated successfully without warnings.

第四步:导入表结构
[oracle@olivenan oracle]$ imp system/oracle  fromuser=gpidf touser=masamk file=/opt/data/TB_GPIDF_GPPERSON_TREND_ANALY.dmp ignore=y rows=n;

Import: Release 9.2.0.4.0 - Production on Fri Jun 15 14:22:35 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.00.01 via conventional path

Warning: the objects were exported by GPIDF, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing GPIDF's objects into MASAMK
Import terminated successfully without warnings.

第五步:导入数据
[oracle@olivenan oracle]$ imp system/oracle  fromuser=gpidf touser=masamk file=/opt
/data/TB_GPIDF_GPPERSON_TREND_ANALY.dmp ignore=y rows=y;

Import: Release 9.2.0.4.0 - Production on Fri Jun 15 14:22:44 2007

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.00.01 via conventional path

Warning: the objects were exported by GPIDF, not by you

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing GPIDF's objects into MASAMK
. . importing table "TB_GPIDF_GPPERSON_TREND_ANALY"       2362 rows imported
Import terminated successfully without warnings.
[oracle@olivenan oracle]$

分享到:
评论

相关推荐

    Oracle中利用EXP/IMP工具实现数据迁移

    通过EXP/IMP可以实现产品系统的跨平台的迁移,需要迁移的数据库已经部署了高级复制环境,打算进行一系列的测试,测试包含高级复制环境数据库在通过 EXP/IMP工具迁移...文中通过实例介绍了利用EXP/IMP工具实现数据迁移。

    Oracle数据导入导出impexp.txt

    Oracle数据导入导出impexp.txtOracle数据导入导出impexp.txtOracle数据导入导出impexp.txtOracle数据导入导出impexp.txtOracle数据导入导出impexp.txtOracle数据导入导出impexp.txtOracle数据导入导出impexp....

    imp exp字符集解决方案

    imp exp字符集解决方案imp exp字符集解决方案

    将excel文件用impexp32导入到oracle中.zip_ImpExp32_oracle_sql_txt

    先将excel文件另存为 txt 文件,用impexp32 导入到 oracle 中.zip

    EXP_IMP EXP_IMP

    EXP_IMPEXP_IMPEXP_IMPEXP_IMPEXP_IMPEXP_IMPEXP_IMP EXP_IMPEXP_IMPEXP_IMPEXP_IMPEXP_IMP EXP_IMPEXP_IMPEXP_IMP

    oracle imp exp 命令详解

    oracle imp exp 命令详解 oracle imp exp 命令详解 oracle imp exp 命令详解 oracle imp exp 命令详解 oracle imp exp 命令详解

    oracle11g的imp exp

    oracle11g的imp exp,oracle11g的imp exp,oracle11g的imp exp

    linux oracle imp exp 执行命令安装

    linux oracle 远程连接oracle服务器时,客服端机器需要安装imp exp命令才可以操作操作数据库导入/导出数据

    Oracle数据导入导出impexp命令

    Oracle数据导入导出impexp命令

    oracle中imp、exp命令详解

    功能:Oracle数据导入导出imp/exp就相当与oracle数据还原与备份。大多情况都可以用Oracle数据导入导出完成数据的备份和还原(不会造成数据的丢失)。  Oracle有个好处,虽然你的电脑不是服务器,但是你装了oracle...

    Imp和Exp命令详解

    Imp和Exp命令详解 Imp和Exp命令详解 Imp和Exp命令详解Imp和Exp命令详解 Imp和Exp命令详解

    oracle exp imp详解

    导入/导出是ORACLE幸存的最古老的两个命令行工具,其实我从来不认为Exp/Imp是一种好的备份方式,正确的说法是Exp/Imp只能是一个好的转储工具,特别是在小型数据库的转储,表空间的迁移,表的抽取,检测逻辑和物理...

    oracle 数据泵imp exp注意事项.docx

    oracle 数据泵imp exp步骤及注意事项 实际工作过程遇到的坑

    Oracle11G导入导出(imp和exp)少表解决方法.docx

    Oracle11G导入导出(imp和exp)少表解决方法.docx

    Oracle数据库逻辑增量备份之exp/imp

    Oracle数据库逻辑增量备份之exp/imp 1 一、实现需求 1 二、逻辑备份恢复工具exp/imp 2 1、逻辑备份原理 2 2、exp语法和参数 2 3、imp语法和参数 3 三、exp逻辑备份 4 1、exp表模式备份 4 2、exp用户模式备份 5 3、...

    oracle 11.2.0.4 imp exp sqlldr 工具及rdbms包

    很多同学安装完精简版的oracle11.2.0.4的客户端后,没有对应的exp、imp、sqlldr工具。此资源包可直接解压使用

    Oracle数据导入导出imp/exp命令 10g以上expdp/impdp命令

    "Oracle 数据导入导出 imp/exp 命令详解" Oracle 数据导入导出 imp/exp 命令是 Oracle 数据库管理系统的重要组件之一,用于实现数据的导入和导出。imp/exp 命令可以将数据从远程数据库服务器导出到本地的 dmp 文件...

    oracle数据库exp_imp命令详解[参考].pdf

    exp 命令用于将数据库中的数据导出到文件中,而 imp 命令用于将文件中的数据导入到数据库中。 Oracle 数据库备份方法 Oracle 数据库有两类备份方法:物理备份和逻辑备份。物理备份方法实现数据库的完整恢复,但...

    Oracle-ImpExp

    Oracle-dmp数据库文件导入导出工具 源码: http://code.google.com/p/oracle-impexp/downloads/list

    EXP IMP详解

    导入/导出是ORACLE幸存的最古老的两个命令行工具,其实我从来不认为Exp/Imp是一种好的备份方式,正确的说法是Exp/Imp只能是一个好的转储工具,特别是在小型数据库的转储,表空间的迁移,表的抽取,检测逻辑和物理...

Global site tag (gtag.js) - Google Analytics