Go Premium for a chance to win a PS4. Enter to Win

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

SQL transaction level settings

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
angupta
Asked:
angupta
  • 2
1 Solution
 
arnoldCommented:
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
 
rpkhareCommented:
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
 
anguptaAuthor Commented:
These automated processes are writing data back to the database using transactions.
I am using sql server 2005
0
 
arnoldCommented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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