I have trouble to update some rows in SQL Server (2005 and 2008).
Often, when I try to update one row while having a running query (select * from thistable),
I start the update command and it will fail due to a timeout/lock issue.
It only appears on tables with nvarchar(max)/text columns!
Even if I try to SELECT * FROM thistable WITH(ROWLOCK), I do encounter the same problem.
So my basic question here is:
Can I motivate SQL Server NOT to lock more than the actual row ?
Edit: I first run the SELECT afterwards I try to UPDATE…
There is a great explanation on Locking in SQL-Server on simple talk
Try using:
for your select statement.
Then run your update as normal.