![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
-> Description (short): <------------------ stored procedure calling sub-procedure with updlock select. How could I release the updatelog if sub-proc is finished (calling proc still running)? MS SQL Server 2000. |
|
Under no circumstances two users should ever get the same token. |
|
The file structure, fields or logic of table B cannot be modified by me. |
#3
| |||
| |||
|
|
Mark Schneider (Mark.Schneider (AT) dexag (DOT) at) writes: -> Description (short): <------------------ stored procedure calling sub-procedure with updlock select. How could I release the updatelog if sub-proc is finished (calling proc still running)? MS SQL Server 2000. Locks are held until the transaction is committed. Thus, you need to break up the transaction in two, if you want to release the UPDLOCK. At the same time: Under no circumstances two users should ever get the same token. That is a big challenge. Not the least: The file structure, fields or logic of table B cannot be modified by me. You could perform SAVE TRANSACTION before calling procB and then rollback after the call. That might release the lock. But can you then guarantee that a concurrent user gets the same token? Most likely he will, depending on how procB is implemented. Since I don't see the code, I cannot say with certainty that it's im- possible. But it sounds like an uphill battle. -- Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx |
![]() |
| Thread Tools | |
| Display Modes | |
| |