ORA-03120: two-task conversion routine: integer overflow

这篇博客介绍了在遇到Oracle数据库报错ORA-03120:two-task conversion routine中遇到的整数溢出问题,提供了分析和解决此类问题的思路。
ORA-03120: two-task conversion routine: integer overflow

在导入imp数据库对象的时候,碰到一个错误:"ORA-03120: two-task conversion routine: integer overflow",查询metalink此问题为9.2.0.8.0平台的一个bug。
解决办法有两个:
1.To implement the solution, it will be necessary to apply the one-off patch for Bug 5671074 to the 9.2.0.8 database.
2.客户端用9.2.0.8.0导入也可以解决这个问题。
问题重现:
1. 9.2.0.1.0客户端导出9.2.0.7.0的数据库下的owner
$ expleiz/ecc@db_9208file=./leiz.dmp wner=leiz
Connected to: Oracle9i Enterprise Edition Release9.2.0.7.0- 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release9.2.0.7.0- Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Note: grants on tables/views/sequences/roles will not be exported
About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user leiz
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user leiz
About to export leiz's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export leiz's tables via Conventional Path ...
. . exporting table                    "ARAP_DJLX"         13 rows imported
. . exporting table              "SM_USERANDCLERK"          4 rows imported
. . exporting table           "SM_USER_MANAGEROLE"        379 rows imported
. . exporting table                 "SM_USER_ROLE"       1694 rows imported
. . exporting table              "SQLEXPERT_PLAN1"          0 rows imported
. . exporting table              "TOAD_PLAN_TABLE"        629 rows imported
. . exporting table                                                      
. . exporting table                  "XX_EXSYSTEM"          1 rows imported
. . exporting table                "XX_EXSYSTEM_B"          1 rows imported
. . exporting table              "XX_IDCONTRASTPK"    3303732 rows imported
. . exporting table                      "XX_XLOG"    1670747 rows imported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.

2. 9.2.0.1.0客户端导入(同一台客户端) 导入9.2.0.8 数据库服务器
$ impecc_view/ecc@leizfile=./leiz.dmp fromuser=leiz touser=ecc_view
Connected to: Oracle9i Enterprise Edition Release9.2.0.8.0- Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release9.2.0.8.0- Production
Export file created by EXPORT:V09.02.00 via conventional path
Warning: the objects were exported by leiz, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. . importing table                    "ARAP_DJLX"         13 rows imported
. . importing table              "SM_USERANDCLERK"          4 rows imported
. . importing table           "SM_USER_MANAGEROLE"        379 rows imported
. . importing table                 "SM_USER_ROLE"       1694 rows imported
. . importing table              "SQLEXPERT_PLAN1"          0 rows imported
. . importing table              "TOAD_PLAN_TABLE"        629 rows imported
.....
. . importing table                  "XX_EXSYSTEM"          1 rows imported
. . importing table                "XX_EXSYSTEM_B"          1 rows imported
. . importing table              "XX_IDCONTRASTPK"    3303732 rows imported
. . importing table                      "XX_XLOG"    1670747 rows imported
About to enable constraints...
IMP-00003: ORACLE error 3120 encountered
ORA-03120: two-task conversion routine: integer overflow
IMP-00003: ORACLE error 3120 encountered
ORA-03120: two-task conversion routine: integer overflow
IMP-00000: Import terminated unsuccessfully

    刚刚碰到这个错误的时候,以为是客户端的问题,但是在不同版本之间进行数据导入的2个规则我都满足:
规则1.   低版本的exp/imp客户端可以连接到高版本(或同版本)的数据库服务器,但高版本的exp/imp客户端不能连接到低版本的数据库服务器。
规则2.   高版本exp出的dmp文件,低版本无法imp(无法识别dmp文件),没有问题啊,那我尝试把9.2.0.1.0的客户端换成了9.2.0.7.0的exp导出的数据库的那台服务器,但是重复imp操作后,问题仍然重现。查了metalink,原因是9.2.0.8.0平台的一个bug:
    After applying the 9.2.0.8 patchset, compilation of functions and/or materialized view refreshes that reference remote databases via database links start failing. It can occur for anyPL/SQLthat references a remote object via database link where the 'Endianness' of the two platforms differs. If one platform. is 'Big-Endian', and another platform. is 'Little-Endian', then this bug can be triggered between them.
   To resolve ORA-03120, this solution is given:To implement the solution, it will be necessary to apply the one-off patch for Bug 5671074 to the 9.2.0.8 database.

3.用9.2.0.8.0客户端导入9.2.0.8.0数据库服务器,问题解决。
$ impecc_view/ecc@leizfile=./leiz.dmp fromuser=leiz touser=ecc_view
Import: Release 9.2.0.8.0 - Production on 星期三 4月 29 12:50:58 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
连接到: Oracle9i Enterprise Edition Release9.2.0.8.0- Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release9.2.0.8.0- Production
经由常规路径导出由EXPORT:V09.02.00创建的文件
警告: 此对象由 leiz 导出, 而不是当前用户
已经完成ZHS16GBK字符集和AL16UTF16 NCHAR 字符集中的导入
. 正在将leiz的对象导入到 ECC_VIEW
. . 正在导入表                       "SM_ROLE"        244行被导入
成功终止导入.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9266282/viewspace-663594/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9266282/viewspace-663594/

在数据流任务(Data Flow Task)中,出现“序列终止”(Sequence Terminated)错误通常与数据流任务的执行流程、数据源或目标配置、数据类型不匹配或内存资源管理相关。这类错误在SQL Server Integration Services(SSIS)、ETL处理流程或其他数据集成平台中较为常见,尤其是在数据流组件之间传递数据时未能正确处理序列化或反序列化操作。 在SSIS中,数据流任务通过多个数据流组件(如源、转换、目标)进行数据传输和处理。当某个组件在处理数据流时发生异常,例如数据类型转换失败、缓冲区溢出或序列化格式不兼容,会导致整个数据流任务的序列终止。具体表现可能包括以下情况: - 数据流任务在执行过程中突然停止,未完成预期的数据传输或转换操作。 - 日志中记录错误信息,例如“Data Flow Task: The data flow task sequence has been terminated unexpectedly”。 - 在某些情况下,错误信息可能伴随具体的异常堆栈,如“Conversion failed when converting from data type X to Y”或“Buffer manager error”等[^2]。 为诊断此类问题,可以采取以下措施: 1. **启用详细日志记录**:在SSIS包中启用详细日志记录,确保捕获所有组件的执行状态和错误信息,有助于定位导致序列终止的具体组件。 2. **检查数据流组件配置**:验证源、转换和目标组件的数据类型是否匹配,尤其是在处理来自异构数据源(如Oracle、MySQL、Flat Files)的数据时,需注意数据类型映射问题。 3. **调整缓冲区大小**:如果错误与缓冲区溢出有关,可以尝试调整数据流任务的默认缓冲区大小(DefaultBufferSize)和默认最大缓冲区行数(DefaultMaxBufferRows)。 4. **处理数据类型转换**:在数据流中使用数据转换组件(如Data Conversion)显式转换数据类型,避免隐式转换失败。 5. **检查外部系统兼容性**:当连接Oracle数据库时,若出现ORA-03120错误(two-task conversion routine: integer overflow),可能与客户端与服务器端的字节序(Endianness)不一致有关。确保Oracle客户端与服务器端的版本兼容,并在必要时应用补丁或升级到固定版本(如9.2.0.9)[^2]。 以下是一个简单的SSIS数据流任务配置示例,展示如何在控制流中使用数据流任务并启用日志记录: ```xml <DTS:Executable xmlns:DTS="www.microsoft.com/SqlServer/Dts" DTS:ExecutableType="Microsoft.SqlServer.Dts.Runtime.Executable, Microsoft.SqlServer.ManagedDTS, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"> <DTS:LogProvider> <DTS:Property DTS:Name="DTSLogProviderType">1</DTS:Property> <DTS:Property DTS:Name="DTSLogProviderFileName">C:\Logs\DataFlowLog.xml</DTS:Property> </DTS:LogProvider> <DTS:Task> <DTS:Property DTS:Name="DTSID">{12345678-1234-1234-1234-123456789012}</DTS:Property> <DTS:Property DTS:Name="Name">Data Flow Task</DTS:Property> <DTS:ObjectData> <DTS:DataFlowTask> <DTS:BufferManager> <DTS:Property DTS:Name="DefaultBufferSize">10485760</DTS:Property> <DTS:Property DTS:Name="DefaultMaxBufferRows">10000</DTS:Property> </DTS:BufferManager> </DTS:DataFlowTask> </DTS:ObjectData> </DTS:Task> </DTS:Executable> ``` 此外,若涉及异构数据库导入导出操作(如从Oracle导入到SQL Server),还需确保字段长度、精度、数据格式等与目标表结构兼容。例如,Oracle的NUMBER类型在导入到SQL Server时可能需要显式指定精度和小数位数,以避免转换溢出错误[^2]。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值