IMP 导入数据报错 OCI-21500 OCI-22275

在尝试使用IMP导入数据时,遇到了OCI-21500和OCI-22275错误,这两个错误分别表示内部错误和无效的LOB定位器。错误可能是由于直接路径导出(DIRECT=Y)不支持包含LOB字段的数据导致的。解决方法是针对包含LOB字段的表GSYY.HD_HDXX进行单独导出和导入,避免使用直接路径,从而成功完成导入过程,且无任何报错。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

IMP导入数据报错如下:

OCI-21500: internal error code, arguments: [kgepop: no error frame to pop to], [], [], [], [], [], [], []
OCI-22275: invalid LOB locator specified
xExExE@@@@@@@@Errors in file :
OCI-21500: internal error code, arguments: [kgepop: no error frame to pop to], [], [], [], [], [], [], []
OCI-22275: invalid LOB locator specified
xExExEpppppppp

 

 illegal lob length marker 34981
 bytesread = 00000000000
 TABLE = HD_HDXX
IMP-00098: INTERNAL ERROR: impgst2

 

 

 

报错说明:

OCI-21500: internal error code, arguments: [string], [string], [string], [string], [string], [string], [string], [string]

Cause: This is the generic error number for the OCI environment (client-side) internal errors. This indicates that the OCI environment has encountered an exceptional condition.Action: Report as a bug - the first argument is the internal error number.

 

OCI-22275: invalid LOB locator specified

Cause: There are several causes: (1) the LOB locator was never initialized; (2) the locator is for a BFILE and the routine expects a BLOB/CLOB/NCLOB locator; (3) the locator is for a BLOB/CLOB/NCLOB and the routine expects a BFILE locator; (4) trying to update the LOB in a trigger body -- LOBs in trigger bodies are read only.

Action: For (1), initialize the LOB locator by selecting into the locator variable or by setting the LOB locator to empty. For (2) and (3), pass the correct type of locator into the routine. For (4), remove the trigger body code that updates the LOB value.

 

 

解决思路:

1.数据导出的时候按照 用户进行导出,并且采用了直接路径 direct=y

exp xyy/xyy@sspt   OWNER=GSYY   DIRECT=Y RECORDLENGTH=65535 BUFFER=104857600 FILE=/opt/oradata/exp/GSYY.dmp LOG=/opt/oradata/exp/log/GSYY.log

查询导入日志,发现并未报错:

. . exporting table                      FP_HGWSPZ          0 rows exported
. . exporting table                    GS_DJ_NSRXX          0 rows exported
. . exporting table                        HD_HDXX    3219563 rows exported

 

2.查询表 HD_HDXX    ,发现含有LOB字段数据


SQL> desc GSYY.HD_HDXX;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 SBNY                                      NOT NULL CHAR(6)
 NSRSBH                                    NOT NULL VARCHAR2(20)
 SWJG_DM                                   NOT NULL VARCHAR2(11)
 LRR_DM                                    NOT NULL VARCHAR2(11)
 LRRQ                                      NOT NULL DATE
 XGR_DM                                    NOT NULL VARCHAR2(11)
 XGRQ                                      NOT NULL DATE
 HDXX                                               CLOB
 FPLGXX                                             VARCHAR2(4000)
 JXFP_MX                                            CLOB
 XXFP_HZ                                            VARCHAR2(4000)
 HGWSFP_MX                                          CLOB
 JDCJXFP_MX                                         CLOB

 

3.直接路径导出 direct=y 不支持导出含有LOB、BFILE等大对象的表,进行单独 导出  GSYY.HD_HDXX,再进行导入,发现正常无报错。
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值