In one transaction I am creating a table which references another table. In a second transaction, I run a SELECT-query against the referenced table but it is blocked by the first transaction. Why is that?
Transaction A:
BEGIN TRAN
CREATE TABLE Child (id int NOT NULL,
parentId int NOT NULL REFERENCES Parent (id));
...
What is the best practice for processing a batched series of CRUD operations in a single transaction with the Enterprise Library Data Access Block that it won't be esclated to a distributed transaction?
Edit Full Source:
public void BatchInsertEvents(IList<EventItem> events)
{
_dataAccessBase = new DataAccessBase("[dbo].[EventInser...
I'm trying to fully understand the JTA demarcation with CMT. The behavior I am experiencing is that only the first @TransactionAttribute of the method is respected on the EJB and subsequent method invocations of the same bean with different @TransactionAttribute annotations are not.
Example:
@Stateless
@TransactionAttribute(Transact...
Are they rolled back immediately?
Are they rolled back after some period of time?
Are they left in an uncommitted state?
Is the behavior the same if connection pooling is used and the connections are simply reset?
...
I have an application that uses incident numbers (amongst other types of numbers). These numbers are stored in a table called "Number_Setup", which contains the current value of the counter.
When the app generates a new incident, it number_setup table and gets the required number counter row (counters can be reset daily, weekly, etc ...
I have two sql insert to do (say for examples in tables A and B), they are in a transaction because I want the database to remain consistent, that is, a tuple in A must have references in B.
In the second insert I need the id that comes from the first, but I don't get this id until I make a commit on the transaction.
So I'm stuck. I do...
I am using OleDB to connect to an excel file using this connection string
@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 12.0 Xml;HDR=YES"""
But when I do this (which is inside a TransactionScope())
using (OleDbConnection conn = new OleDbConnection(connectionString))
{
conn.Open();
...
}
I g...
Hi, I'm trying to implement two-phase commit using PHP and MySQL, and coming up short.
The main block I've found is that I'm unable to store the MySQL connection resource in a place where I can find it again for the second phase. Is it possible to serialize a database handle?
Here's the case I'm trying to code for:
User sends data
Se...
I have set the package TransactionOption to Required and DataFlowTask's TransactionOption to Supported, but when I execute the package, I get an exception:
[ADO NET Destination [82]] Error: The transaction has already been implicitly or explicitly committed or aborted
Why does this happen, and how can I fix it?
...
Hi,
I have a table in MySQL 5 (InnoDB) that is used as a daemon Processing Queue, thus it is being accessed very often. It is typical to have around 250 000 records inserted per day. When I select records to be processed, they are read using a FOR UPDATE query to eliminate race conditions (everything is Transaction Based).
Now I am dev...
What is the best-practice in dealing with MySQL Dead-Locks in PHP? Should I wrap all database calls in a try{}catch{} block and look for the DeadLock error code from the database? Do I then reissue the whole transaction again (I presume the one that failes rolled back)?
...
I get following error randomly when executing code from debug mode.
Cannot access a disposed object.
Object name: 'SqlDelegatedTransaction'.
Error is being thrown after few commands have been executed instantly, not an timeout issue
I have just one transaction, opened with
using(var scope = new TransactionScope(TransactionOption.Re...
I have a WCF Service Reference to a WSDL file for a credit card processing web service (Cybersource). I'd like to somehow extend the generated service reference client to implement IEnlistmentNotification as to support transactional processing.
I am familiar with implementing the IEnlistmentNotification interface, but I can't find a go...
Hi,
I am new to ADO.NET and learning it.
I was wondering if Data Adapter in ADO.NET provides atomicity or ACID properties by itself when filling the Data Set and updating the Database
or do we have to use transaction explicitly to achieve this.
Lets say,
I want to fetch data from the
Database through the Data Adapter to
a Data Set
Se...
Hi there,
I am currently working on a very specialized PHP framework, which might have to handle large database transfers.
For example:
Take half of the whole user count; this should be every day's workspace for the framework.
So, if my framework is required by big projects, is it recommend to use single transactions with multiple qu...
Apparently (because the documentation doesn't say any word of this), in a .NET Transaction (using TransactionScope), the rollbacks are done in the same order as the commits would be, and in the same order as the registrations were done.
Logically, rollback should be in reverse order:
If an action sequence is "do A" then "do B", my rollb...
I'm finding that the PDO Transaction is only commiting 1 of my 2 SQL statement. For some reason, my PHP script is not inserting into my MySQL database 'homes' table BUT it does insert into the 'invoices' table - even though I'm using a PHP PDO database transaction.
Code below:
$conn_str = DB . ':host=' . DB_HOST . ';dbname=' . DB_NAME;...
I have a suite of integration tests that run inside transactions.
Sometimes it seems that NHibernate transactions are not being correctly rolled back. I can't work out what causes this.
Here is a slightly simplified overview of the base class that these integration test fixtures run with:
public class IntegrationTestFixture
{
priva...
I have some basic confusion about how transactions and msdtc work together.
I have a basic server/client winforms app. The app uses transactionscope to encapsulate several sql commands that are executed on the sql server.
The app seemed to work fine when I enabled msdtc network access on the server only. Then one day it stopped working...
I've been exploring Sub Sonic 3's SimpleRepository and have been pretty happy with it but have a question regarding transactions. I am aware that using methods like 'AddMany' and 'DeleteMany' will automatically perform all of those operations within a single transaction, but was wondering if it's possible to force the SimpleRepository to...