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

EXP-00091和IMP-00010解决办法

在session4的4小题需要用到SH.COUNTRIES表,而手工建库时,这个SH用户没有这个表,就想着将别处的这个表拷贝过来。原来导出表的库

在session4的4小题需要用到SH.COUNTRIES表,而手工建库时,这个SH用户没有这个表,就想着将别处的这个表拷贝过来。原来导出表的库

在session4的4小题需要用到SH.COUNTRIES表,而手工建库时,这个SH用户没有这个表,就想着将别处的这个表拷贝过来。

原来导出表的库:database Oracle_SID=TEST0221 版本: 11.2.0.4

需要导进的库:database ORACLE_SID=PROD 版本:10.2.0.1

因为字符集的问题,出现了EXP-00091的错误

因为数据库版本的问题,出现了IMP-00010的错误

[oracle@node2 ~]$exp sh/sh@test0221 tables=COUNTRIES rows=y file=COUNTRIES.dmp

Export: Release 11.2.0.4.0 - Production on Thu Mar 27 15:19:07 2014

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in US7ASCII character set and AL16UTF16 NCHAR character set

server uses AL32UTF8 character set (possible charset conversion)

About to export specified tables via Conventional Path ...

. . exporting table COUNTRIES 23 rows exported

EXP-00091: Exporting questionable statistics.

EXP-00091: Exporting questionable statistics.

Export terminated successfully with warnings.

[oracle@node2 ~]$ oerr exp 00091

00091, 00000, "Exporting questionable statistics."

// *Cause: Export was able export statistics, but the statistics may not be

// usuable. The statistics are questionable because one or more of

// the following happened during export: a row error occurred, client

// character set or NCHARSET does not match with the server, a query

// clause was specified on export, only certain partitions or

// subpartitions were exported, or a fatal error occurred while

// processing a table.

// *Action: To export non-questionable statistics, change the client character

// set or NCHARSET to match the server, export with no query clause,

// export complete tables. If desired, import parameters can be

// supplied so that only non-questionable statistics will be imported,

// and all questionable statistics will be recalculated.

[oracle@node2 ~]$ exit

exit

sys@TEST0221> select * from nls_database_parameters t where t.parameter='NLS_CHARACTERSET';

PARAMETER VALUE

------------------------------ -------------------------------------------------------------------

NLS_CHARACTERSET AL32UTF8

或者查看:

sys@TEST0221> select * from v$nls_parameters where parameter='NLS_CHARACTERSET';

PARAMETER VALUE

---------------------------------------------------------------- ----------------------------------------------------------------

NLS_CHARACTERSET AL32UTF8

sys@TEST0221> !

[oracle@node2 ~]$export NLS_LANG=AMERICAN_AMERICA.AL32UTF8--设置字符集

[oracle@node2 ~]$exp sh/sh@test0221 tables=COUNTRIES rows=y file=COUNTRIES.dmp--再来重新导出,成功

Export: Release 11.2.0.4.0 - Production on Thu Mar 27 15:22:32 2014

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set

About to export specified tables via Conventional Path ...

. . exporting table COUNTRIES 23 rows exported

Export terminated successfully without warnings.

[oracle@node2 ~]$ ll

total 480

-rw-r--r-- 1 oracle oinstall 438823 Mar 14 13:30 awrrpt_1_33_37.html

-rw-r--r-- 1 oracle oinstall 24576 Mar 27 15:22COUNTRIES.dmp

-rw-r--r-- 1 oracle oinstall 2992 Feb 24 23:00 login.sql

-rw-r--r-- 1 oracle oinstall 195 Mar 14 08:43 spcpkg.lis

-rw-r--r-- 1 oracle oinstall 5477 Mar 14 08:43 spctab.lis

-rw-r--r-- 1 oracle oinstall 1832 Mar 14 08:43 spcusr.lis

[oracle@node2 ~]$scp COUNTRIES.dmp 192.168.1.155:/home/oracle--- 使用scp将文件传输到需要导入的库的系统里

oracle@192.168.1.155's password:

COUNTRIES.dmp 100% 24KB 24.0KB/s 00:00

[oracle@node2 ~]$

在需要导入表的环境里查看刚scp传输过来的文件:

[oracle@ocm1 ~]$ ll

total 32

-rw-r--r-- 1 oracle oinstall 24576 Mar 27 15:26 COUNTRIES.dmp

drwxr-xr-x 2 oracle oinstall 4096 Mar 27 12:39 script

drwxr-xr-x 2 oracle oinstall 4096 Mar 19 14:51 temp

#####################################################################

下面是导入:

[oracle@ocm1 ~]$ imp

Import: Release 10.2.0.1.0 - Production on Thu Mar 27 15:31:30 2014

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

Username: sh

Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Import file: expdat.dmp > /home/oracle/COUNTRIES.dmp

Enter insert buffer size (minimum is 8192) 30720>

IMP-00010: not a valid export file, header failed verification

IMP-00000: Import terminated unsuccessfully

[oracle@ocm1 ~]$

头部验证失败是由于版本号不同所致,经试验可以通过如下方法进行修改:

可以看到头部信息 --TEXPORT:V11.01.00,即为源数据库的版本号,将其修改为目的数据库的版本号,如本机为10.02.01,再次进行导入操作,,导入成功

[oracle@ocm1 ~]$vi COUNTRIES.dmp --直接使用vi修改下头部的版本号即可

^C^CiEXPORT:V10.02.00--之前是EXPORT:V11.02.00

USH

再次导入,成功:

[oracle@ocm1 ~]$ imp

Import: Release 10.2.0.1.0 - Production on Thu Mar 27 15:36:22 2014

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

Username: sh

Password:

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Import file: expdat.dmp > /home/oracle/COUNTRIES.dmp

Enter insert buffer size (minimum is 8192) 30720>

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

import done in AL32UTF8 character set and AL16UTF16 NCHAR character set

List contents of import file only (yes/no): no >

Ignore create error due to object existence (yes/no): no >

Import grants (yes/no): yes >

Import table data (yes/no): yes >

Import entire export file (yes/no): no >

Username: sh

Enter table(T) or partition(T:P) names. Null list means all tables for user

Enter table(T) or partition(T:P) name or . if done:

. importing SH's objects into SH

IMP-00008: unrecognized statement in the export file:

. importing SH's objects into SH

. . importing table "COUNTRIES" 23 rows imported

Import terminated successfully with warnings.

[oracle@ocm1 ~]$

SYS@PROD> conn sh/sh

Connected.

SH@PROD> desc COUNTRIES

Name Null? Type

----------------------------------------- -------- ----------------------------

COUNTRY_ID NOT NULL NUMBER

COUNTRY_ISO_CODE NOT NULL CHAR(2)

COUNTRY_NAME NOT NULL VARCHAR2(40)

COUNTRY_SUBREGION NOT NULL VARCHAR2(30)

COUNTRY_SUBREGION_ID NOT NULL NUMBER

COUNTRY_REGION NOT NULL VARCHAR2(20)

COUNTRY_REGION_ID NOT NULL NUMBER

COUNTRY_TOTAL NOT NULL VARCHAR2(11)

COUNTRY_TOTAL_ID NOT NULL NUMBER

COUNTRY_NAME_HIST VARCHAR2(40)

SH@PROD>

SH@PROD> select count(*) from COUNTRIES;

COUNT(*)

----------

23


推荐阅读
  • 本文介绍了在开发Android新闻App时,搭建本地服务器的步骤。通过使用XAMPP软件,可以一键式搭建起开发环境,包括Apache、MySQL、PHP、PERL。在本地服务器上新建数据库和表,并设置相应的属性。最后,给出了创建new表的SQL语句。这个教程适合初学者参考。 ... [详细]
  • Oracle Database 10g许可授予信息及高级功能详解
    本文介绍了Oracle Database 10g许可授予信息及其中的高级功能,包括数据库优化数据包、SQL访问指导、SQL优化指导、SQL优化集和重组对象。同时提供了详细说明,指导用户在Oracle Database 10g中如何使用这些功能。 ... [详细]
  • 在说Hibernate映射前,我们先来了解下对象关系映射ORM。ORM的实现思想就是将关系数据库中表的数据映射成对象,以对象的形式展现。这样开发人员就可以把对数据库的操作转化为对 ... [详细]
  • 阿里Treebased Deep Match(TDM) 学习笔记及技术发展回顾
    本文介绍了阿里Treebased Deep Match(TDM)的学习笔记,同时回顾了工业界技术发展的几代演进。从基于统计的启发式规则方法到基于内积模型的向量检索方法,再到引入复杂深度学习模型的下一代匹配技术。文章详细解释了基于统计的启发式规则方法和基于内积模型的向量检索方法的原理和应用,并介绍了TDM的背景和优势。最后,文章提到了向量距离和基于向量聚类的索引结构对于加速匹配效率的作用。本文对于理解TDM的学习过程和了解匹配技术的发展具有重要意义。 ... [详细]
  • 本文详细介绍了SQL日志收缩的方法,包括截断日志和删除不需要的旧日志记录。通过备份日志和使用DBCC SHRINKFILE命令可以实现日志的收缩。同时,还介绍了截断日志的原理和注意事项,包括不能截断事务日志的活动部分和MinLSN的确定方法。通过本文的方法,可以有效减小逻辑日志的大小,提高数据库的性能。 ... [详细]
  • 本文介绍了如何在MySQL中将零值替换为先前的非零值的方法,包括使用内联查询和更新查询。同时还提供了选择正确值的方法。 ... [详细]
  • 本文介绍了如何使用Power Design(PD)和SQL Server进行数据库反向工程的方法。通过创建数据源、选择要反向工程的数据表,PD可以生成物理模型,进而生成所需的概念模型。该方法适用于SQL Server数据库,对于其他数据库是否适用尚不确定。详细步骤和操作说明可参考本文内容。 ... [详细]
  • 在数据分析工作中,我们通常会遇到这样的问题,一个业务部门由若干业务组构成,需要筛选出每个业务组里业绩前N名的业务员。这其实是一个分组排序的 ... [详细]
  • 本文介绍了如何使用php限制数据库插入的条数并显示每次插入数据库之间的数据数目,以及避免重复提交的方法。同时还介绍了如何限制某一个数据库用户的并发连接数,以及设置数据库的连接数和连接超时时间的方法。最后提供了一些关于浏览器在线用户数和数据库连接数量比例的参考值。 ... [详细]
  • 本文介绍了adg架构设置在企业数据治理中的应用。随着信息技术的发展,企业IT系统的快速发展使得数据成为企业业务增长的新动力,但同时也带来了数据冗余、数据难发现、效率低下、资源消耗等问题。本文讨论了企业面临的几类尖锐问题,并提出了解决方案,包括确保库表结构与系统测试版本一致、避免数据冗余、快速定位问题等。此外,本文还探讨了adg架构在大版本升级、上云服务和微服务治理方面的应用。通过本文的介绍,读者可以了解到adg架构设置的重要性及其在企业数据治理中的应用。 ... [详细]
  • 本文介绍了使用postman进行接口测试的方法,以测试用户管理模块为例。首先需要下载并安装postman,然后创建基本的请求并填写用户名密码进行登录测试。接下来可以进行用户查询和新增的测试。在新增时,可以进行异常测试,包括用户名超长和输入特殊字符的情况。通过测试发现后台没有对参数长度和特殊字符进行检查和过滤。 ... [详细]
  • 本文详细介绍了MysqlDump和mysqldump进行全库备份的相关知识,包括备份命令的使用方法、my.cnf配置文件的设置、binlog日志的位置指定、增量恢复的方式以及适用于innodb引擎和myisam引擎的备份方法。对于需要进行数据库备份的用户来说,本文提供了一些有价值的参考内容。 ... [详细]
  • 使用Ubuntu中的Python获取浏览器历史记录原文: ... [详细]
  • 本文由编程笔记小编整理,介绍了PHP中的MySQL函数库及其常用函数,包括mysql_connect、mysql_error、mysql_select_db、mysql_query、mysql_affected_row、mysql_close等。希望对读者有一定的参考价值。 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
author-avatar
波波无敌1989_424
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有