Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 2.09 KB

File metadata and controls

37 lines (29 loc) · 2.09 KB
title Changes to behavior in syslockinfo and sp_lock | Microsoft Docs
ms.custom
ms.date 06/13/2017
ms.prod sql-server-2014
ms.reviewer
ms.technology database-engine
ms.topic conceptual
helpviewer_keywords
syslockinfo
sp_lock
ms.assetid b9892ae3-ac15-48be-8b52-78dbed6467ed
author mashamsft
ms.author mathoma
manager craigg

Changes to behavior in syslockinfo and sp_lock

syslockinfo and sp_lock may return unexpected values. They may also return additional rows, whereas previous versions of syslockinfo and sp_lock returned a maximum of two rows per lock resource.

To access information from syslockinfo or execute sp_lock requires VIEW SERVER STATE permission on the server.

Component

[!INCLUDEssDE]

Description

In [!INCLUDEssVersion2000], the rsc_objid and rsc_indid columns in syslockinfo and the objid and indid columns in sp_lock consistently return the object ID and index ID. In [!INCLUDEssVersion2005], a value of 0 may be returned.

In [!INCLUDEssVersion2000], syslockinfo and sp_lock return a maximum of two rows for any given lock resource in a single transaction. Starting with [!INCLUDEssVersion2005], when lock partitioning is enabled, multiple rows for the same resource running under one transaction may be returned. There may be up to N + 1 rows returned, where N is the number of CPUs. Also, it is now possible to have GRANTED and WAITING requests displayed for the same resource, which was not possible in [!INCLUDEssVersion2000].

Permissions

Requires VIEW SERVER STATE permission on the server.

See Also

Database Engine Upgrade Issues
SQL Server 2014 Upgrade Advisor [new]