SQL Server Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 624 Page Views: 

What is the purpose of sp_lock?



Posted By: Avi Date: 1 October 2010 11:37:07 AM
 Answer:

sp_lock is a stored procedure which returns the detailed information regarding the locks. The following values are returned with the use of sp_procedure:- 1. SQL server process ID i. Spid 2. Database Identification Number which have requested the lock. i.e DBid 3. Object Identification Number i.e Objid 4. Index Identification Number i.e. IndId 5. Mode of Lock i.e Mode 6. Type of Lock i.e. Type The Mode will specify whether the Lock is Shared(S) or Exclusive(X) or Update(U) or Intent Shared(IS),Intent Exclusive (IE) or Shared with Intent Exclusive lock(SIX). The Type give the details of the resources which are locked such that whether the Table is locked(TB) or Entire Database (DB) or Row Identifier(RID) or Page(PAG).


Posted By: avibtech


Date: 1 October 2010 11:37:07 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image 5dD9ii
Related Questions
SQL Server : How will you currently installed service pack of the SQL Server?

How will you currently installed service pack of the SQL Server?

With the help of @@version one can determine the Service pack installed on th SQL Server. For this y....
Category: SQL Server Date: 10/1/2010 12:01:08 PM
SQL Server : Specify the ways which can be used to move data or databases between servers?

Specify the ways which can be used to move data or databases between servers?

Lots of options exists to move the data or databases. Depending on our requirements we can opt for t....
Category: SQL Server Date: 10/1/2010 12:00:08 PM
SQL Server : What does RAID mean ?

What does RAID mean ?

RAID is an acronym for "Redundant Array of Independent Disks". It is used to provide fault....
Category: SQL Server Date: 10/1/2010 11:59:08 AM
SQL Server : The file got corrupted . How can I retrieve the data from log files in SQL Server?

The file got corrupted . How can I retrieve the data from log files in SQL Server?

There are no specific commands or methods in SQL server to retrieve the data from the log files. Som....
Category: SQL Server Date: 10/1/2010 11:58:08 AM
SQL Server : While updating some rows there is some sort of failure such as power failure. So what will be the state of data?

While updating some rows there is some sort of failure such as power failure. So what will be the st....

There will be no changes done since commit operation was not performed. It will be in the last commi....
Category: SQL Server Date: 10/1/2010 11:57:08 AM