Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL transaction level settings

Posted on 2008-10-27
4
Medium Priority
?
210 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
[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
4 Comments
 
LVL 79

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 79

Accepted Solution

by:
arnold earned 1500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

705 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