What is the best approach for overwritting data in a table that users are accessing?

Hi Experts.

I am trying to overwrite data in a production table that is accessed by users at the time. What is the best approach to accomplish this? what are the best practices?

Thanks in advance.
devguru001DevAsked:
Who is Participating?
 
Phillip BurtonDirector, Practice Manager and Computing ConsultantCommented:
I think best practice is to ensure that the locks are as minimal as possible, both hen users are accessing the data and when you are writing it.
 
It may be that you need to consider to READ UNCOMMITTED or NOLOCKfor example. This web link shows that no shared locks are issued or exclusive locks are honored.
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
A simple UPDATE command should do it but don't forget that if the user is viewing the data at the same time that it will need to be refreshed or else it will deal with old data.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.