SQLMailgreenspun.com : LUSENET : SQL Server Database Administration : One Thread
We need to automate certain tasks using T-SQL as we receive specific e-mail messages. We will be scheduling tasks for the extended stored procedures of SQLMail to track wanted messages. Upon receiving any message from a specified person, how can we automatically execute a DTS or a stored procedure from that point on?
Thanks a lot, Chelo
-- Anonymous, March 17, 2000
I suspect that your posting actually contains multiple questions, please feel free to make another posting with elaboration.
As to how you can automatically execute a DTS package or a stored procedure, one answer for executing a DTS package is to use the dtsrun command prompt utility (via xp_cmdshell) another answer is to schedule it and have it read database flags to figure out what processing it needs to do (that is, polling). For executing a stored procedure you can call the stored procedure from transact SQL or, again, schedule it and have it figure out what it needs to do based on database flags that you will have changed.
Hope this helps,
-- Anonymous, March 27, 2000