Detect a program running

  • I need to be able to detect that a program is running from a sql job/dts and post the run times (begin / end). This process will be used for multiple processes, therefore I need a generic call to execute. I don't want to add code to existing programs and cause recompiles of them.

  • What type of program? Something in SQL or something on the server?

    Steve Jones

    steve@dkranch.net

  • I need to detect several vb .exe programs running on a sql server that update various databases on a nightly basis.

    Jody

  • Do the VB programs mark the times? If not, I do not know how you will get this. There are some process utilites at http://www.sysinternals.com that can help you find which processes are running.

    Steve Jones

    steve@dkranch.net

  • What do the applications do. You can use the profiler to log the interactions with the database.

    You can set a task running which monitors sysprocesses for created and destroyed connections.

    If you don't know what the apps do or they don't do something specific at start and end then I don't think it will be easy.

    Usually you get an app to log when it starts and ends.

    How are the apps started - can you put a shell around them that logs the app start and end?


    Cursors never.
    DTS - only when needed and never to control.

  • Using api, it's possible to search by class id or app name. A lot of times the window caption is a good one to look for. I think the api is findwindow. How about just running the apps from xp_cmdshell, that way you'd know when they were running by checking the job state/history?

    Andy

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply