locked
SQL Server Jobs calling a Windows Service RRS feed

  • Question

  •  

    Does anyone know if it is possible for a SQL Server Job (SQL 2005) to call a Windows Service? If so, how might that be done? Basically we want to create a Windows Service on our SQL server that can be called by some SQL Server jobs we have to perform some work.

     

    Thanks very much.

    Friday, June 6, 2008 9:08 PM

Answers

  • Are you sure that's what you want to do? A Windows Service usually runs always and executes certain inner functions a an interval. You usually don't all a service, because it's always running.

    It seems like you just want to call an executable or batch file to run some code. And have that SQL Job call the executable to do whatever you need done.

    Or do you mean a Web Service?
    Friday, June 6, 2008 10:24 PM

All replies

  • Are you sure that's what you want to do? A Windows Service usually runs always and executes certain inner functions a an interval. You usually don't all a service, because it's always running.

    It seems like you just want to call an executable or batch file to run some code. And have that SQL Job call the executable to do whatever you need done.

    Or do you mean a Web Service?
    Friday, June 6, 2008 10:24 PM
  • Jim,

     

    You bring up a good point. I hadn't really thought that through. You are correct that a Windows Service is always running and isn't something you call per se. Thanks for the clarification. I need to rethink what I want to do.

     

    Amos

     

    Friday, June 6, 2008 10:39 PM