I need to implement a tool that runs programs from SQL Server database when a DB record matches some condition. Is there a way to do it?
I would be careful with xp_cmdshell because it can create quite a security hole. Check out this article from http://www.databasejournal.com/features/mssql/article.php/3372131/Using-xpcmdshell.htm
If the service account has local administration rights then you can use this procedure to perform any windows operating system command.
Check out this similar question I asked some time ago. After some research I decided the security risk was too great for a production DB server. Your situation might be different and xp_cmdshell might be the answer. SQL Server xp_cmdshell
2.1m questions
2.1m answers
60 comments
57.0k users