transactions

Transactions, when should be discarded and rolledback

I'm trying to debug an application (under PostgreSQL) and came across the following error: "current transaction is aborted, commands ignored". As far as I can understand a "transaction" is just a notion related to the underlying database connection. If the connection has an auto commit "false", you can execute queries through the same ...

TransactionScope bug in .NET? More information?

I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can hit its timeout and then VoteCommit (as opposed to VoteRollback). Is this accurate or hearsay? I couldn't track down information on the web that talked about this issue (if it IS an issue), so I wonder if anyone has any direct experience with it and can ...

Is there a difference between commit and rollback in a transaction only having selects?

The in-house application framework we use at my company makes it necessary to put every SQL query into transactions, even though if I know that none of the commands will make changes in the database. At the end of the session, before closing the connection, I commit the transaction to close it properly. I wonder if there were any particu...

How to determine whether SqlConnection is enlisted into a System.Transactions' tx or not?

Hello. When we using a transation from System.Transactions (creating TransationScope for an instance) by default all Sql-connections (System.Data.SqlClient.SqlConnection) (but is't also the true for Oracle.DataAccess.OracleConnection) are enlisted on opening. That's called auto-enlistment. Nice feature. But it can be turned off throught ...

How to integrate Geronimo's transaction manager in Tomcat?

Does Geronimo provides a standalone transaction manager? And if it does, is it possible to use it in Tomcat? ...

"Communication with the underlying transaction manager has failed" error message

A client of our has recently upgraded a ASP.NET 1.1 web application to ASP.NET that uses COM+ transaction processing and received the following exception while trying to process a transaction: Exception Type: System.Transactions.TransactionManagerCommunicationException Message: Communication with the underlying transaction man...

Nested transactions in postgresql 8.2?

I'm working on scripts that apply database schema updates. I've setup all my SQL update scripts using start transaction/commit. I pass these scripts to psql on the command line. I now need to apply multiple scripts at the same time, and in one transaction. So far the only solution I've come up with is to remove the start transaction/com...

distributed transaction between two MS SQL Server 2005

I need to make DISTRIBUTED TRANSACTION between two MS SQL Server 2005, it drops an error that NO ACTIVE TRANSACTION IS PRESENT or smth like this. DTCTESTER programs drops an error that transaction could not be done. btw 135 port is open on the firewall. Maybe anyone knows what a problem, or have a suggestion? ...

database autocommit - does it go directly to disk?

So I know that autocommit commits every sql statement, but do updates to the database go directly to the disk or do they remain on cache until flushed? I realize it's dependent on the database implementation. Does auto-commit mean a) every statement is a complete transaction AND it goes straight to disk or b) every statement is a c...

Does Java Connection.close rollback?

Does Java Connection.close rollback into a finally block?. I know .Net SqlConnection.close does it. With this I could make try/finally blocks without catch... Example: try { conn.setAutoCommit(false); ResultSet rs = executeQuery(conn, ...); .... executeNonQuery(conn, ...); .... conn.commit(); } finally { c...

Illegal attempt to associate a collection with two open sessions

Hi all, I'm trying to add a pojo to a collection in another pojo. I'm sure I'm making a really stupid mistake somewhere along the lines but I can't figure out how to solve it. I have a pojo LookupTable which contains a list of Column's: public class LookupTable { private long id; // More properties go here... private List<Column...

Nested transactions in LINQ to SQL

I need help with realizing quite complex business logic which operates on many tables and executes quite a few SQL commands. However I want to be sure that the data will not be left in incosistent state and to this moment I don't see the solution which would not require nested transactions. I wrote a simple pseudo-code which illustrates ...

What is the scope of isolation in nested transactions in SQL Server?

Consider the following SQL: BEGIN TRAN SET TRANSACTION ISOLATION LEVEL READ COMMITTED INSERT Bands ( Name ) SELECT 'Depeche Mode' UNION SELECT 'Arcade Fire' -- I've indented the inner transaction to make it clearer. BEGIN TRAN SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELECT * FROM Bands COMM...

Transactions in .net

What are the best practices to do transactions in C# .Net 2.0. What are the classes that should be used? What are the pitfalls to look out for etc. All that commit and rollback stuff. I'm just starting a project where I might need to do some transactions while inserting data into the DB. Any responses or links for even basic stuff about ...

Restrict postges access from java clients by using java program on a server

Hi community, Perhaps this question is not very clear but I didn't find better words for the heading, which describes the problem I like to deal with shortly. I want to restrict access from a java desktop application to postgres. The background: Suppose you have 2 apps running and the first Application has to do some complex calcula...

what's the best way to implement logging during transactions in T-SQL?

I want to implement a simple debug log, which consists of a table into which I insert insightful messages about the current state of a transaction. How do I stop inserts to this table being affected by rollbacks on the transaction that I'm trying to debug? In Oracle I can use PRAGMA AUTONOMOUS_TRANSACTION to ensure that the inserts are d...

Should I use MSMQ or SQL Service Broker for transactions?

Hey Stackoverflow, I've been asked by my team leader to investigate MSMQ as an option for the new version of our product. We use SQL Service Broker in our current version. I've done my fair share of experimentation and Googling to find which product is better for my needs, but I thought I'd ask the best site I know for programming answe...

How JPA (Hibernate) deal with transaction when fetching Object from database

Hi all, I'm currently developping an application in java using Hibernate as a persistence manager and JPA as an abstraction of the persistence manage hibernate. I'd like to know the impact of wrapping a result query around a transaction. I know the entity manager must stay open for lazily fetched field bug what about transaction in al...

Is it possible to execute SQL commands and send MSMQ messages in a TransactionScope?

I'm investigating using MSMQ for my team's new project but I need to know if I can send MSMQ messages and execute SQL commands within a System.Transactions.TransactionScope and have them commit or rollback together. I can't find a reliable source online that says "yes" with code examples. I need to send some messages to a single queue ...

Which SQL Read TRANSACTION ISOLATION LEVEL do I want for long running insert?

Howdy, I have a long running insert transaction that inserts data into several related tables. When this insert is running, I cannot perform a select * from MainTable. The select just spins its wheels until the insert is done. I will be performing several of these inserts at the same/overlapping time. To check that the informa...