标签归档:IMP-00098

IMP-00098: INTERNAL ERROR: impgst2

有网友找到我们,imp导入数据库报IMP-00098: INTERNAL ERROR: impgst2错误,原始环境已经彻底破坏,无法通过数据文件恢复
20191120122739


20191120122750

通过分析,该表有218列

3240997713: TABLE "SWIP_ENTITY_TRX"
3241009738: BIND information for 218 columns
 col[  1] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[  2] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[  3] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[  4] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[  5] type 2 max length 22
 col[  6] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[  7] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[  8] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[  9] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[ 10] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[ 11] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 12] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 13] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[ 14] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 15] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 16] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 17] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[ 18] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[ 19] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[ 20] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 21] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[ 22] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[ 23] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[ 24] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 25] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[ 26] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[ 27] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[ 28] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 29] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 30] type 12 max length 7
 col[ 31] type 12 max length 7
 col[ 32] type 12 max length 7
 col[ 33] type 12 max length 7
 col[ 34] type 12 max length 7
 col[ 35] type 12 max length 7
 col[ 36] type 12 max length 7
 col[ 37] type 12 max length 7
 col[ 38] type 12 max length 7
 col[ 39] type 12 max length 7
 col[ 40] type 12 max length 7
 col[ 41] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 42] type 12 max length 7
 col[ 43] type 2 max length 22
 col[ 44] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 45] type 2 max length 22
 col[ 46] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 47] type 2 max length 22
 col[ 48] type 2 max length 22
 col[ 49] type 2 max length 22
 col[ 50] type 2 max length 22
 col[ 51] type 2 max length 22
 col[ 52] type 2 max length 22
 col[ 53] type 2 max length 22
 col[ 54] type 2 max length 22
 col[ 55] type 2 max length 22
 col[ 56] type 2 max length 22
 col[ 57] type 2 max length 22
 col[ 58] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[ 59] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[ 60] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[ 61] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[ 62] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[ 63] type 2 max length 22
 col[ 64] type 2 max length 22
 col[ 65] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 66] type 2 max length 22
 col[ 67] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 68] type 1 max length 2048 cset 873 (AL32UTF8) form 1
 col[ 69] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 70] type 1 max length 10 cset 873 (AL32UTF8) form 1
 col[ 71] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[ 72] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 73] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 74] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 75] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 76] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 77] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 78] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 79] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 80] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 81] type 12 max length 7
 col[ 82] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[ 83] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[ 84] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 85] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 86] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[ 87] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 88] type 1 max length 1 cset 873 (AL32UTF8) form 1
 col[ 89] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 90] type 1 max length 1000 cset 873 (AL32UTF8) form 1
 col[ 91] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 92] type 1 max length 100 cset 873 (AL32UTF8) form 1
 col[ 93] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 94] type 12 max length 7
 col[ 95] type 1 max length 1000 cset 873 (AL32UTF8) form 1
 col[ 96] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[ 97] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[ 98] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[ 99] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[100] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[101] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[102] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[103] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[104] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[105] type 1 max length 80 cset 873 (AL32UTF8) form 1
 col[106] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[107] type 12 max length 7
 col[108] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[109] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[110] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[111] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[112] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[113] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[114] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[115] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[116] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[117] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[118] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[119] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[120] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[121] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[122] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[123] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[124] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[125] type 2 max length 22
 col[126] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[127] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[128] type 12 max length 7
 col[129] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[130] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[131] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[132] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[133] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[134] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[135] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[136] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[137] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[138] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[139] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[140] type 1 max length 10 cset 873 (AL32UTF8) form 1
 col[141] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[142] type 1 max length 10 cset 873 (AL32UTF8) form 1
 col[143] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[144] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[145] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[146] type 1 max length 10 cset 873 (AL32UTF8) form 1
 col[147] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[148] type 2 max length 22
 col[149] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[150] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[151] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[152] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[153] type 12 max length 7
 col[154] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[155] type 1 max length 19 cset 873 (AL32UTF8) form 1
 col[156] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[157] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[158] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[159] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[160] type 1 max length 1 cset 873 (AL32UTF8) form 1
 col[161] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[162] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[163] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[164] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[165] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[166] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[167] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[168] type 1 max length 200 cset 873 (AL32UTF8) form 1
 col[169] type 1 max length 20 cset 873 (AL32UTF8) form 1
 col[170] type 2 max length 22
 col[171] type 2 max length 22
 col[172] type 2 max length 22
 col[173] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[174] type 12 max length 7
 col[175] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[176] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[177] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[178] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[179] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[180] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[181] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[182] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[183] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[184] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[185] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[186] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[187] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[188] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[189] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[190] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[191] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[192] type 2 max length 22
 col[193] type 12 max length 7
 col[194] type 12 max length 7
 col[195] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[196] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[197] type 1 max length 1 cset 873 (AL32UTF8) form 1
 col[198] type 12 max length 7
 col[199] type 2 max length 22
 col[200] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[201] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[202] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[203] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[204] type 1 max length 40 cset 873 (AL32UTF8) form 1
 col[205] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[206] type 1 max length 10 cset 873 (AL32UTF8) form 1
 col[207] type 1 max length 10 cset 873 (AL32UTF8) form 1
 col[208] type 12 max length 7
 col[209] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[210] type 1 max length 14 cset 873 (AL32UTF8) form 1
 col[211] type 1 max length 12 cset 873 (AL32UTF8) form 1
 col[212] type 1 max length 24 cset 873 (AL32UTF8) form 1
 col[213] type 96 max length 1 cset 873 (AL32UTF8) form 1
 col[214] type 1 max length 100 cset 873 (AL32UTF8) form 1
 col[215] type 2 max length 22
 col[216] type 1 max length 100 cset 873 (AL32UTF8) form 1
 col[217] type 1 max length 100 cset 873 (AL32UTF8) form 1
 col[218] type 1 max length 100 cset 873 (AL32UTF8) form 1
Conventional export
3241011300: start of table data

由于某种原因导致该dmp异常了,而且客户的主要数据都在这个表里面,因此找我们进行恢复处理.通过工具扫描,确定dmp基本上是好的.进行二次处理,把该dmp中这个表重新恢复成dmp文件,然后导入数据库,完成恢复(包括解决某些工具有汉字乱码问题,和sqlldr换行导入问题等)
20191120145616


发表在 逻辑备份/恢复 | 标签为 , , , , | 评论关闭

解决imp导入数据报IMP-00098错误

晚上十点多,准备睡觉了,一个朋友在qq上找到我,说他们数据库imp异常,希望我帮忙看看
大概情况
使用exp/imp升级并迁移数据库从win 10.2.0.1 升级到linux 11.2.0.3 由于硬盘空间不够,使用exp把win上面数据导出来,格式化掉win的数据文件所在硬盘格式化并加入到linux系统中(也就是说,故障之时,只有dmp文件,没有了数据文件),因为原库没有了,dmp又报错,所以担心了起来.
imp报错信息

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Tes

Export file created by EXPORT:V10.02.01 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
export client uses US7ASCII character set (possible charset conversion)
. . importing table                "ART_T_ARCTYPE"          0 rows imported
. . importing table                "ART_T_ARTICLE"          0 rows imported
……
. . importing table            "EVT_T_ACCEPT_CODE"          1 rows imported
. . importing table            "EVT_T_ACCEPT_FLOW"
 illegal lob length marker 51166
 bytesread = 00000000000
 TABLE =EVT_T_ACCEPT_FLOW   EVT_T_ACCEPT_FLOW
IMP-00098: INTERNAL ERROR: impgst2
IMP-00028: partial import of previous table rolled back: 680071 rows rolled back
IMP-00008: unrecognized statement in the export file:
  ??????????????????
IMP-00008: unrecognized statement in the export file:
  .:
IMP-00008: unrecognized statement in the export file:
  $;
IMP-00008: unrecognized statement in the export file:
  ||$
…………

这里可以知道数据库exp的客户端是版本是10.2.0.1,使用编码是US7ASCII,但是导入的库编码是ZHS16GBK

exp日志信息

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit 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 ZHS16GBK character set (possible charset conversion)

EXP-00091: Exporting questionable statistics.
. . exporting table              EVT_T_ACCEPT_FLOW    3470071 rows exported
. . exporting table             EVT_T_ACCEPT_FLOW1    2707606 rows exported
……
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully with warnings.

这里我们可以知道数据库编码是ZHS16GBK,exp客户端编码为US7ASCII,因此到导出过程中发生了一次由ZHS16GBK到US7ASCII的编码转换

检查新库发现,其db编码为ZHS16GBK,新库的NLS设置为:nls_lang=AMERICAN_AMERICA.ZHS16GBK
整个导出流程是:db编码为ZHS16GBK的数据库被客户端编码为US7ASCII的exp导出,然后被编码为ZHS16GBK的imp导入到db编码为ZHS16GBK的数据库中

故障可能性定位
1.可能在从ZHS16GBK到US7ASCII的编码转换中发生数据异常,也就是说dmp文件本身异常(我们最不希望出现的结果)
2.由于数据库导出过场会发生编码转换(ZHS16GBK->US7ASCII),而导入过程未发生编码转换(ZHS16GBK->ZHS16GBK),从而出现异常

分析并解决
1. 使用dul扫描dmp文件发现汉字都能够识别,而且exp成功的记录条数在dul扫描中都完全正常恢复出来,证明dmp文件是正常的
2. 基于dmp文件正常,编码转换的过程,得出结论在该库的imp过程中设置nls_lang=AMERICAN_AMERICA.US7ASCII问题应该就可以正常解决.果不其然,设置了NLS_LANG之后imp导入数据OK

得出结论
1. 做升级,迁移尽快保留多一份数据,这次吓得不轻
2. exp/imp最好前后客户端编码一致,否则可能被转换晕
如果遭遇真的dmp损坏情况,类似:IMP-00098: INTERNAL ERROR: impgst2,可以联系我们,提供专业处理

发表在 逻辑备份/恢复 | 标签为 , | 2 条评论