0

I have a very small table in my database with only one row in it. When I do select statement on it, my query always times out. I have tried following things:

  • Conecting/disconnecting from the database server
  • doing select * from table(nolock)- which works fine and also proves that there is some lock on the table

However, How can I remove the lock from the table and how can I know what is holding the table captive? Also, I am not sure how does this lock survive the disconnection from the database server?

Lost
  • 12,007
  • 32
  • 121
  • 193
  • 1
    (unlock) is NOT a valid query hint. You mean to say NOLOCK. The lock is not from your connection but another connection. There is another connection somewhere that has the table locked. – Sean Lange Jan 20 '15 at 19:59
  • Yes, it is nolock. I am sorry for the confusion. Also, yes there was another connection from my code which was open. Thank you so much for the hint. – Lost Jan 20 '15 at 20:01
  • Cool glad you found it. – Sean Lange Jan 20 '15 at 20:22

0 Answers0