What is the column Lockpid in the AcuLocks table?

0 Likes

PROBLEM

In the AcuLocks table, the column Lockpid contains the SQL Server Process ID or SPID which is locking
a record. How can the owner of the Lock be determined ?

RESOLUTION

If SQL Server 2012 is running, then open the SQL Server Management Studio.

On the left hand side in the 'Object Explorer' right click on 'Activity Monitor'.

This displays all the current processes running on the server.

Other methods:-

 

  1. Open 'New Query' and type 'sp_who2', This gives the same display as the 'Activity Monitor'. Each process shows the 'SPID' with information including the Login and Host Name. Match the LockPid to the process running that has the matching SPID.
  2. Execute the stored procedure 'sp_who'. This gives the spid, username and hostname of every connection. Reference the spid associated with the lock.

For more information, execute this statement:

select * from sysprocesses where spid = nn

This will give the username, hostname and the host process ID of the process matching the argument.

Comment List
Related
Recommended