Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Marc writes "I am working with SQL Server 7 on an NT box. Data is periodically written to a text file and an automated e-mail message can be generated at the same time. I have a DTS written in VBScript to convert the text info into the format I need and place it into a table. I want to use an automatically generated e-mail message to start my DTS to avoid reusing old data from my text file (so I cannot simply poll by time). I can easily create a stored procedure to poll for new e-mail with the required sender and topic lines, but I cannot find out how to start a DTS from a stored procedure (dtsrun does not do it) and I cannot find out how to start a DTS when an e-mail message is received. How do I do what I want to do? Can I?Thanks."
jasper_smith
SQL Server MVP & SQLTeam MVY
846 Posts
Posted - 2002-08-05 : 11:31:05
dtsrun DOES do ite.g.
declare @dtscmd varchar(200)declare @ret intset @dtscmd='DTSRun /SSERVERNAME /N"UPDATE_XML" /E' exec @ret=master..xp_cmdshell @dtscmd,no_outputIf @ret<>0begin raiserror('Failed to run DTS Package',16,1)end