transactions

Is there a way to get the list of SQL statements that were previously executed as part of a given transaction in PostgreSQL?

I'm in a situation where I have many connections that are "IDLE in transaction". I spotted them myself. I could kill them, but that wouldn't prevent them from happening again. In fact, it happens regularily. Is there a way to get the list of SQL statements that were previously executed as part of a given transaction? If I could get tha...

Is Active Directory transaction-aware?

Hi, Simple question but I can't find the answer anywhere: is Active Directory transaction-aware? In other words, will the following change be rolled back (since I didn't call scope.Complete()): using (var scope = new TransactionScope()) { DirectoryEntry entry = ...; entry.Properties["givenName"].Value = "New Given Name"; e...

What's the difference between a transaction coordinator and a transaction manager ?

Hi All, What's the difference between a transaction coordinator and a transaction manager ? I don't know if this a valid question , but i keep reading these two terms. If they are different things, What are the products in IBM's Websphere stack that can do these two different jobs? ...

What is the difference between SET xact_abort ON and try/catch block with Transaction handling in sqlserver 2005?

Hi all, I need to improve some existing stored procedures in my project for better transaction handling. I understand I can use the SET XACT_Abort ON statement in my procedure so that transaction will be automatically rolled back in case of errors. I can also use Try/Catch block for error handling and roll back the transaction in the Cat...

Test refunds on Authorize.net using a test account?

I am developing a website that uses Authorize.net but I am currently using a test account. To test a refund, it requires a unique transaction ID, but since I am only using a test account, it does not return a unique transaction ID when you make a test transaction (always 2147483647). Is there another way for this to work? I need to see i...

Problems with MSDTC - remote transactions

Hi! We're in the process of moving our SQL Server to it's own machine, but I'm having issues getting transactions through MSDTC to work. Here is the error message ASP.Net is generating for me: The transaction manager has disabled its support for remote/network transactions I have tried googling around for this, but haven't m...

Java sql transactions. What am I doing wrong?

I have written the small test with sole purpose to better understand transactions in jdbc. And though I did all according to the documentation, the test does not wish to work normally. Here is table structure: CREATE TABLE `default_values` ( `id` INT UNSIGNED NOT auto_increment, `is_default` BOOL DEFAULT false, PRIMARY KEY(`id...

Spring.Net support for Linq2SQL

May I know whether Spring.Net has built in support for Linq2SQL? Someone on Spring.Net forum mentioned there is a bridge for NHibernate. However, I might not use NHibernate at all. I am looking for direct support for Linq2Sql. If I am using TxScopeTransactionManager and apply attribute based transaction to a business method which contai...

transaction scope in spring.net

If I am using attribute based transaction in Spring.Net, something looks like [Transaction()] public void MyBusinessMethod() { // doing some in memory calculation, may take some time Prepare(); // actual db access code DbAccess(); } In the method, Prepare() will do some preparation work without involving the database laye...

IDbTransaction Rollback Timeout

I am dealing with an interesting situation where I perform many database updates in a single transaction. If these updates fail for any reason, the transaction is rolled-back. IDbTransaction transaction try { transaction = connection.BeginTransaction(); // do lots of updates (where at least one fails) transaction.Commit();...

Incremented DB Field

Let's say that I have an article on a website, and I want to track the number of views to the article. In the Articles table, there's the PK ID - int, Name - nvarchar(50), and ViewCount - int. Every time the the page is viewed, I increment the ViewCount field. I'm worried about collisions when updating the field. I can run it in a sp...

Refactoring ADO.NET - SqlTransaction vs. TransactionScope

I have "inherited" a little C# method that creates an ADO.NET SqlCommand object and loops over a list of items to be saved to the database (SQL Server 2005). Right now, the traditional SqlConnection/SqlCommand approach is used, and to make sure everything works, the two steps (delete old entries, then insert new ones) are wrapped into a...

SQL Server 2005: Why Name Transactions?

I've been sorting out the whole nested transaction thing in SQL server, and I've gleamed these nuggets of understanding of behavior of nested trans': When nesting transactions, only the outermost commit will actually commit. "Commit Trans txn_name", when nested , will always apply to the innermost transaction, even if txn_name refers t...

NHibernate first level cache and Transaction Management between TransactionScope and NHibernate ITransaction

My development group is about to release a version of an internal framework that uses NHibernate (and Spring.NET) for persistence. Developers currently using our internal framework use ADO.NET for persistence, so going forward they will use a combination of ADO.NET and NHibernate. During testing of the NHibernate, we found out that the N...

NHibernate - problems with validation and transactions

I'm using NHibernate as my ORM. I have a situation where I have some stuff wrapped in an ITransaction. I am listening to the SaveUpdate event in NHibernate and then doing my entity validation in that SaveUpdate handler. For one of my entities, I want to validate that the value of a certain property hasn't changed. So I figured that I...

SubSonic 2.x Batch Query SQLite

Hi there, I'm writing a windows service that import an XML file into a SQLite database. There are 3,000 odd records that need to be created and i'm using SubSonic 2.2 for the project. Instead of looping through a list and adding them to the database one by one is there a way to batch query more than 1 new record at a time. I know the...

detach database/take offline fails

Hi, I'm currently in the process of detaching a development database on the production server. Since this is a production server I don't want to restart the sql service. That is the worst case scenario. Obviously I tried detaching it through SSMS. Told me there was an active connection and I disconnected it. When detaching the second t...

Oracle: How to find out if there is a transaction pending?

I'm looking for a way to find out if there are uncommited INSERT, UPDATE or DELETE statements in the current session. One way would be to check v$lock with the current sid, but that requires read access to v$lock, which is be a problem if the DBA doesn't want to grant it. Any other ways (other than keeping track of all database commands ...

Threaded Django task doesn't automatically handle transactions or db connections?

I've got Django set up to run some recurring tasks in their own threads, and I noticed that they were always leaving behind unfinished database connection processes (pgsql "Idle In Transaction"). I looked through the Postgres logs and found that the transactions weren't being completed (no ROLLBACK). I tried using the various transactio...

Are nested transactions allowed in MySQL?

Simple doubt, the title says it all. =) ...