I would like to know more about the internal behavior of a sql_server.
My problem is that I’m trying to create a multi-user data base but I’m experimenting concurrency data problems.
As an example:
- UserA opens an application and modifies something in the tableA without committing.
- UserB opens also the application and tries to read the tableA too.
- UserB is blocked until userA commits
My questions are:
- How can I resolve that?
- Isn’t there a way for giving the userB old information, letting him know that the information is old?
Don’t write applications that do this. No application should hold locks for the duration of user actions. Editing a form should not lock the data. Read about Optimistic Concurency.
Application will still block occasionaly and the best approach is to deploy row based versioning, aka. SNAPSHOT ISOLATION. See Understanding Row Versioning-Based Isolation Levels.