我尝试使用SSIS包将数据转换转换任务从Excel Source加载到SQL Server目标。但是当我运行包时,它失败并显示以下错误消息
===================================
Failure saving package. (Microsoft Visual Studio)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializePackage(IDesignerSerializationManager manager, Package package, TextWriter textWriter)
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializeComponent(IDesignerSerializationManager manager, IComponent component, Object serializationStream)
at Microsoft.DataWarehouse.Serialization.DesignerComponentSerializer.Serialize(IDesignerSerializationManager manager, Object value)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseDesignerLoader.Serialize()
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.BaseDesignerLoader.Flush(Boolean forceful)
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.BaseDesignerLoader.Flush()
at Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseContainerManager.OnBeforeSave(UInt32 docCookie)
===================================
An invalid character was found in text content.
(msxml6.dll)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Package.SaveToXML(String& packageXml, IDTSEvents events)
at Microsoft.DataTransformationServices.Design.Serialization.DtrDesignerSerializer.SerializePackage(IDesignerSerializationManager manager, Package package, TextWriter textWriter)
===================================
An invalid character was found in text content.
(msxml6.dll)
------------------------------
Program Location:
at Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackagePersist100.SavePackageToXML(Object& pvDestination, Boolean vbReturnDOM, IDTSEvents100 pEvents)
at Microsoft.SqlServer.Dts.Runtime.Package.SaveToXML(String& packageXml, IDTSEvents events)
答案 0 :(得分:1)
我遇到了同样的问题,发现我尝试导入的文件在第二个标题的末尾有一个非打印字符。删除此问题解决了这个问题。
答案 1 :(得分:0)
既然你正在寻求“紧急”解决这个问题,我会提出一个短期和长期的建议:
1)短期内,一种实用的方法:
在您的情况下,是否可以按部分加载电子表格?
会不会有什么伤害,你多次重新尝试/重新加载,找到问题?
或者,您可以在测试环境中尝试此负载吗?
如果是这样,那么尝试加载前半部分,或前1/4行或前10行等,直到找到导致问题的行。至少,您可以加载除那一行之外的所有内容......最多可能在那时很容易找到问题。
2)对于长期......你(或那里的某个人)有权访问修改 SSIS包吗? 如果是这样,那么我建议在数据流任务中编码错误行重定向:有问题的行转到另一个目的地(红色箭头),而没有问题的行转到通常的目的地(绿色箭头)。
有关错误行重定向的更多信息,请参阅以下链接:
A)简介:Handling Errors in Data
B)其他一些问题:
Programmatically configuring error and truncation dispositions for row redirection
希望有帮助...