Solved

SQL transaction level settings

Posted on 2008-10-27
4
198 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 76

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 76

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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now