Skip to main content

Posts

Showing posts with the label SQL Server 2000

LOCK in SQL Server

In SQL Server 2000 (Enterprise Manager) 1. Expand server – management-current Activity-expand Locks/processid and you will be able to see all the locks related information. 2. Expand server – management-current Activity-expand Locks/object you can see locks by object information. In SQL Server 2005 (SSMS, object Explorer) Expand-server-management-double click Activity Monitor. On left side you have three options to choose from, select those options and you can see all the locks related information. Run this stored procedure in the database. 1.  sp_lock To know the running process in the sql server, run this query, 2. select * from sysprocesses (in sql server 2000) 3. select * from sys.sysprocesses (in sql server 2005) 4. sp_who 5. sp_who2 will also give you some good information. To work around the locks, you can run profiler to check which query is creating a lock and if that is necessary. Types of locks on object level, (general idea) Database : Database....