Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 0.62 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. unable to open table in sql server
  2. Timeout Expired
  3.        
  4. Rename Failed Lock Request Time out Expired
  5.        
  6. exec sp_lock
  7.        
  8. USE master;
  9. GO
  10. ALTER DATABASE db SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
  11. GO
  12. USE db;
  13. GO
  14. --DO YOUR WORK HERE
  15. GO
  16. ALTER DATABASE db SET MULTI_USER;
  17.        
  18. select DB_NAME(1)
  19. select OBJECT_NAME(1131151075,1)
  20.  
  21. exec sp_lock
  22. -- locks for sesion 51
  23. exec sp_lock 51
  24.  
  25. select DB_NAME(dbid)
  26. select OBJECT_NAME(ObjId,dbid)
  27.  
  28. select * from sys.dm_tran_locks
  29.  
  30. select * from sys.dm_exec_connections
  31. select * from sys.dm_exec_sessions
  32. select * from sys.dm_tran_active_transactions
  33. select * from sys.dm_tran_database_transactions