`
zhouchaofei2010
  • 浏览: 1085911 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

[DTS.Pipeline] 出错: “输出列“SUBSCORE”(88)”的精度无效。此精度必须介于 1 和 38 之间

 
阅读更多

数据从oracle到sqlserver2005的ssis程序报错:

===================================

项目到项目 [DTS.Pipeline] 出错: “输出列“SUBSCORE”(88)”的精度无效。此精度必须介于 1 和 38 之间。

 (Microsoft Visual Studio)

===================================

异常来自 HRESULT:0xC0204018 (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
程序位置:

   在 Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.ReinitializeMetaData()
   在 Microsoft.DataTransformationServices.DataFlowUI.DataFlowComponentUI.ReinitializeMetadata()
   在 Microsoft.DataTransformationServices.DataFlowUI.DataFlowAdapterUI.connectionPage_SaveConnectionAttributes(Object sender, ConnectionAttributesEventArgs args)

 

如果连接管理器中的提供程序选择Microsoft OLE DB provider for oracle 则不报错。现在该成了 Oracle provider for  OLE DB,就报此错误了。

 

oracle中SUBSCORE列是NUMBER类型的,但是oracle中Number(p)支持最大精度是38,sqlserver2005 decimal(p,s)支持的最大精度也是38,而这里报错提示却是SUBSCORE”(88)”,认为oracle的精度是88,显然有问题。 

 

 

google下,原来这是sql2005的bug

参考:http://connect.microsoft.com/SQLServer/feedback/details/282497/ssis-unable-to-determine-precision-for-oracle-number-datatype

 

解决办法:

1:oracle数据库中对number类型字段设置精度number(38)

2:在sql语句中对查询字段case转换,但这可能会会影响精度,7.9会被转成8

select entity, cast(jan as number(38))
from pidm.pden_monthly_prod
where entity = '101001000002'

3:加sp3 补丁?

4:ssis分开查询,对同一个数据源提供2个连接管理器。number类型和基本类型用Microsoft OLE DB provider for oracle ,Nclob 字符串二进制内容用Oracle provider for  OLE DB


 

 

 

0
2
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics