Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
BackSpace
Starting Member
1 Post |
Posted - 2009-03-25 : 18:24:09
|
Dear,I've a problem... Does anyone has experience with the locking problems? You can 'kill' a process everytime but is it safe (I use it in combination with sp_who, sp_who2, sp_lock)? Does anyone give me info how to avoid locked processes or locked users? Is there a script available who can do this automatically for you?Kind regards, |
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2009-03-26 : 03:58:15
|
SELECT host_name,request_mode,last_request_start_time,resource_type, resource_descriptionFROM sys.dm_tran_locks INNER JOIN sys.databases ON sys.dm_tran_locks.resource_database_id =sys.databases.database_id INNER JOIN sys.dm_exec_sessions ON sys.dm_exec_sessions.session_id=sys.dm_tran_locks.request_session_id WHERE resource_type <> 'DATABASE'--AND request_mode LIKE '%X%'AND name ='YOURdatabase'http://www.sql-server-performance.com/tips/reducing_locks_p1.aspx |
 |
|
|
|
|