Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Anton Shepelev Newsgroups: comp.databases.ms-sqlserver Subject: Re: Using sp_getapplock outside a transaction Date: Sat, 25 Nov 2017 21:13:02 +0300 Organization: Aioe.org NNTP Server Lines: 17 Message-ID: <20171125211302.4e22ff4f9d06e890a9494fc9@gmail.com> References: <20171125145629.a8f9f75371e03662bf0496dd@gmail.com> <20171125182411.7cc99cc41acef664ea224b1c@gmail.com> <61564775-2d20-45eb-bb52-ad5f420e569d@googlegroups.com> NNTP-Posting-Host: Bi9VZxU/8bdAeaqLIY+52Q.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Sylpheed 3.5.0 (GTK+ 2.24.23; i686-pc-mingw32) Xref: csiph.com comp.databases.ms-sqlserver:1983 rja.carnegie: > While replying, I noticed that sp_releaseapplock > takes @LockOwner as well. So perhaps that needs > to be set to 'session' there. Ah, that's it. > In one session you will be allowed to lock the > same "resource" several times, because it is the > same session locking it. Then per-transaction locks are the thing me. Thank you. -- Anton Shepelev