Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Article: Application Locks (or Mutexes) in SQL Server 2005

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2008-01-07 : 11:26:21

Application locks aren't a well known area of locking in SQL Server, but they can be very useful for special
scenarios. They work in a analogous way to the lock() construct in .Net and
are basicaly user defined mutexes in SQL Server.




Read Application Locks (or Mutexes) in SQL Server 2005

kim98074
Starting Member

1 Post

Posted - 2009-08-28 : 19:36:24
Very good article. Very useful. I found that sp_getapplock will NOT work within a dotnet System.Transaction - even if it is also within a SQL transaction. It took me a while to figure that out.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2010-11-24 : 16:29:33
define won't work. the sp_getapplock lock does NOT lock data. only blocks of code.

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.9 out!

SQL Server MVP
Go to Top of Page
   

- Advertisement -