August 25, 2004 at 10:14 am
I seem to be getting locked when i try to do a select on a table that been updated /inserted by another user. Is there a way i can explicitely say the table to be shared for read puproses when it is updated/inserted. Can anyone shed some light on this.
TIA
August 25, 2004 at 10:25 am
Use lock hint (nolock) in your select statement.
August 25, 2004 at 10:34 am
Thanks Allen,
Can this lock be used in insert/update statements. If so can you pl jott down the consequences/impact of this too.
Thanks
August 25, 2004 at 11:32 am
No. SQL Server will place exclusive lock to the row or page or even database when it does insert/update.
August 26, 2004 at 7:53 pm
Try this dude,
Let's say someone inserted or updated a table called TmpTable, and you want to select from that table.
You can try to issue a Select statement with the keyword (NOLOCK).
Here is the sample,
SELECT * FROM TmpTable WITH (NOLOCK)
WHERE blah~~~
Hope it help.
August 31, 2004 at 3:04 am
Hi,
Just wondered what causes the lock ( that i'm interested in !!)
Wrong insert / update statement?
Howmany rows are involved?
How is your page handling ( pageiolatch )?
System - database specs?
etc etc.
Rather find out what had happened as creating a work arround !!
Please specify.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply