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 |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2015-01-26 : 05:20:36
|
Hello,User1 runs a program which does alot of insert into table1 from views...user2 at the same time as User1 tries to run select * from table1 but User2 does not get any data because table1 seems to be locked by User1.Is there a special sql I can use to avoid this?Thanks |
|
sz1
Aged Yak Warrior
555 Posts |
Posted - 2015-01-26 : 09:02:00
|
Have you looked at NOLOCK, WITH (NOLOCK) is the equivalent of using READ UNCOMMITED so it can be bad for dirty reads, it depends what you are trying to achieve.it should be used carefully if at all.We are the creators of our own reality! |
|
|
viggneshwar
Yak Posting Veteran
86 Posts |
Posted - 2015-01-28 : 03:17:30
|
NOLOCK will return the uncommited records too. So decide as per your business requirement and then use the nolock.RegardsViggneshwar A |
|
|
|
|
|