• Thank you! This is a very interesting concept. We have been using various "tricks" with empty file getting created at the end of one process and then checking for existence of this file (in SSIS loop) at the beginning of the next process.

    I would like a bit more explanation and maybe a usage example. They way I read it, I need to do something like this (over-simplifying):

    Process 1:

    EXEC spGetAppLock @p_Resource = 'MyResource'

    -- Do some work here

    EXEC spRelAppLock @p_Resource = 'MyResource'

    Process 2:

    EXEC spGetAppLock @p_Resource = 'MyResource'

    -- Do some work here

    EXEC spRelAppLock @p_Resource = 'MyResource'

    This way if Process 1 began first, Process 2 would wait until 'MyResource' is released. Am I understanding it correctly?

    Also, how do you use it when Processes run on multiple servers? How do I access 'MyResource' on the first server from the second server?