I'm getting very poor performance on a stored procedure that does well over a hundred (!) updates to a couple of very small tables and it appears that all the concurrent users are constantly blocking each other.
A full rewrite of the proc is scheduled for later this year, but in the meantime I wanted to see if we can alleviate the problem by forcing row-level locking on each of the affected tables.
On Sybase, you can (or at least could circa 2007) force row-level locking for a table using this statement:
alter table titles lock datarows
On SQL Server, it appears that the only way to get the same effect, is to use WITH (ROWLOCK) on every update or insert statement. And even then, it's only a hint that may be ignored.
Is there a way in SQL Server to force (or strongly favour) row-level locking for all updates to a given table?