Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Xp_cmdshell to run .exe with SQL values
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

16 Posts

Posted - 02/01/2013 :  15:05:00  Show Profile  Reply with Quote

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


Flowing Fount of Yak Knowledge

6065 Posts

Posted - 02/01/2013 :  16:52:49  Show Profile  Reply with Quote
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000