imp

分为以下几个测试场景

imp name1/password1 file=xxxx.dmp  full=y fromuser=name2 touser=name3

场景1
name1正确、password1 错误
场景2
name2 错误
场景3
name3 错误
场景4
name1错误、password1 错误 即 使用非导出用户的其他用户执行导入操作

*********************************************************************************************
场景1
[oracle@Oracle10g db_back]$ imp ilearn123/oracle@prod  file=1022_ilearn_full.dmp full=y

Import: Release 10.2.0.1.0 - Production on Tue Sep 23 13:32:37 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

IMP-00058: ORACLE error 1017 encountered
ORA-01017: invalid username/password; logon deniedUsername:
报错:无效的用户 密码
*********************************************************************************************
场景2

name2 错误即:非导出用户
[oracle@Oracle10g db_back]$ imp \'sys/oracle@prod as sysdba\'  file=1022_ilearn_full.dmp fromuser=sys123 touser=ilearn

Import: Release 10.2.0.1.0 - Production on Tue Sep 23 13:38:22 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

Export file created by EXPORT:V09.02.00 via conventional path
import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
export client uses UTF8 character set (possible charset conversion)
export server uses UTF8 NCHAR character set (possible ncharset conversion)
IMP-00034: Warning: FromUser "SYS123" not found in export file
Import terminated successfully with warnings.
报错: sys123 即 name2 在备份文件中找不到该用户
*********************************************************************************************
场景3

name3 错误即:数据库中不存在该用户
[oracle@Oracle10g db_back]$ imp \'sys/oracle@prod as sysdba\'  file=1022_ilearn_full.dmp fromuser=sys touser=ilearn123

Import: Release 10.2.0.1.0 - Production on Tue Sep 23 13:40:20 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

. importing SYS's objects into ILEARN123
IMP-00003: ORACLE error 1435 encountered
ORA-01435: user does not exist
Import terminated successfully with warnings.
报错:用户不存在
*********************************************************************************************
场景4

[oracle@Oracle10g db_back]$ imp ilearn/oracle@prod  file=1022_ilearn_full.dmp fromuser=sys touser=ilearn

Import: Release 10.2.0.1.0 - Production on Tue Sep 23 13:43:39 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

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

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

*IMP-00091: Above error occurred on the following function and object: GRANT  STREAMS$_EVALUATION_CONTEXT. Remaining PL/SQL blocks for this object will be skipped.
*Import terminated successfully with warnings.
一个警告
*********************************************************************************************
*********************************************************************************************
*********************************************************************************************

exp

场景1
指定FULL 模式
场景2
指定FULL 模式、OWNER 模式
场景3
指定OWNER 模式

*********************************************************************************************
场景1
[oracle@Oracle10g db_back]$ exp ilearn/oracle@prod file=/home/oracle/db_back/1023_ilearn.dmp full=y

成功执行
*********************************************************************************************
场景2
[oracle@Oracle10g db_back]$ exp ilearn/oracle@prod file=/home/oracle/db_back/1023_ilearn.dmp full=y owner=ilearn_rpt

Export: Release 10.2.0.1.0 - Production on Tue Sep 23 17:39:46 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
EXP-00026: conflicting modes specified
EXP-00000: Export terminated unsuccessfully

报错:模式冲突
*********************************************************************************************
场景3
[oracle@Oracle10g db_back]$ exp ilearn/oracle@prod file=/home/oracle/db_back/1023_ilearn.dmp  owner=ilearn_rpt

Export: Release 10.2.0.1.0 - Production on Tue Sep 23 17:42:37 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user ILEARN_RPT
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user ILEARN_RPT
About to export ILEARN_RPT's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export ILEARN_RPT's tables via Conventional Path ...
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.
成功执行

exp、imp简单测试的更多相关文章

  1. EXP/IMP 导出生产库表的指定数据到测试库一例

    一般来讲,EXP/IMP是上一代导出导入程序,EXPDP/IMPDP是新一代的导出导入程序.对于大数据量的导出导入首选EXPDP/IMPDP,可以用到并行度,对表空间等操作上也更加的灵活.对于小数据量 ...

  2. [Oracle] - 使用 EXP / IMP 对数据库进行备份与还原

    只有Oracle客户端环境,如何完整备份数据库? 方法1:在本地搭建与目标环境相同版本的服务端,远程访问执行导出命令.这种方式远程备份速度较慢(VPN环境下测试). 方法2:登陆客户端,先导出数据库表 ...

  3. 利用exp/imp备份恢复数据库实例

    用exp/imp备份数据库: Oracle数据导入导出imp/exp功能:Oracle数据导入导出imp/exp就相当与oracle数据还原与备份. 大多情况都可以用Oracle数据导入导出完成数据的 ...

  4. EXP/IMP迁移案例,IMP遭遇导入表的表空间归属问题

    生产环境: 源数据库:Windows Server + Oracle 11.2.0.1 目标数据库:SunOS + Oracle 11.2.0.3 1.确认迁移需求:源数据库cssf 用户所有表和数据 ...

  5. Oracle的exp/imp详解

    原文地址:Oracle的exp/imp详解 作者:jxlazzw 备份概述 逻辑备份:备份可分为两类 ,物理备份和逻辑备份 物理备份:该方法实现数据库的完整恢复,但需要极大的外部存储设备,例如磁带库, ...

  6. Oracle 【IT实验室】数据库备份与恢复之一:exp/imp(导出与导入&装库与卸库)

    1.1  基本命令 1.  获取帮助 $ exp help=y $ imp help=y     2.  三种工作方式 (1)交互式方式 $ exp        //  然后按提示输入所需要的参数 ...

  7. 使用exp&imp工具进行数据库备份及恢复

    使用exp&imp工具进行数据库备份及恢复1.exp/imp使用方法介绍exp/imp为一种数据库备份恢复工具,也可以作为不同数据库之间传递数据的工具,两个数据库所在的操作系统可以不同.exp ...

  8. oracle数据库exp/imp命令详解

    转自http://wenku.baidu.com/link?url=uD_egkkh7JtUYJaRV8YM6K8CLBT6gPJS4UlSy5WKhz46D9bnychTPdgJGd7y6UxYtB ...

  9. 【exp/imp】将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中

    [exp/imp]将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后 ...

随机推荐

  1. 基于百度定位SDK的定位服务的实现

    转载请标明出处:http://blog.csdn.net/android_ls/article/details/10179013 一.定位模块的需求:我们想知道使用我们应用的用户的大概位置,每隔五分钟 ...

  2. AlgorithmsI Exercises: Analysis of Algorithms

    Question 1 Suppose that you time a program as a function of N and producethe following table. N seco ...

  3. Chrome DevTools学习笔记

    ---恢复内容开始--- chrome和firefox的开发者工具大同小异,都非常强大.今天在博客园上看了这篇文章(http://www.cnblogs.com/Wayou/p/chrome-cons ...

  4. Parameterized tests

    Parameterized继承自Suite.Parameterized是在参数上实现了Suite,修饰一个测试类,然后提供多组构造函数的参数用于测试不同场景. import java.util.Arr ...

  5. 意大利进口的衬衫面料pH值严重超标·都市快报

    意大利进口的衬衫面料pH值严重超标·都市快报     意大利进口的衬衫面料pH值严重超标         董捷    2007-03-24           通讯员 浙 检 记 者 董 捷      ...

  6. E - 食物链 poj1182

    题目告诉有  3  种动物,互相吃与被吃,现在告诉你  m  句话,其中有真有假,叫你判断假的个数  (  如果前面没有与当前话冲突的,即认为其为真话  ).每句话开始都有三个数 D A B,当D = ...

  7. OC类方法和实例方法 及常用的for/in方法

    类方法前面有+,实例方法前面有- 类方法和实例方法的区别在于,类方法不能使用实例变量. 使用类方法主要原因有: 1.类方法的使用不依赖于实例化一个对象,也就是说如果一个功能的实现不需要实例化对象,就可 ...

  8. Demon_动画控制(实现前后左右移动,喊叫)

    using UnityEngine; using System.Collections; public class PlayerAnimation : MonoBehaviour { float ve ...

  9. ab ApacheBench web测试工具

    http://www.ibm.com/developerworks/cn/linux/l-cn-ulimit/ ApacheBench参数说明 格式:ab [options] [http://]hos ...

  10. linux 获取系统屏幕分辨率

      在Windows下可以使用GetSystemMetrics(SM_CXSCREEN);GetSystemMetrics(SM_CYSCREEN) 获取. 在Linux下可以使用XDisplayWi ...