billinkc很好的答案。除了這個答案(或者充實了「檢查對象模型並查看已配置的部分」)之外,我還在任何包的開始處運行腳本,將所有連接管理器連接字符串的值添加到輸出窗口,接着是每個經理的連接字符串表達式。另外,它循環遍歷所有已經指定用於腳本的變量並輸出該值。在生產中不太有用,但在開發/測試時非常有用。
只是一個腳本任務添加到包流的開始,指定要調試然後將下面的代碼添加到腳本的任何變量:
'Report number of connections
Dts.Events.FireInformation(99, "debug", "number of connections = " & Dts.Connections.Count, "", 0, True)
'Loop through connection collection
For Each cConnection As Microsoft.SqlServer.Dts.Runtime.ConnectionManager In Dts.Connections
'Report connection string value
Try
Dts.Events.FireInformation(99, "debug", "connection """ & cConnection.Name & """ value = " & cConnection.ConnectionString, "", 0, True)
Catch
End Try
'Report connection string expression
Try
Dts.Events.FireInformation(99, "debug", "connection """ & cConnection.Name & """ constring expression = " & cConnection.GetExpression("ConnectionString"), "", 0, True)
Catch
End Try
Next
'Report number of variables
Dts.Events.FireInformation(99, "debug", "Number of Variables = " & Dts.Variables.Count, "", 0, True)
'Loop through variables collection
For Each vVariable As Microsoft.SqlServer.Dts.Runtime.Variable In Dts.Variables
'Report variable value
Try
Dts.Events.FireInformation(99, "debug", "Variable """ & vVariable.Name & """ value = " & vVariable.Value, "", 0, True)
Catch
End Try
Next
乾杯Billinkc - BIDSHelper現在安裝及將在未來有用的,但就像你說的它並沒有真正給我答案。 –