How can I execute an exe-file from an SQL command?
Or how I do thie from SQL-Server? Something like a
trigger, but to execute a exe-file, not a stored procedure.
Printable View
How can I execute an exe-file from an SQL command?
Or how I do thie from SQL-Server? Something like a
trigger, but to execute a exe-file, not a stored procedure.
Hi
Refer to 'sp_runtask' and 'SQL Executive' documentation.
With 'sp_runtask' you can execute a previous created 'SQL Executive Task' that can be a 'CmdExec'.
HIH
exec @ret_status = master..xp_cmdshell 'name of your program'
Example: xp_cmdshell 'copy c:\file.txt d:\bkup\file.txt'
This will display the result from the program/DOS Command as a result-set. It returns the exit code of the program.