45 questions
-1
votes
2
answers
104
views
Difference between nested transactions and savepoints
Some relational databases only support savepoints and not nested transactions directly. So, what is the difference between both? Is one superset of other?
I understand savepoints are not new ...
0
votes
0
answers
177
views
How to properly handle nested try/catch blocks within nested stored procedures?
I have multiple layers of nested stored procedures, each with a try...catch block within them. However, I want each of these nested stored procedures to be able to properly run their own transaction ...
0
votes
1
answer
58
views
EJB Hibernate Nested Transaction doesn't Roll Back despite I throw an Exception annotated with @ApplicationException(rollback=true)
I created a test code before make the real code just to make sure it would work.
All this code does is start new transactions within each other and tries to update two entities. It's simple.
For me, ...
0
votes
1
answer
120
views
Mismatched number of SQL Server Transactions in LinkedServer
I have a linked Server connected from ServerA to ServerB.
In each server there is an SP that initiates a transaction and it is necessary for one ServerA.SP to be executed within ServerB.SP.
My problem ...
0
votes
1
answer
268
views
Firebase transaction() returning with blank item before providing populated item [duplicate]
I am using transaction in my realtime database as follows:
admin.database().ref(`/users/${uid}`).transaction((user) => {
if (user) {
console.log("user exists");
// ... modify ...
0
votes
2
answers
1k
views
How to set nestedTransactionAllowed to true in Spring?
I have a case where I need to initiate calls to four different services in the same method. According to our business logic all four steps must succeed, rollback otherwise. The problem is that since ...
0
votes
1
answer
309
views
Hibernate REQUIRES_NEW or NESTED not working with MariaDB InnoDB
I have a potentially long-running transaction in JBoss-EAP 7.2.6 where I need to commit in several steps.
I understand that MariaDB has no nested, but chained transactions. This is my idea of how ...
1
vote
0
answers
235
views
Nested transactions and @@trancount count (issue with the practice question for 70-761)
Got a practice question from Measure up and not sure if it is badly worded or I'm missing something regarding nested transactions.
Basically gives me a definition of a stored procedure and states
...
1
vote
0
answers
2k
views
Transaction Per Request Middleware Not working
I am trying to add a middleware so that transaction begins at the beginning of the request and commits or rollbacks depending on the situation. This is my middleware:
public class ...
2
votes
1
answer
1k
views
Rollback nested transaction and log error - in Trigger, Sql Server 2008
I have a trigger (that may modify a value on the insert) on insert statements to a table.
If an error occurs in the trigger, I want to log it. And the INSERT must still be inserted.
So I use a TRY / ...
2
votes
0
answers
3k
views
Nested Transactions with MySQL and Entity Framework Core
I'm using MySQL with EF Core. I am currently using Pomelo Provider for MySQL. I need to implement Unit Of Work Pattern for transactions. I have a Service which calls two methods in repository. I am ...
2
votes
1
answer
1k
views
Is it possible for parent transaction to fail if nested transaction was successfully committed
I'm trying to understand nested transactions in SQL Server. Lets consider following chain for SQL commands:
BEGIN TRANSACTION; -- #1
BEGIN TRANSACTION; -- #2
UPDATE foo SET column = 'something'; -- ...
9
votes
1
answer
5k
views
Spring nested transaction rollback after handling exception
I have a @Service class which has a @Transactional method that calls another @Transactional method on the another service. Something like that:
@Service
public class AService {
@Autowired
...
0
votes
1
answer
399
views
SQL Server mismatching number of BEGIN and COMMIT statements nested transaction
I followed a recommended template for error handling in a transaction that should work when it's executed inside an existing transaction.
This is my template
CREATE PROCEDURE DoSomething
AS
BEGIN
...
0
votes
0
answers
362
views
How to know which record fails in a Postgres bulk update transaction
The problem
I have to update several records R1, R2, ..., Rn in a Postgres database using sqlalchemy. The operation has to be atomic; i.e., if Ri fails the whole transaction has to be rolled back.
...
0
votes
0
answers
485
views
Nested sql transaction in .Net
I have two methods which start sql transaction and commit (or rollback) the connection inside the method.
public void Method1(SqlConnection connection)
{
var trans = connection.BeginTransaction()...
1
vote
4
answers
2k
views
Nested Transaction in nested stored procedures
Actually, I got a little confused about using nested transaction in stored procedures.
I need to call the two/three procedures with in one main procedure.
Eg:
Begin try
Begin Tran -- 1st level ...
2
votes
1
answer
5k
views
Spring transactions: Method with requires_new called from a method with requires
I would like to understand when exactly commit happens and when exactly rollback happens in case of nested transaction with different isolation levels to calling and called methods,
For example, I ...
0
votes
2
answers
751
views
grails nested transaction bean reset
I'm using grails 1.3.7 together with Oracle 11g and trying to manage inner transactions.
I have a bean Person that is passed to a transactional (Propagation.REQUIRED) service method who makes some ...
0
votes
1
answer
110
views
An error occured while executing query with nested transactions
I encountered an error while trying to execute the query below.
if exists (select null from sys.sysobjects where type='P' and name = 'myProc')
drop PROCEDURE myProc
go
create procedure myProc
as
...
0
votes
1
answer
1k
views
Hibernate nested transactions / sessions and proxy associations
I am using hibernate 4 and spring-aop to handle transactions so that there is always an open transaction on the server side.
I want to create a nested transaction to work on it in isolation but I get ...
0
votes
1
answer
718
views
Is it required to start MSDTC service on database server along with web server? Also should it be running on mirroring server too?
My project supports nested transactions and thus we have MSDTC service running on web server as well as on database server. The project is working fine. However, we have database mirroring established ...
0
votes
0
answers
219
views
Do we need nested database transactions?
I'm coding my own data layer using JDBC for accessing SQL databases and one of the main components is the transaction manager.
I'm a little bit confused whether or not to support the nested ...
3
votes
1
answer
4k
views
Recommendations regarding nested transactions in SQL Server
I have some "base operation" stored procedures, like BookAVehicle and UnBookAVehicle. They are both in a transaction.
But now I need to have a somewhat more complex stored procedure: ...
2
votes
3
answers
3k
views
Total rollback on nested transactions
I really like this NestedPDO solution for Yii but I need some different transaction handling.
I want to commit my nested transactions only if all nested transactions could be commited and if ONE ...
1
vote
1
answer
2k
views
Nested transactions in Neo4j
For the record, I am using Neo4j 2.0.0-M02.
I currently have a method which can search nodes with the label "User" on their user id which is stored in the graph as a node property "id". This all ...
0
votes
1
answer
4k
views
Nested transaction scope .net
I'm using SQL Server 2008 R2 and trying to use transactions.
First a question about transactions in .net and SQL Server. If I have something like this
try {
var transactionOption = new ...
0
votes
1
answer
9k
views
how to manage nested transaction with try catch
--Drop Table Tab1
Begin Transaction TR1;
Save Transaction TR1;
Create Table Tab1(f1 decimal(10,0));
Begin Transaction TR2
Save Transaction TR2
insert into Tab1 values(1);
...
11
votes
2
answers
13k
views
Check if an existing transactionscope is active
I am using:
public class TransactionUtils
{
public static TransactionScope CreateTransactionScope()
{
var TransactionOptions = new TransactionOptions();
TransactionOptions....
11
votes
3
answers
8k
views
Why nested transactions are not supported in JTA
Why aren't nested transactions supported by JTA? Is it because of the complexity of implementing them (which I doubt) or some design principle?
26
votes
2
answers
11k
views
Purpose of nested transactions
I have never understood what a nested transaction is good for. Committing a nested transaction commits nothing - it just decreases @@TRANCOUNT. And ROLLBACK rolls back everything.
BEGIN TRANSACTION
...
31
votes
2
answers
20k
views
EJB 3.0 - Nested Transaction != Requires New?
I just read the Transactions Chapter (10) of "Mastering EJB 3.0" and now I'm confused about nested transactions.
The book says
"The EJB-defined transaction manager does not
support nested ...
22
votes
3
answers
42k
views
SAVE TRANSACTION vs BEGIN TRANSACTION (SQL Server) how to nest transactions nicely
I have a stored procedure that needs to set a save point so that it can, under certain circumstances, undo everything it did and return an error code to the caller, or accept/commit it and return ...
4
votes
1
answer
5k
views
SQL Try/Catch logic with nested transactions
The following sproc is implemented in accord with the template in this article: Exception handling and nested transactions. This sproc is supposed to handle deadlocks and it is called by another sproc ...
5
votes
2
answers
857
views
What's the case that requires nested transaction?
Even a transaction is nested, it won't be updated until outmost transaction commits. So what's the meaning of nested transaction and what's the specific situation that requires the feature?
0
votes
1
answer
128
views
Nested UI requiring nested transactions in ActiveRecord
I have a dialog D1 which edits model type M1, and another dialog D2 which edits model type M2. One of the things that M2 contains is a reference to an M1, and so as a convenience to the user D2 ...
3
votes
2
answers
3k
views
Rails 3. Nested transactions. Exception in a child block
Why doesn't ActiveRecord rollback changes in nested transactions after exception was risen in a child block?
Here are examples:
1.
>> Client.transaction do
?> Client.create(:name => 'Pavel')
>> ...
0
votes
2
answers
778
views
What to do when neither TransactionScope nor nested transactions are supported?
TransactionScope is an amazing feature but too few providers do implement it correctly.
I don't want to pass the connection as parameter.
1
vote
2
answers
2k
views
nhibernate and nested transactions
I know that nhibernate doesnt support nested transactions.
Let's say that I got something like this:
UserService.BeginTransaction (on current session)
UserService.Save
UserService->FeedService
...
7
votes
3
answers
7k
views
How do I enable nested transactions with ADO.NET and SQL Server?
I have similar question to how to check if you are in a transaction. Instead of checking, how do I allow nested transactions?
I am using Microsoft SQL Server Database with ADO.NET. I have seen ...
5
votes
2
answers
4k
views
Achieving NHibernate Nested Transactions Behavior
I'm trying to achieve some kind of nested transaction behavior using NHibernate's transaction control and FlushMode options, but things got a little bit confusing after too much reading, so any ...
1
vote
1
answer
263
views
.NET Data Providers - How do I determine what they can do?
I have code which could be executed using a Provider that doesn't support transactions, or doesn't support nested transactions.
How would I programmatically determine such support?
E.g. The code ...
112
votes
2
answers
58k
views
Are nested transactions allowed in MySQL?
Does MySQL allow the use of nested transactions?
12
votes
3
answers
13k
views
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 ...
6
votes
2
answers
2k
views
Real-world uses of MySQL savepoints in web services?
Does anyone have experience they can share using MySQL savepoints (directly or via an ORM), especially in a non-trivial web service? Where have you actually used them? Are they reliable enough (...