how to kick off a Delphi exe from a stored procedure?




My colleague & I have recently commenced limited live trials of an enterprise app which depends on a number of lookup tables built by a combination of Delphi exe's and T-SQL scripts. These tables need to be rebuilt weekly, and it's becoming a bit of a pain to run all the table builders manually.

I would like to construct a stored procedure in SQL Server 2005 to do all of these tasks, including kicking off the remote (Dephi) exe's. Can I do this? If so, is there a way to make the stored procedure wait until a given external program has finished executing before proceeding to the next block of code?

Thanks for any suggestions!

.