title: Run executable from SQL Server
body: <p>I have been stuck on a research on running an external exe file. What I have so far found was it can be done using 
  this:</p>
  
  <pre><code>EXEC master..xp_cmdshell '"C:\New Folder\test.exe"'
  </code></pre>
  
  <p>And also this must not be directly called in a trigger because it has to wait until the execution is done to complete the trigger.</p>
  
  <p>So the encouraged approach for this is to have a scheduled job to poll for the table and call the .exe file from there to without creating any performance issues. So far I have accepted it and working on it. </p>
  
  <p>So, before trying on this I am working on each part that has to be learned before implementing.I am testing the above piece of code keeping the database as master.
  I have tried several more.</p>
  
  <pre><code>EXEC master..xp_cmdshell '"C:\New Folder\r.rar"'
  
  EXEC master..xp_cmdshell '"C:\New Folder\text.text"'
  </code></pre>
  
  <p><strong>So, I am thinking of this xp_cmdshell as a normal command prompt. I was expecting to be visible the exe file opening and opening of the tet file and the rar file. But its not working.</strong> </p>
  
  <p>I have given the above details to tell my approach, Please give me a feed back if you have a better approach in your earlier experiences. Thanks in advance.</p>