Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_releaseapplock

  No additional text.


Syntax
create procedure sys.sp_releaseapplock --- 1999/04/14 00:00
 @Resource nvarchar (255) = NULL,	    -- Resource to unlock
 @LockOwner varchar (32) = 'Transaction',   -- Lock Owner - [D = Transaction]
 @DbPrincipal sysname = N'public'	    -- DB principal to use for name space and permissions
as

  declare @owner integer
  declare @result integer
  declare @dbid integer

  select @owner =
	CASE @LockOwner
	 When ('Transaction')   Then 1
	 When ('Session')       Then 3
	 Else -1
	END

  if @owner = -1
  begin
    raiserror(15625, -1, -1, @LockOwner, N'@LockOwner')
    return (-999)
  end

  select @dbid = db_id ()

  exec @result = sys.xp_userlock 1, @dbid, @DbPrincipal, @Resource, 0, @owner

  return @result

 
Last revision 2008RTM
See also

  sp_checkinvalidivarticle (Procedure)
sp_mergemetadataretentioncleanup (Procedure)
sp_MSacquireSlotLock (Procedure)
sp_MSadd_repl_job_unsafe (Procedure)
sp_MSagent_retry_stethoscope (Procedure)
sp_MSallocate_new_identity_range (Procedure)
sp_MSget_partitionid_eval_proc (Procedure)
sp_MSissnapshotagentrunning (Procedure)
sp_MSreleasedynamicsnapshotapplock (Procedure)
sp_MSreleaseFixPALRoleAppLock (Procedure)
sp_MSreleasemakegenerationapplock (Procedure)
sp_MSreleasemergeadminapplock (Procedure)
sp_MSreleaseMergeUpgradeSubscriberAppLock (Procedure)
sp_MSreleaseSlotLock (Procedure)
sp_MSreleasesnapshotdeliverysessionlock (Procedure)
sp_MSrepladdproxyaccount (Procedure)
sp_MSrepl_helparticle (Procedure)
sp_MSsetupnosyncsubwithlsnatdist (Procedure)
sp_MStrypurgingoldsnapshotdeliveryprogress (Procedure)
sp_replmonitorsynchronize (Procedure)
sp_resetsnapshotdeliveryprogress (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash