Hi. I am writing a stored procedure that will run through a cleanup algorithm, cleaning up records in the tables and whatnot. We have a network of servers that could be making calls against the SQL database at any time, and we don't want some of these processes to make database calls while the stored proc. is running. I can stop new processes from starting by setting a flag in a table in the database once the procedure starts, and setting the trigger that creates these processes to check the flag first. But I need to wait for any currently running tasks to finish before the stored procedure actually starts altering data. I can create an application on one of the remote servers, that should be able to tell me if any of the processes I am worried about are currently running. Which finally brings me to my question...
How can I call an application, COM object, script, whatever, that is running on a different server, from within a stored procedure on the SQL Server? By the way, the stored procedure will be scheduled through a SQL Agent.
Any ideas?
How can I call an application, COM object, script, whatever, that is running on a different server, from within a stored procedure on the SQL Server? By the way, the stored procedure will be scheduled through a SQL Agent.
Any ideas?