Henry B. Stinson (1/14/2013)
Two problems I see right off:
1. You may not want isolation level serializable for the whole package. That may cause unnecessary blocking in other processes.
I suppose you are rigth , I should be enough to set isolation level serializable for the single components
2. if the data flow fails, the semaphore is not released.
If the data flow fails, the semaphore is released . The semaphore is designed in such a way, that cannot remain unreleased if the session terminates
The semaphore is acquired by putting a lock on a row :
select * from drop_fi_semaforo with ( rowlock, UPDLOCK, holdlock) where Uno = '1'
There is nothing to commit or rollback , since data are not modified .
If the session is terminated, the lock is released, the DBMS takes care of it