[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 57
  • Last Modified:

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.
0
devguru001
Asked:
devguru001
2 Solutions
 
Phillip BurtonCommented:
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now