Solved

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

Posted on 2015-02-24
2
46 Views
Last Modified: 2015-03-03
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
Comment
Question by:devguru001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 250 total points
ID: 40627815
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
 
LVL 50

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 250 total points
ID: 40627910
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question