SSIS 2005使用脚本组件设计器时出错:“无法从OLE DB提供程序获取行”BULK“表示链接服务器”(null)“

时间:2009-08-04 18:51:15

标签: ssis ssis-2005

我正在尝试在SSIS中调试dts包。我有一个脚本组件设计器,我传入输入变量来增加一个计数器。当我尝试msgbox计数器值时,我收到以下错误。

Error: 0xC0202009 at STAGING1 to STAGING2, STAGING2 Destination [1056]: An OLE DB error has occurred. Error code: 0x80040E14.
An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E14  Description: "Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".".
An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E14  Description: "The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.".
An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E14  Description: "Reading from DTS buffer timed out.".

以下是脚本组件设计器中代码的一部分:

Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper

Public Class ScriptMain
    Inherits UserComponent

    Dim iCounter As Integer
    Dim iCurrentVal As Integer
    Dim sCurrentOracleSeq As String
    Dim sSeqName As String
    Dim sSeqAltProcName As String

    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
        '
        ' Add your code here
        '
        Row.SEQIDNCASE = iCounter + iCurrentVal
        iCounter += 1
        MsgBox(iCounter + iCurrentVal, MsgBoxStyle.Information, "Input0")
    End Sub

    Public Overrides Sub PreExecute()
        sCurrentOracleSeq = Me.Variables.VSEQIDCurVal

        iCurrentVal = CInt(sCurrentOracleSeq)
        MsgBox(iCurrentVal, MsgBoxStyle.Information, "No Title")
        iCounter = 0
        sSeqName = Me.Variables.VSEQIDName
        sSeqAltProcName = Me.Variables.VSEQIDAlterProc
    End Sub

    Public Overrides Sub PostExecute()
        Me.Variables.VSEQIDUpdateSQL = "Begin " & sSeqAltProcName & "('" & sSeqName & "'," & (iCounter + iCurrentVal) & "); End;"
    End Sub
End Class

请注意,如果我注释掉具有Msgbox的行,则上面的代码部分可以正常工作。

1 个答案:

答案 0 :(得分:0)

这真的是SSIS中的DTS任务吗?只是确定。

如果是这样,您是否考虑过重写SSIS脚本任务并利用BIDS中的断点?

也许您应该尝试通过SSMS转到DTS包>管理>传统和故障排除 - 如果可能的话,将BIDS从图片中删除。