Solved

SQL transaction level settings

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
I have a large data set and a SSIS package. How can I load this file in multi threading?
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

920 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

13 Experts available now in Live!

Get 1:1 Help Now