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.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Xp_cmdshell to run .exe with SQL values

Author  Topic 

ph1long
Starting Member

16 Posts

Posted - 2013-02-01 : 15:05:00
Hi,

If I have a table called "inputvalues" with values 1,2,3. Am I able to execute a .exe with these values as arguments?

e.g. execute program.exe, 1,2,3

Thanks

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-02-01 : 16:52:49
sure, you can build a command string then execute with xp_cmdshell. But enabling xp_cmdshell is not best practice. For one good reason is it is a security risk.

Other options include SSIS, Job step, windows scheduled task, and of course a non-sql application that can read the imputs from the database or the registry.

Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -