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 |
|
binto
Yak Posting Veteran
59 Posts |
Posted - 2010-04-19 : 08:27:42
|
| Hi All,can I use 'WITH NOLOCK' while inserting into a table.Please help me,how can I manage Table Lock when insertion and reading are simultaneousely done on a tableThanks & RegardsBinto Thomas |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2010-04-19 : 08:34:27
|
| NO!Nolock is only useful when you are writing reporting queries and you are least bothered about real-time data. While inserting/updating you generally would not have to worry about locking since SQL server does good job of managing that.Harsh Athalyehttp://www.letsgeek.net/ |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2010-04-19 : 08:34:36
|
| u can't use the WITH(NOLOCK) in the insert,update,delete statementused for the select statementsselect * from tablename WITH(NOLOCK) |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-04-19 : 08:44:51
|
| See my reply to your other post:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=143180 |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2010-04-19 : 09:14:50
|
| Besides, nolock is not a silver bullet. It has downsides. See - [url]http://sqlblog.com/blogs/andrew_kelly/archive/2009/04/10/how-dirty-are-your-reads.aspx[/url]If you want to be able to read and insert concurrently, consider the snapshot isolation levels--Gail ShawSQL Server MVP |
 |
|
|
|
|
|