|
In .Net, is there any way to determine whether the ambient transaction is DTC transaction or not when debugging. I investigated SqlConnection class members but I found nothing. thanks.
Started by mkus on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you are not in a DTC transaction, then you should see- } then it is not a distributed transaction....
The following command:
? System.Transactions.Transaction.Current
This will show you what type of Transaction you are enlisted in.
|
|
Hello, I want to know if open a transaction inside another is safe and encouraged?
I have a method:
def foo(): session.begin try: stuffs except Exception, e: session.rollback() raise e session.commit()
and a method that calls the first one, inside a transaction...
Answer Snippets (Read the full thread at stackoverflow):
The database knows nothing of the nesting, you can't do anything to use transaction control inside functions....
Because the transaction is virtual - i.e.
The rollback however is issued immediately.
The outermost transaction commits.
|
|
I'm getting this error (Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.) when trying to run a stored procedure from C# on a SQL Server 2005 database. I'm not actively/purposefully using transactions...
Started by mrnye on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It sounds like there is a TransactionScope.
Be there's a transaction pending previously on the same connection.
|
Ask your Facebook Friends
|
We are having problem with the server migration. We have one application that are having so much transactions It working fine on the one database server. But when transfer same database to another server. We are facing the following error.
Server: Msg...
Started by jalpesh on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Are you receiving.
So this message is a consequence, rather than a cause .
After that the transaction must fail.
This message means one of the other participants in the transaction voted to rollback.
|
|
I have a procedure like this:
create procedure Checkout @Foo nvarchar(20), @cost float as begin transaction declare @Bar nvarchar(20); select @Bar = Bar from oFoo where Foo = @Foo; update Foo set gold = gold - @cost where name = @Foo; update Bar set gold...
Started by Omu on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You can do TABLOCK(X), but this will lock the whole table for... .
This option is the SQL Server default XLOCK to make it exclusive and to hold until the end of the transaction).
transaction, resulting in nonrepeatable reads or phantom data.
|
|
Q1. i do understand when we need to deal with multiple databases, we need to use global transaction. but from this post http://fogbugz.atomikos.com/default.asp . the person suggested just use spring aop to advise on the different transactionmanager ( ...
Started by cometta on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If....
And this is what the answer which means a J2EE transaction manager (provided by a J2EE application server or standalone like a transactional scope requirement (e.g.
A J2EE transaction manager is not mandatory for his use case.
|
|
I am getting a "The opertaion is not valid for the state of the transaction" error when I try to call a stored procedure that contains a SELECT Statement. Here is the structure of my calls
public void MyAddUpdateMethod() { using (TransactionScope Scope...
Started by Michael Kniskern on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Is it possible that the stored procedure declares its own transaction or that the calling function declares one?
After doing.
I've encountered this error when my Transaction is nested within another.
|
|
I am doing some performance tests using .Net 3.5 against SQL Server. I am doing an insert of 1 million records. When I wrap this inside a transaction (either serializable, RepeatabelRead or ReadUncommited) it runs in under 80 seconds on my system. When...
Started by Jeroen Huinink on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
With the transaction, it can keep a lock open for multiple inserts.
Because every command (if transaction not setted explicitly) wrapped with transaction implicitly ie if you aren't transactional.
|
|
Would it be possible rollback transactions using Transactionlog file for a particular record? I am using MS SQL 2005.
Started by THEn on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
There are Apex and SQL Log....
Alternatively, you can restore your DB from a backup, and then RESTORE LOGS to a point in time with the STOPAT = '6/30/2009 2:30PM' argument .
I believe there are some pricey third party tools to do this, though .
Natively, no.
|
|
We have a test that runs within a transaction scope. We dispose of the transaction scope at the end to avoid changing the database.
This works fine in most cases.
However, when we use Entity Framework to execute a stored procedure which contains a transaction...
Started by Shiraz Bhaiji on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I use the following code inside an SP to handle contexts where a transaction may or may not be currently in force:-
DECLARE @InTran int Set @InTran = @@TRANCOUNT IF @InTran = 0 BEGIN TRANSACTION /* Stuff happens */ IF @InTran = 0 AND @@TRANCOUNT....
|