Questions tagged [transactions]

A set of interrelated operations that must all succeed in order for any of them to succeed. Failure of any operation results in a rollback of all operations in the transaction.

In computer science, transaction processing is information processing that is divided into individual, indivisible operations, called transactions. Each transaction must succeed or fail as a complete unit; it cannot remain in an intermediate state.

Transaction processing is designed to maintain a system's Integrity (typically a database or some modern filesystems) in a known, consistent state, by ensuring that interdependent operations on the system are either all completed successfully or all canceled successfully.

Since most, though not necessarily all, transaction processing today is interactive the term is often treated as synonymous with online transaction processing

16096 questions
6
votes
1 answer

Do MySQL transactional queries improve performance for multiple SELECT statements?

I want to get data from multiple database tables and want to use select queries on more than five tables, using transactional queries to help in performance improvement: try { // First of all, let's begin a transaction …
SRS Infosystems
  • 167
  • 2
  • 16
6
votes
3 answers

MySQL - what happens when an UPDATE command is interrupted?

I issued a long running UPDATE query (an incorrect query) via the MySQL command line client and stopped it with Ctrl-C after a few seconds. The command had not finished running. Will my database be updated for some entries or does it happen in a…
arun
  • 10,685
  • 6
  • 59
  • 81
6
votes
1 answer

What is the point of "ROLLBACK TRANSACTION named_transaction"?

I've read through MSDN on ROLLBACK TRANSACTION and nesting transactions. While I see the point of ROLLBACK TRANSACTION savepointname, I do not understand ROLLBACK TRANSACTION transactionname. It only works when transactionname is the outermost…
Chris Simmons
  • 6,924
  • 5
  • 31
  • 47
6
votes
1 answer

Entity Framework - "New transaction is not allowed because there are other threads running in the session"

I am getting the following error trying to save changes in entity framework - System.Data.SqlClient.SqlException: New transaction is not allowed because there are other threads running in the session. I have seen various answers to this problem,…
user1948635
  • 1,357
  • 4
  • 15
  • 22
6
votes
1 answer

How does transaction suspension work in MySQL?

In the Spring Framework manual they state that for a PROPAGATION_REQUIRES_NEW the current transaction will be suspended. What does that "suspended transaction"? The timer for the timeout stops counting on the current transaction? What are the…
Asaf Mesika
  • 1,643
  • 4
  • 20
  • 33
6
votes
4 answers

Why do EJB beans with bean-managed transactions act as a "transaction barrier"?

A quote from the EJB 3.1 specification: 13.6.1 Bean-Managed Transaction Demarcation The container must manage client invocations to an enterprise bean instance with bean-managed transaction demarcation as follows. When a client invokes a…
Beryllium
  • 12,808
  • 10
  • 56
  • 86
6
votes
2 answers

Manual Transactions with Seam POJO

What is best practice for using Database Transactions with Seam when not using EJBs - ie. when deploying Seam as a WAR? By default Seam JavaBeans support Transactions. I can annotate a method with @Transactional and that will ensure that a…
Damo
  • 11,410
  • 5
  • 57
  • 74
6
votes
3 answers

Flush NHibernate whilst still allowing transaction rollback

I am trying to use NHibernate with legacy entities that are not mapped with NHibernate. On occasion this means that I need to manually flush NHibernate data to the database so that I don't receive foreign key exceptions when I try to connect the…
cbp
  • 25,252
  • 29
  • 125
  • 205
6
votes
1 answer

MySQL transaction over two databases on different servers

Is it possible to make a MySQL transaction that changes databases on different servers? I would need to: insert into the first database select from the first database insert into the second database if any of these fails, revert to the original…
Rápli András
  • 3,869
  • 1
  • 35
  • 55
6
votes
2 answers

COM+ VB6 Application on 64 bit system: IBM CLI Driver transaction error when connecting to DB2

We are trying to migrate an Intranet Web Application, developed in VB6, from Windows Server 2003 to Windows Server 2008 R2 and we are facing a problem with two phase commit transactions between Microsoft SQL Server 2008 and DB2 on Z/OS Mainframe. On…
systempuntoout
  • 71,966
  • 47
  • 171
  • 241
6
votes
5 answers

Data committed even though System.Transactions.TransactionScope.Commit() not called

Under what circumstances can code wrapped in a System.Transactions.TransactionScope still commit, even though an exception was thrown and the outermost scope never had commit called? There is a top-level method wrapped in using (var tx = new…
Neil Barnwell
  • 41,080
  • 29
  • 148
  • 220
6
votes
2 answers

Rails + MySQL + Transactions + Locking, how do I prevent opening a transaction from unlocking the table?

In my Rails code I need to confirm that an action is allowed only if there is more than 1 of a certain record remaining. For this reason I need to lock updates and then perform a read. My rails code looks like this: PaymentProfile.transaction do …
bmck
  • 755
  • 1
  • 8
  • 19
6
votes
2 answers

Nhibernate session.BeginTransaction() vs. transaction.Begin()

My question is related to use of nhibernate transactions Is the transaction.Begin() below a problem? or just redundant? using (var transaction = session.BeginTransaction()) { transaction.Begin(); action(); transaction.Commit(); }
SteveM
  • 305
  • 1
  • 2
  • 12
6
votes
1 answer

Is this serializable?

write(T1, balx), read(T2, balx), write(T1, balx), commit(T2), abort(T1) I'm revising for an exam and these are one of the questions that I've been looking over on the mock paper. According to the Marking Scheme the answer is that the transaction is…
6
votes
2 answers

Changing a full-text indexed column within a transaction

I'm writing an SQL data updater to convert old text/ntext/image type columns into varchar/nvarchar/varbinary. The updaters are run within transactions when the system boots to update the database from an older version. I've gotten the SQL to work on…
Andrew K
  • 541
  • 2
  • 6
  • 15
1 2 3
99
100