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 2000 Forums
 SQL Server Development (2000)
 How to call an exe from SQL Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-11-09 : 07:11:04
Saravanan writes "Hi,
How to run an exe file from SQL Server. I know there are two ways to do it.
1. Using xp_CmdShell
2. Using DTS creating execute process task.

Is there any other method to do that. Please help me.

Thanks,
Saravanan."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-11-09 : 07:12:30
Create a job, add an Operating System step, and put the name of the EXE file in that step. You'd then run the job using the sp_start_job procedure, see Books Online for more details.

You can't just run any EXE file. It cannot have a graphical interface or require any user interaction, and must terminate by itself. Otherwise it will remain open and possibly hang your SQL Server.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-09 : 07:25:34
See if you find some scripts here
www.sqldts.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -