My stored procedure is like this.
Im maintaining a RowVersion in Table A.
- Starts Transaction
- Read RowVersion from Table A rw1
- Some Calculations
- Read RowVersion from Table A as rw2
- Update Some Tables including Table A
Currently im using READ COMMIT as Isolation Level But When its updating Table A RowVersion is also changing.
Goal : when two or more users logged in to system and press a button at same time (which will execute this SP) first one only execute the SP and not allow other one to execute