• This is a typical concurrency issue that you often find in 'normal' programming. Just copycatting the semaphore or mutex idea from there, I would construct a table containing one record for each concurrency limited resource.

    For each procedure you want only a limited number of instances to run, you add one to the value when you start the procedure and subtract one when it completes.

    Before running the procedure, you have to check if the value is not over the maximum threshold.

    Of course, you still have to provide for the proper locking control over this record, but you can get away with row level locking for this one. And obviously, if you have more procedures, you just add more records, one for each such procedures.

    Seems like a nice little project for the 'Scripts' section...