free_semaphore

This procedure is a special case. Create the preocedure in the master database and make it a startup procedure by running

sp_makestartup free_semaphore
This will prevent an eroneous semaphore state in the event of a system crash by making all semaphores available to any requestor.

IF EXISTS (SELECT * FROM sysobjects 
           WHERE id = OBJECT_ID('dbo.free_semaphore') 
           AND sysstat & 0xf = 4)
	DROP PROCEDURE dbo.free_semaphore
GO

CREATE PROCEDURE free_semaphore
AS
UPDATE semaphore
SET status=0
GO