dbTalk Databases Forums  

calling dtexec from clr

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss calling dtexec from clr in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
t2581@hotmail.com
 
Posts: n/a

Default calling dtexec from clr - 09-25-2006 , 09:16 AM






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


Reply With Quote
  #2  
Old   
Charles Kangai
 
Posts: n/a

Default RE: calling dtexec from clr - 09-26-2006 , 08:33 AM






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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.