imp还原数据库_imp命令只导入数据

imp还原数据库_imp命令只导入数据全量恢复imp用户名/密码@数据库file=导入文件地址full=yignore=y部分表恢复imp用户名/密码@数据库file=导入文件地址fromuser=数据拥有者touser=数据所需者tables=(表a,表b)问题及解决方案问题1:Import:Release11.2.0.1.0-ProductiononMonDec3014:54:3…


Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

全量恢复

imp 用户名/密码@数据库 file=导入文件地址 full=y ignore=y

部分表恢复

imp 用户名/密码@数据库 file=导入文件地址 fromuser=数据拥有者 touser=数据所需者 tables=(表a,表b)

问题及解决方案

问题1:

Import: Release 11.2.0.1.0 - Production on Mon Dec 30 14:54:35 2019

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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

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

解决方案:
进入到SQL*Plus,给用户授权即可,例如:

#以下命令报错了
imp user1/pwd1@数据库 file=导入文件地址 fromuser=数据拥有者 touser=数据所需者 tables=(表a,表b)

#给user1授权即可
GRANT IMP_FULL_DATABASE to user1;

问题2:

Import: Release 11.2.0.1.0 - Production on Mon Dec 30 15:00:36 2019

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


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

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

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

import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
export client uses ZHS16GBK character set (possible charset conversion)
. importing CHENHAO's objects into XS
IMP-00033: Warning: Table "TABLE_A" not found in export file
Import terminated successfully with warnings.

解决方案:
指定备份文件拥有者和备份的用户关系即可,例子:

#以下命令报错
imp 用户名/密码@数据库 file=导入文件地址 tables=(表a,表b)
imp 用户名/密码@数据库 file=导入文件地址 tables=表名
imp hcdl/hcdl@127.0.0.1:1521/orcl file=/mountssd/oracle/db_backup/hc/hc_2020-01-07.dmp fromuser=hc touser=hcdl tables=KR_ID
#加上后
imp 用户名/密码@数据库 file=导入文件地址 fromuser=数据拥有者 touser=数据所需者 tables=(表a,表b)
#全量恢复一样
imp 用户名/密码@数据库 file=导入文件地址 fromuser=数据拥有者 touser=数据所需者  full=y ignore=y
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/192678.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 911完整记录_入院记录书写

    911完整记录_入院记录书写本文记录了打PSU的全过程,意在体会数据库打PSU补丁的整个过程。1.OPatch替换为最新版本2.数据库软件应用19121551补丁程序3.数据库应用补丁4.验证PSU补丁是否应用成功1.OPatch替换为最新版本[oracle@DBusr2]$iduid=500(oracle)gid=500(oinstall)组=500(oinstall),501(dba)环境=…

    2022年10月15日
  • 实时数据库 内存数据库_实时数据库产品

    实时数据库 内存数据库_实时数据库产品这是一款实时和嵌入式软件,用来管理持续增长的复杂数据,来支持高级应用的特性。性能和可靠性,更短的产品开发周期等需求,驱使开发者在他们的设计中,考虑采用经验证的、成熟的商业数据库系统组件来,来满足应用层的这些需求。  McObject公司的eXtremeDB嵌入式数据库系列产品是将高性能、稳定性和简单易用性等特性同时融入了工业基的数据库引擎。  了解eXtremeDB产品系列或eXtreme…

    2022年10月14日
  • java 安装 jce_JCE安装

    java 安装 jce_JCE安装#!/bin/bashKERNEL=`rpm-qa|grepkernel-smp-devel-2.6.9-67.EL>/dev/null;echo$?`aliascp=’cp-i’unaliascpif[$KERNEL-eq1];thenrpm-ivhkernel-smp-devel-2.6.9-67.EL.i686.rpmfiSWCSMDIR=`cd…

    2022年6月26日
  • 什么是runtime_runtime error什么意思

    什么是runtime_runtime error什么意思[Runtime] NSInvocation

    2022年4月20日
  • FLAG_ACTIVITY_CLEAR_TOP和singleTask的区别

    FLAG_ACTIVITY_CLEAR_TOP和singleTask的区别Activity的Flags的设置,可以让Activity的运行具有一些特殊的特性,比如有些可以产生和启动模式相同或相似效果的,还有比如Activity在非前台的时候,也不会保存后台的历史列表中。本文重点分析FLAG_ACTIVITY_CLEAR_TOP,也简单介绍一下其它几个常用的Flag以及使用场景FLAG_ACTIVITY_NEW_TASK将Activity指定为singleTas…

    2022年7月17日
  • MySQL TENSE

    MySQL TENSE

    2021年5月5日

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号