exp、imp简单测试

imp

分为以下几个测试场景

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

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

*********************************************************************************************
场景1
[[email protected] db_back]$ imp ilearn123/[email protected]  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 错误即:非导出用户
[[email protected] db_back]$ imp \‘sys/[email protected] 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 错误即:数据库中不存在该用户
[[email protected] db_back]$ imp \‘sys/[email protected] 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

[[email protected] db_back]$ imp ilearn/[email protected]  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
[[email protected] db_back]$ exp ilearn/[email protected] file=/home/oracle/db_back/1023_ilearn.dmp full=y

成功执行
*********************************************************************************************
场景2
[[email protected] db_back]$ exp ilearn/[email protected] 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
[[email protected] db_back]$ exp ilearn/[email protected] 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.
成功执行

时间: 2024-08-02 19:07:17

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

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

一般来讲,EXP/IMP是上一代导出导入程序,EXPDP/IMPDP是新一代的导出导入程序.对于大数据量的导出导入首选EXPDP/IMPDP,可以用到并行度,对表空间等操作上也更加的灵活.对于小数据量的迁移,可以使用exp/imp,操作更简单. 需求: exp 导出  A库(11.2.0.3)zjy用户的分区表t_jingyu_part部分数据,数据表空间 dbs_d_jingyu,索引表空间dbs_i_jingyu. imp 导入  B库(11.2.0.4)test用户下,test用户的默认表

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

[exp/imp]将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 如何将US7ASCII字符集的dmp文件导入到ZHS16GBK字符集的数据库中(重点,2种方法)? ② 从dmp文件可以获取到哪些信息?如何从dmp文件获取到dmp文件的字符集(重点,N种方法)? ③ 如何从dmp

以交互方式使用exp/imp的演示

总所周知,用exp/imp对数据库进行逻辑备份,包括表,用户,整个数据库,我们通常所熟悉的是使用命令行指定参数的方式来做的.下面我来演示一下不太常用的以交互方式的操作,操作很简单,就是只要输入exp/imp的命令,以交互方式提供导入导出所需的参数来完成.虽然这种方式没有实际的应用意义,但作为Oracle提供的一种方法,我们也是有必要熟悉一下的. 环境:Oracle 10.2.0.1/Linux Red Hat 5.3 一.单表导出导入测试 --创建测试表 [[email protected] ~

oracle exp/imp示例及使用问题整理

oracle常用的迁移工具有exp,imp,expdp,impdp,dblink等方式,实际过程中可以根据工具特点,数据库的具体环境情况,灵活采用.   exp/imp工具应方便简单使用,在数据量不大的情况下使用很频繁, 这个简要记录下使用中遇到的问题. 一.exp/imp版本不能往上兼容问题, 数据库的版本问题一定要搞清楚. 1. 低版本的exp/imp可以连接高版本的数据库, 高版本exp/imp不能连接低版本的数据库.   2. 高版本exp导出的dmp文件, 低版本imp命令无法导入.

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

使用exp&imp工具进行数据库备份及恢复1.exp/imp使用方法介绍exp/imp为一种数据库备份恢复工具,也可以作为不同数据库之间传递数据的工具,两个数据库所在的操作系统可以不同.exp可以将数据库数据导出为二进制文件,imp可以将导出的数据文件再导入到相同的数据库或不同的数据库.数据库导出有四种模式:full(全库导出).owner(用户导出).table(表导出).tablespace(表空间导出).full(全库导出):导出除ORDSYS.MDSYS.CTXSYS.ORDPLUGIN

exp/imp工具使用说解

引言 ORACLE数据库有两类备份方法. 第一类:为物理备份,该方法实现数据库的完整恢复,但数据库必须运行在归挡模式下(业务数据库在非归挡模式下运行),且 需要极大的外部存储设备,例如磁带库: 第二类:备份方式为逻辑备份,业务数据库采用此种方式,此方法不需要数据库运行在归挡模式下,不但备份简单,而且可以 不需要外部存储设备. 很久很久以前,Oracle就开始提供用来摄取表.模式或整个数据库的定义,然后导入到其他模式或数据的小工具:那就是exp/imp那个时候数据库规模都很小(几百M就算超大数据库

ORACLE EXPDP IMPDP数据导入导出命令详解及同EXP IMP命令详细对比

ORACLE EXPDP IMPDP数据导入导出命令详解及同EXP IMP 命令详细对比 一.EXPDP IMPDP EXP IMP 可以实现 1.可以实现逻辑备份和逻辑恢复 2.可以在数据库用户之间移动对象 3.可以在数据库之间移动对象 4.可以实现表空间转移 二.EXPDP的命令详解 C:\Users\Administrator>20:42:32.90>expdp help=y Export: Release 11.2.0.1.0 - Production on 星期六 10月 10 09

Oracle-client支持exp|imp|rman

官方精简版的驱动,不支持持exp/imp/rman,故需要安装oracle_client客户端. 实验环境: Centos6.5 x64   Oracle 11.2.0.4.0 Oracle_client     win64_11gR2_client.zip Win10 x64         PLSQL11_x64 Oracle官方下载: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.

Oracle下的exp/imp

在平时做Oracle的备份的时候一般都是做逻辑热备份,而做逻辑热备份一般都是使用exp/imp,在这里就简单的说一说. 使用exp导出数据imp导入数据操作如下: exp username/password owner=backup file=backup.dmp imp username/password file=backup.dmp ignore=y full=y 在这里解释一下其中ignore=y表示忽略创建错误,继续后面的操作,这个参数在full=y表示全部导入包括表约束这些内容,这个