transactions

why mysql queries takes table lock in isolation read uncommitted?

Is there any way to get mysql queries to not take any locks on myisam tables? My problem seems to be that my Sphinx Search indexer takes a lock on one of my myisam tables for over 60s which seem to make update statements wait on the locks to be released which in turn makes other queries wait for the update statements to complete. The i...

Debugging livelock in Django/Postgresql

I run a moderately popular web app on Django with Apache2, mod_python, and PostgreSQL 8.3 with the postgresql_psycopg2 database backend. I'm experiencing occasional livelock, identifiable when an apache2 process continually consumes 99% of CPU for several minutes or more. I did an strace -ppid on the apache2 process, and found that it w...

How do reduce transaction log growth for batched nvarchar(max) updates

Our app needs to add large amounts of text to SQL Server 2005 database (up to 1 GB for a single record). For performance reasons, this is done in chunks, by making a stored procedure call for each chunk (say, usp_AddChunk). usp_AddChunk does not have any explicit transactions. What I'm seeing is that reducing the chunk size from 100MB t...

how to set query to be read uncommited?

with hibernate, how can I set a query to be read uncommitted? I don't want this to be a global setting, just want to do it on a per query basis. ...

.NET Data Providers - How do I determine what they can do?

I have code which could be executed using a Provider that doesn't support transactions, or doesn't support nested transactions. How would I programmatically determine such support? E.g. The code below throws a System.InvalidOperationException on the final commit when using the MySQL .NET Connector, but works fine for MSSQL. I'd like t...

Maintain transaction on Linked server inside a stored procedure which uses OpenRowSet command to read data from Excel file

Hi, I have a Helper DB which is on 32bit sql server and i have added a linked server of 64bit, to perform Excel Import operation as Jet.oledb driver is not supported on 64-bit sql server machine. Everything is working fine, but i have to maintain transactions for insert ,update,delete that happens on linked server database, I have co...

Is it important to use InnoDB and transactions for an auction

I wanted to know how important it is to use InnoDB table and transactions for an auction website. I know that when there is payment involved the transactions are important, but in this case, there are only bids placed. The bids that are placed however are placed very quickly, maybe a few every second. I was wondering if i couldn't ju...

Transactions in C#

First of all, this will not be a post about Database Transactions. I want to know more about the TransactionModel in .NET 2.0 and higher. Since I am developing against .NET 3.5 newer models are apprechiated. Now, what I would like to acheive is something like the following public void Withdraw(double amount) { using (Tr...

.net TransactionScope Exception

My Code something like this try { using (TransactionScope iScope = new TransactionScope()) { try { isInsertSuccess = InsertProfile(account); } catch (Exception ex) { ...

Spring Annotations not working

I posted this to the spring forums, sorry for the xpost. I am new to spring. I am working on an existing project that uses spring 1.2.8 (old, I know), and java 1.5 so annotations should work. I am trying to use the @Transactional annotation on a concrete class, following the docs at: http://static.springsource.org/spring/docs/1.2.8/ref...

Is it safe to set MySQL isolation to “Read Uncommitted” (dirty reads) for typical Web usage? Even with replication?

I'm working on a website with typical CRUD web usage pattern: similar to blogs or forums where users create/update contents and other users read the content. Seems like it's OK to set the database's isolation level to "Read Uncommitted" (dirty reads) in this case. My understanding of the general drawback of "Read Uncommitted" is that a ...

Does ADO Entity Framework support non DTC transactions? Multiple queries inside one EntityContext and one TransactionScope is causing DTC promotion

I have a web application that uses the Entity Framework - we make use of the TransactionScope class to provide ambient transactions. Is there any way to tell EF to use a standard T-SQL transaction in preference to DTC transaction? Quite often we make a number of queries to different tables inside one EntityContext and one TransactionSc...

DTC transaction escalation

Hi, I am using TransactionScope. Within that scope, there are several different database connections. But all this connections on the same physical server and on the same Sql Server instance. The difference in connections is only in databases. Is this transaction will be DTC transaction? ...

set CONTEXT_INFO select context_info(), locking

Imagine a Table T that is used as follows: At time T0: SPID 1: begin transaction ... insert into T(...) values(...); ... commit; At time T1 SPID 2: begin transaction select * from T where C=cval; ... commit; Assume transaction isolation level set to serializable. Also Assume that SPID1 manages to take TABLOCKX on T ...

Hibernate session keeping track of objects

I solved my problem, but I just want to get a better understanding of how things are working. I am looping through a collection, creating/initializing a new Product, adding a category it its collection (mapped m:m) and then saving and commiting the transaction. for(Blah b : blahs) { session = getcurrensession(); Product p = new Pr...

PHP-MySQL-How to safely increment MySQL integer field?

I wan to increment a field value safely using php and mysql. what type of table/field must I use? is there a minimum version of MySQL I must use? what's the sql code for this, safe transaction for MySQL? ...

How do i unblock a process (Insert Stmt) blocked by a parent process (Insert Stmt) with in a TransactionScope.

I have a child TransactionScope within a parent TransactionSope. The child TransactionScope is created, executed, and committed multiple times under the singular parent TransactionScope. The parent TransactionScope takes care of Insert a single record into the database while waiting for the the second set of insert statements to complet...

ADO.NET Data Services on Silverlight: Using the generated key within the same transaction

We have a Silverlight application that uses WCF Data Services. We want to add logging functionality: when a new row is generated, the primary key for this new row is also recorded in the logging table. The row generation and the logging should occur within the same transaction. The primary keys are generated via the database (using the I...

Where should the transaction boundary be in a repository pattern?

I have a repository like so: public interface IRepository { void Save<T>(T entity); void Create<T>(T entity); void Update<T>(T entity); void Delete<T>(T entity); IQueryable<T> GetAll<T>(); } My question is, where should my transaction boundaries be? Should I open a new transaction on every method and commit it befo...

PayPal $0 Dollar Transaction?

Hi. I have a client who wants a paypal shopping cart. All of the services have "Buy Now" buttons, all with different prices. However, there is one service, which is a FREE 0 dollar service. The client wants the "Buy Now" button to remain there, to be consistent with the rest of the site. Does anyone know how I can do a $0 dollar trans...