Solved

SQL transaction level settings

Posted on 2008-10-27
4
204 Views
Last Modified: 2012-05-05
Hello,

Thanks in advance.  We just switched to a new ERP platform that uses JDBC to connect to a sql server 2005 database.  We are experiencing some intermittent lockup issues that affect users since they become a deadlock victims.  This is primarily becuase we are running some automated processed during production hours.  We can shift these processes to non production hours however some times there are not enough hours to complete these processes.  Right now the database setting for using transactions is set to "Read Committed"  I was wondering if changed this to some other more tolerable setting to reduce lokups what are the real risks.  I am aware of dirty reads which may result in transactional inconsistencies.  Can anybody share their real life experiences with the various settings related to transaction settings?  It will be greatly appreciated.
0
Comment
Question by:angupta
  • 2
4 Comments
 
LVL 77

Expert Comment

by:arnold
ID: 22818855
What are the "automated processes" that you are running?  What is the cause of the lockups?  If the automated process do not alter data in the database, using the snapshot method may be beneficial. i.e. you create a snapshot from the current state of the database and run your automated process on the snapshot.
Creating a view that may speed up the automated processing mechanism might be an option.
0
 
LVL 8

Expert Comment

by:rpkhare
ID: 22819562
What about Snapshot Isolation? Which version of SQL Server you are using?
Please refer these:

http://msdn.microsoft.com/en-us/library/ms345124.aspx
http://www.devx.com/codemag/Article/21570
0
 

Author Comment

by:angupta
ID: 22820424
These automated processes are writing data back to the database using transactions.
I am using sql server 2005
0
 
LVL 77

Accepted Solution

by:
arnold earned 500 total points
ID: 22822874
Are the transactions that are being written into the database change data that is part of the automated process?
i.e. step 1: get a set of data from tablea.
Step 2: update records in tablea.
step 3: get data from tablea and tableb
Or the database changes have no impact on the next step.

If possible, breaking down the automated process into several automated processes that could run at different times might reduce the impact.

Is the purpose of the automated process to sum up columns into another column?
Is adding a trigger an option to handle part of the automated process?
Everything depends on what is causing the delay.  I.e. the write transaction in the automated process at times could take a rather long time to process and at times might fall through requiring a roll back. Under most conditions the transaction takes 3 seconds to process, but there is that rare occasion where all the conditions fall into place where the transaction falls through after 20 seconds and requires an extra 5 seconds to roll back.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

777 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