Error calling a .NET assembly to execute a SSIS package -
11-28-2006
, 12:53 PM
I am getting an error message looking for missing .DLLs in a CLR trying to
reference SSIS. It cannot find an assembly 'microsoft.sqlserver.sqltdiagm'
and we have no idea on where this one is coming from. Any suggestions?
Error Message:
------------------
Error in creating assembly in SQL server when referring the DTS
Msg 10301, Level 16, State 1, Line 2
Assembly 'SSIS.SqlServer.SSIS' references assembly
'microsoft.sqlserver.sqltdiagm, version=9.0.242.0, culture=neutral,
publickeytoken=89845dcd8080cc91.', which is not present in the current
database. SQL Server attempted to locate and automatically load the
referenced assembly from the same location where referring assembly came
from, but that operation has failed (reason: 2(The system cannot find the
file specified.)). Please load the referenced assembly into the current
database and retry your request.
VS 2005 Profject References:
------------------------------------
Microsoft.SQLServer.ManagedDTS - c:\program files\microsoft sql
server\90\sdk\assemblies\Microsoft.sqlserver.Manag edDTS.dll
SQL Server version
----------------------
SQL Server 2005 sp1 enterprise edition
Code:
-------
Imports Microsoft.SqlServer.Dts.Runtime
Module Module1
Sub Main()
Dim pkgLocation As String
Dim pkg As New Package
Dim app As New Application
Dim pkgResults As DTSExecResult
pkgLocation = _
"C:\Program Files\Microsoft SQL Server\90\Samples\Integration
Services\Package Samples\CalculatedColumns
Sample\CalculatedColumns\CalculatedColumns.dtsx"
pkg = app.LoadPackage(pkgLocation, Nothing)
pkg.Variables("ETL_PROCESS_RUN_ID").Value = 555
pkgResults = pkg.Execute()
Console.WriteLine(pkgResults.ToString())
Console.ReadKey()
End Sub
End Module |