EnumLocks List

SQLServer Object

Description

Lists the locks held by a SQL Server process. List is returned in a QueryResults object.

Visual Basic

QueryResults = SQLServer.EnumLocks ( [[WhoByID :=] lProcess] )

C++

HRESULT pSQLServer->EnumLocks (
LPSQLOLEQUERYRESULTS*
ppQueryResults,
long
lProcess = -1 );

Elements

Element Type Description

QueryResults QueryResults Returned QueryResults object
lProcess Long Process

QueryResults

ColumnName ColumnType

spid SQLOLE_DTypeInt2
locktype SQLOLE_DTypeChar
tablename SQLOLE_DTypeChar
page SQLOLE_DTypeInt4
dbname SQLOLE_DTypeChar

Reference

sp_lock