Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2003
    Posts
    294

    Lightbulb Unanswered: locks with select

    Hey I have a terrible problem !!

    I have a query, and It doesn't matter if it has finished, the table is still locked. Is there any clause to unlock the share mod lock (force) when the query has finished or any way to ensure that table has no locks to continue with another query or transaction ?

    Could you give me any sentence ?

    Thanks you !!

  2. #2
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Also, see if there are any open transactions in your database, or in tempdb if your query references temporary objects:
    DBCC OPENTRAN('<your_database>')
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  3. #3
    Join Date
    Jun 2003
    Posts
    294
    Is there any way to turn the data base in optimistic mode, or to execute that in optimistic mode ???

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Yes.

    -PatP

  5. #5
    Join Date
    Jun 2003
    Posts
    294
    Well, but I have a concurrency problem: Update sentence has been thrown while a select is being executed (of the same table), so the select is locking the update, and the query takes a lot of time, what I want to do, is to execute the query and not to wait a long time to be able to execute the update sentence, guaranteeing that I won't have many transactions stuck, and guaranteeing the resulset (of the query) won't have uncommited data.

    Any Suggestion ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •