日期:2014-05-17  浏览次数:21077 次

从生产环境导出数据后在测试环境还原导入出错,请各位高人指点一下
日志如下:
E:\>imp shop/shop

Import: Release 10.1.0.2.0 - Production on 星期日 10月 28 20:45:18 2012

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


Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Pro
tion
With the Partitioning, OLAP and Data Mining options

Import file: EXPDAT.DMP > 20121028.dmp

Enter insert buffer size (minimum is 8192) 30720>

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

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

import done in ZHS16GBK 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 > yes

Import grants (yes/no): yes > no

Import table data (yes/no): yes >

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

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: CRED_PRODUCTINFO20110522

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

. importing RCB_ORDERS's objects into SHOP
. . importing table     "CRED_PRODUCTINFO20110522"
IMP-00058: ORACLE error 1438 encountered
ORA-01438: value larger than specified precision allows for this column
Import terminated successfully with warnings.

测试服务器的数据库软件版本和生产环境完全一致,但有两张表无法导入。

------解决方案--------------------
ORA-01438: value larger than specified precision allows for this column

测试服务器的数据库软件版本和生产环境完全一致,但有两张表无法导入

出现这个问题,估计也只有字符集造成的了,字符集造成了原来的数据导入到新库需要更多的列长度
------解决方案--------------------
你的版本和字符集是一样吗??
------解决方案--------------------
直接用EXPDP+DBLINK远程导入试试,看是否报错

客户端版本多少?到处的时候客户端字符集和服务器版本一样?
------解决方案--------------------
在目标服务器用EXPDP+DBLINK远程导入

避免太过客户端,避免做了很多环境原因造成的转换,如果还出错,至少问题定位在服务器间了,

然后导入某张表,看看是什么原因造成的,逐步定位问题
------解决方案--------------------
用工具导入吧。