Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
vijays3
Constraint Violating Yak Guru
354 Posts |
Posted - 2010-06-17 : 05:33:43
|
| Hi,I have created script to check blocking and i want to test it on my local machine (home machine) which is not connected to any domain or Lane. can someone tell me the script in which two process should perform operation on one single table like update and insert simaltanously so that when i run my script i should get the result...ThanksVijay |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-06-17 : 05:43:27
|
| Script 1:BEGIN TRANSACTIONUpdate SomeTable SET SomeColumn = SomeColumn+'' -- assuming varcharScript 2:SELECT * from SomeTableRun script 1 first, then script 2. It will be blocked until you go to script 1 and run either a commit transaction or rollback transaction.--Gail ShawSQL Server MVP |
 |
|
|
|
|
|