Hi Alex,
Do you have to use dtexec? It seems an unclean way to execute a package from
CLR. If all you want to do is execute the package, how about using the
Execute method of the Package object in the object model?:
(You need to add reference to Microsoft.SqlServer.ManagedDTS.dll.)
Dim packagePath As String
Dim oPackage As New Package
Dim oApp As New Application
Dim oResult As DTSExecResult
packagePath = "C:\134\Pivot.dtsx"
oPackage = oApp.LoadPackage(packagePath , Nothing)
oResult = oPackage.Execute()
If your package is in msdb, use the LoadFromSQLServer package method instead
of LoadPackage. If it is in SSIS Package Store, use LoadFromDTSServer method.
Hope this helps,
Charles Kangai, MCT, MCDBA
Author of Learning Tree's 4-day course: "SQL Server 2005 Integration
Services" http://www.learningtree.com/courses/134.htm
Author of Learning Tree's 4-day course: "SQL Server Reporting Services"
http://www.learningtree.com/courses/523.htm
email alias: charles
email domain: kangai.demon.co.uk
"t2581 (AT) hotmail (DOT) com" wrote:
Quote:
Hi,
we use xp_cmshell inside custom procedure to execute DTS and dtexec
is any way to create clr procedure that will call dtexec ?
could not find any examples exept
http://forums.microsoft.com/MSDN/Sho...07609&SiteID=1
thanks
Alex |