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
59 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. ...