1

I'm using SQL 2000 for my application. My application is using N tables. My application has a wrapper for SQL server called Database server. It is running as a 24/7 windows service.

If I have checked the integrity check option in the SQL maintenance plan, when this task is running one time after that one of my tables has been locked and it has been never unlocked. So my history of the database transaction has been lost.

Please provide your suggestion how to solve this problem.

1
  • Is this a continuing problem, or is it a one-time lock that has never been released? The CHECK INTEGRITY maintenance plan step locks the database exclusively, which can cause contention issues. If you have SQL Server Enterprise, it can do operations like this while remaining online, but Standard is not as good at sharing. Commented Jul 24, 2009 at 4:32

1 Answer 1

1

What if you have a client-side command timeout? And the locks are your own locks as a result of the DBCC?

Your code will timeout waiting for the DBCC to finish, but any locks it's already issued are not rolled back.

A command timeout tells SQL Server to simply stop processing. To release locks you need to either ROLLACK on the connection or close the connection.

Options:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.