热门标签 | HotTags
当前位置:  开发笔记 > 数据库 > 正文

Oracle报EXP-0006:出现内部不一致的错误

昨天再对服务器新安装的Oracle数据库用exp、imp导库,一直报ldquo;EXP-0006:出现内部不一致的错误rdquo;,于是在网上百度,尝

昨天再对服务器新安装的Oracle数据库用exp、imp导库,一直报ldquo;EXP-0006:出现内部不一致的错误rdquo;,于是在网上百度,尝

14年10月份到电子所部署系统时,用exp、imp导库命令成功的实现了Oracle数据库的导出、导入,对此,还专门发表过一篇文章Oracle数据库导出导入,讲解导出、导入过程,见 。

昨天再对服务器新安装的Oracle数据库用exp、imp导库,一直报“EXP-0006:出现内部不一致的错误”,于是在网上百度,尝试其他导库方式,发现采用expdp、impdp数据泵同样可以完成数据库的导出、导入,而且数据泵与传统导出导入有如下区别:

1.EXP和IMP是客户段工具程序, EXPDP和IMPDP是服务端的工具程序;

2.EXP和IMP效率比较低. EXPDP和IMPDP效率高;

3.数据泵功能强大并行、过滤、转换、压缩、加密、交互等等;

4.数据泵不支持9i以前版本, EXP/IMP短期内还是比较适用;

5.同exp/imp数据泵导出包括导出表,导出方案,导出表空间,导出数据库4种方式。

有了理论支持,下面开始实战。

expdp导出Oracle数据库

1.在sqlplus下创建Directory,优点在于让我们可以在Oracle数据库中灵活的对文件进行读写操作,,极大的提高了Oracle的易用性和可扩展性。

命令:createdirectory oracleDB as 'D:\OracleDB';

2.把读写权限授予特定用户

命令:Grantread,write on directory oracleDB to radpcs;

3.在dos窗口执行expdp导出命令

命令:expdp radpcs/ictradpcs@rdpcs directory=oracleDB dumpfile =20150226.dmp logfile=20150226.logFULL=y;

到此导出工作完成,下面讲解如何用impdp导入Oracle数据库。

impdp导入Oracle数据库

1.以sysdba级别登录Oracle数据库

命令:--sqlplus /nolog

--conn system/system@radpcs as sysdba

2.创建数据表空间

命令:

--创建数据表空间

CREATE TABLESPACE RADPCS_DATA

LOGGING

DATAFILE 'D:\OracleDB\radpcs_DATA.DBF' SIZE 200M REUSE AUTOEXTEND

ON NEXT 10M MAXSIZE 16383M EXTENT MANAGEMENT LOCAL UNIFORM

SIZE 1024K;

--创建索引表空间

CREATE TABLESPACE RADPCS_INDX

LOGGING

DATAFILE 'D:\OracleDB\radpcs_INDX.DBF' SIZE 200M REUSE AUTOEXTEND

ON NEXT 10M MAXSIZE 16383M EXTENT MANAGEMENT LOCAL UNIFORM

SIZE 1024K;

这步很关键,创建的表空间需要和原Oracle表空间名称、个数相同,否则会导入失败。如果不知道原表空间名称、个数,就先创建一个临时的表空间进行导入,导入过程中根据错误提示,比如“RADPCS1_DATA表空间不存在”提示,缺哪个创建哪个。

3.创建用户、对用户授权

--创建用户
create user radpcs identified by ictradpcs
default tablespace radpcs_data
quota unlimited on radpcs_data
quota unlimited on radpcs_indx;

--授权
grant aq_administrator_role to radpcs;
grant aq_user_role to radpcs;
grant authenticateduser to radpcs;
grant connect to radpcs;
grant ctxapp to radpcs;
grant dba to radpcs;
grant delete_catalog_role to radpcs;
grant ejbclient to radpcs;
grant execute_catalog_role to radpcs;
grant exp_full_database to radpcs;
grant gather_system_statistics to radpcs;
grant hs_admin_role to radpcs;
grant imp_full_database to radpcs;
grant javadebugpriv to radpcs;
grant javaidpriv to radpcs;
grant javasyspriv to radpcs;
grant javauserpriv to radpcs;
grant java_admin to radpcs;
grant java_deploy to radpcs;
grant logstdby_administrator to radpcs;
grant oem_monitor to radpcs;
grant olap_dba to radpcs;
grant recovery_catalog_owner to radpcs;
grant resource to radpcs;
grant select_catalog_role to radpcs;
grant xdbadmin to radpcs;
-- Grant/Revoke system privileges
grant administer database trigger to radpcs;
grant alter any cluster to radpcs;
grant alter any dimension to radpcs;
grant alter any index to radpcs;
grant alter any indextype to radpcs;
grant alter any library to radpcs;
grant alter any outline to radpcs;
grant alter any procedure to radpcs;
grant alter any role to radpcs;
grant alter any sequence to radpcs;
grant alter any snapshot to radpcs;
grant alter any table to radpcs;
grant alter any trigger to radpcs;
grant alter any type to radpcs;
grant alter database to radpcs;
grant alter profile to radpcs;
grant alter resource cost to radpcs;
grant alter rollback segment to radpcs;
grant alter session to radpcs;
grant alter system to radpcs;
grant alter tablespace to radpcs;
grant alter user to radpcs;
grant analyze any to radpcs;
grant audit any to radpcs;
grant audit system to radpcs;
grant backup any table to radpcs;
grant become user to radpcs;
grant comment any table to radpcs;
grant create any cluster to radpcs;
grant create any context to radpcs;
grant create any dimension to radpcs;
grant create any directory to radpcs;
grant create any index to radpcs;
grant create any indextype to radpcs;
grant create any library to radpcs;
grant create any operator to radpcs;
grant create any outline to radpcs;
grant create any procedure to radpcs;
grant create any sequence to radpcs;
grant create any snapshot to radpcs;
grant create any synonym to radpcs;
grant create any table to radpcs;
grant create any trigger to radpcs;
grant create any type to radpcs;
grant create any view to radpcs;
grant create cluster to radpcs;
grant create database link to radpcs;
grant create dimension to radpcs;
grant create indextype to radpcs;
grant create library to radpcs;
grant create operator to radpcs;
grant create procedure to radpcs;
grant create profile to radpcs;
grant create public database link to radpcs;
grant create public synonym to radpcs;
grant create role to radpcs;
grant create rollback segment to radpcs;
grant create sequence to radpcs;
grant create session to radpcs;
grant create snapshot to radpcs;
grant create synonym to radpcs;
grant create table to radpcs;
grant create tablespace to radpcs;
grant create trigger to radpcs;
grant create type to radpcs;
grant create user to radpcs;
grant create view to radpcs;
grant debug any procedure to radpcs;
grant debug connect session to radpcs;
grant delete any table to radpcs;
grant drop any cluster to radpcs;
grant drop any context to radpcs;
grant drop any dimension to radpcs;
grant drop any directory to radpcs;
grant drop any index to radpcs;
grant drop any indextype to radpcs;
grant drop any library to radpcs;
grant drop any operator to radpcs;
grant drop any outline to radpcs;
grant drop any procedure to radpcs;
grant drop any role to radpcs;
grant drop any sequence to radpcs;
grant drop any snapshot to radpcs;
grant drop any synonym to radpcs;
grant drop any table to radpcs;
grant drop any trigger to radpcs;
grant drop any type to radpcs;
grant drop any view to radpcs;
grant drop profile to radpcs;
grant drop public database link to radpcs;
grant drop public synonym to radpcs;
grant drop rollback segment to radpcs;
grant drop tablespace to radpcs;
grant drop user to radpcs;
grant execute any indextype to radpcs;
grant execute any library to radpcs;
grant execute any operator to radpcs;
grant execute any procedure to radpcs;
grant execute any type to radpcs;
grant flashback any table to radpcs;
grant force any transaction to radpcs;
grant force transaction to radpcs;
grant global query rewrite to radpcs;
grant grant any object privilege to radpcs;
grant grant any privilege to radpcs;
grant grant any role to radpcs;
grant insert any table to radpcs;
grant lock any table to radpcs;
grant manage tablespace to radpcs;
grant on commit refresh to radpcs;
grant query rewrite to radpcs;
grant restricted session to radpcs;
grant resumable to radpcs;
grant select any sequence to radpcs;
grant select any table to radpcs;
grant under any table to radpcs;
grant under any type to radpcs;
grant under any view to radpcs;
grant unlimited tablespace to radpcs;
grant update any table to radpcs;
grant select on dba_free_space to radpcs;
grant select on dba_data_files to radpcs;

4.在sqlplus下创建Directory

命令:createdirectory oracleDB as 'D:\OracleDB';

5.把读写权限授予特定用户

命令:Grantread,write on directory oracleDB to radpcs;

6.在dos窗口执行impdp导入命令

命令:impdp radpcs/ictradpcs@rdpcs directory=oracleDB dumpfile=20150226.dmp logfile=20150226.log;

漫长的等待后,dos窗口会提示导出完成。如果导入过程出错,会提示错误信息(只要数据完整,一些错误可以忽略)。


推荐阅读
  • 分享css中提升优先级属性!important的用法总结
    web前端|css教程css!importantweb前端-css教程本文分享css中提升优先级属性!important的用法总结微信门店展示源码,vscode如何管理站点,ubu ... [详细]
  • 如何实现织梦DedeCms全站伪静态
    本文介绍了如何通过修改织梦DedeCms源代码来实现全站伪静态,以提高管理和SEO效果。全站伪静态可以避免重复URL的问题,同时通过使用mod_rewrite伪静态模块和.htaccess正则表达式,可以更好地适应搜索引擎的需求。文章还提到了一些相关的技术和工具,如Ubuntu、qt编程、tomcat端口、爬虫、php request根目录等。 ... [详细]
  • 基于PgpoolII的PostgreSQL集群安装与配置教程
    本文介绍了基于PgpoolII的PostgreSQL集群的安装与配置教程。Pgpool-II是一个位于PostgreSQL服务器和PostgreSQL数据库客户端之间的中间件,提供了连接池、复制、负载均衡、缓存、看门狗、限制链接等功能,可以用于搭建高可用的PostgreSQL集群。文章详细介绍了通过yum安装Pgpool-II的步骤,并提供了相关的官方参考地址。 ... [详细]
  • 本文详细介绍了SQL日志收缩的方法,包括截断日志和删除不需要的旧日志记录。通过备份日志和使用DBCC SHRINKFILE命令可以实现日志的收缩。同时,还介绍了截断日志的原理和注意事项,包括不能截断事务日志的活动部分和MinLSN的确定方法。通过本文的方法,可以有效减小逻辑日志的大小,提高数据库的性能。 ... [详细]
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • 本文介绍了如何使用php限制数据库插入的条数并显示每次插入数据库之间的数据数目,以及避免重复提交的方法。同时还介绍了如何限制某一个数据库用户的并发连接数,以及设置数据库的连接数和连接超时时间的方法。最后提供了一些关于浏览器在线用户数和数据库连接数量比例的参考值。 ... [详细]
  • 计算机存储系统的层次结构及其优势
    本文介绍了计算机存储系统的层次结构,包括高速缓存、主存储器和辅助存储器三个层次。通过分层存储数据可以提高程序的执行效率。计算机存储系统的层次结构将各种不同存储容量、存取速度和价格的存储器有机组合成整体,形成可寻址存储空间比主存储器空间大得多的存储整体。由于辅助存储器容量大、价格低,使得整体存储系统的平均价格降低。同时,高速缓存的存取速度可以和CPU的工作速度相匹配,进一步提高程序执行效率。 ... [详细]
  • SpringMVC接收请求参数的方式总结
    本文总结了在SpringMVC开发中处理控制器参数的各种方式,包括处理使用@RequestParam注解的参数、MultipartFile类型参数和Simple类型参数的RequestParamMethodArgumentResolver,处理@RequestBody注解的参数的RequestResponseBodyMethodProcessor,以及PathVariableMapMethodArgumentResol等子类。 ... [详细]
  • 如何提高PHP编程技能及推荐高级教程
    本文介绍了如何提高PHP编程技能的方法,推荐了一些高级教程。学习任何一种编程语言都需要长期的坚持和不懈的努力,本文提醒读者要有足够的耐心和时间投入。通过实践操作学习,可以更好地理解和掌握PHP语言的特异性,特别是单引号和双引号的用法。同时,本文也指出了只走马观花看整体而不深入学习的学习方式无法真正掌握这门语言,建议读者要从整体来考虑局部,培养大局观。最后,本文提醒读者完成一个像模像样的网站需要付出更多的努力和实践。 ... [详细]
  • 在数据分析工作中,我们通常会遇到这样的问题,一个业务部门由若干业务组构成,需要筛选出每个业务组里业绩前N名的业务员。这其实是一个分组排序的 ... [详细]
  • Oracle Database 10g许可授予信息及高级功能详解
    本文介绍了Oracle Database 10g许可授予信息及其中的高级功能,包括数据库优化数据包、SQL访问指导、SQL优化指导、SQL优化集和重组对象。同时提供了详细说明,指导用户在Oracle Database 10g中如何使用这些功能。 ... [详细]
  • 本文介绍了adg架构设置在企业数据治理中的应用。随着信息技术的发展,企业IT系统的快速发展使得数据成为企业业务增长的新动力,但同时也带来了数据冗余、数据难发现、效率低下、资源消耗等问题。本文讨论了企业面临的几类尖锐问题,并提出了解决方案,包括确保库表结构与系统测试版本一致、避免数据冗余、快速定位问题等。此外,本文还探讨了adg架构在大版本升级、上云服务和微服务治理方面的应用。通过本文的介绍,读者可以了解到adg架构设置的重要性及其在企业数据治理中的应用。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • 本文介绍了使用postman进行接口测试的方法,以测试用户管理模块为例。首先需要下载并安装postman,然后创建基本的请求并填写用户名密码进行登录测试。接下来可以进行用户查询和新增的测试。在新增时,可以进行异常测试,包括用户名超长和输入特殊字符的情况。通过测试发现后台没有对参数长度和特殊字符进行检查和过滤。 ... [详细]
  • 使用Ubuntu中的Python获取浏览器历史记录原文: ... [详细]
author-avatar
RAL-1314921
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有