Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2007
    Posts
    4

    Unanswered: lock table for queries with query WAITFOR

    Hi all.

    How can I lock table with longtime query?

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    why?

    this message is too short.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Feb 2007
    Posts
    4
    I am in need

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    I am in need of a large type breakfast, a night cap and 4 more hours in the bed.

    What I was aking you, is why do you want to lock a table for the length of the execution of a query. The default locking scheme in sql server is adequate for 99% percent of situations.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    perhaps OP is looking for a way to force timeouts or deadlocks as part of a test plan?

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by Thrasymachus
    I am in need of a large type breakfast, a night cap and 4 more hours in the bed.

    What I was aking you, is why do you want to lock a table for the length of the execution of a query. The default locking scheme in sql server is adequate for 99% percent of situations.

    I am in the need for an eye-opener
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by jezemine
    perhaps OP is looking for a way to force timeouts or deadlocks as part of a test plan?
    yeah, I do not hand out loaded guns unless there is justification.

    Quote Originally Posted by Brett
    I am in the need for an eye-opener
    in a couple of hours we can all get back down to the serious business of poisoning our minds and bodies.
    Last edited by Thrasymachus; 09-13-07 at 16:25.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    In a couple of HOURS?

    Damn, it's gotta be 5:00 somewhere
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  9. #9
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quote Originally Posted by Brett Kaiser
    Damn, it's gotta be 5:00 somewhere
    Hallelujah!
    George
    Home | Blog

Posting Permissions

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