SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

ph1long
Starting Member

16 Posts

Posted - 02/01/2013 :  15:05:00  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
6059 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
TG
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.04 seconds. Powered By: Snitz Forums 2000