Need Blocking script

  • Does anybody have a script that will generate a block in a database. I need to it so I can test a blocking template in profiler.

    TIA,

    Philip

  • In query analyzer start 2 sessions.

    Session 1:

    begin transaction

    update some_table set some_column = some_value

    Session 2

    Select * from some_table.

    Session 2 is blocked by session 1.

    Rollback the transaction when you complete the testing.

    Thanks Tom.

  • Thank you. It's working

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply