Questions tagged [rollback]

A rollback is reverting data to a previous state. Typically questions in this tag involve transactions in Relational Database Management Systems, where a ROLLBACK command is used to discard any changes to the data since a transaction started.

1545 questions
0
votes
1 answer

How does Oracle handle SQL when autocommit=false and there is no commit or rollback?

I am running Java and Oracle SQL 11g. What happens if you establish a connection to a database, setting the connection to AutoCommit=False but you have neither a commit() nor a rollback() ? I have my code wrapped in a try/catch/finally and in the…
Kairan
  • 5,342
  • 27
  • 65
  • 104
0
votes
1 answer

JPA persisting transaction rollback java.lang.NoClassDefFoundError

I'm trying to write a function persisting entities. It's pretty simple, but throws java.lang.NoClassDefFoundError when persisting an entity. And I don't understand why. I RTFMed all day, why such simple code doesn't work, but found only…
0
votes
0 answers

Transactions not working in Ruby On Rails

I have a Person model which has attributes name and address.I am doing this: ActiveRecord::Base.transaction do Person.where(:id=>[1]).update_all(:address => "Newyork") #1st update Person.where(:id=>[2]).update_all(:address1 => "Newyork") #2nd…
Shobhit_Geek
  • 591
  • 9
  • 22
0
votes
1 answer

Oracle ROLLBACK not returning data

I made a mistake in deleting data. I did not run the commit statement after the delete, but when running ROLLBACK, the data is still missing. I ran something like: create table temp_ids as select myid ABC --This might be part of the mistake as I…
Cameron Castillo
  • 2,712
  • 10
  • 47
  • 77
0
votes
1 answer

SQL Server Rollback transaction using two storedprocedures

I am working on a C++ application that interact with SQL Server data. I use a stored procedure to insert a data in one table. After inserting the data, after few lines of code, I do a check ( can do this only after inserting the data) and if that…
0
votes
1 answer

Kill Mysql query without rolling back changes

I have a query/stored procedure that has been running for a long time now and I noticed a small error in the updates it is doing. The error isn't anything major and is easily fixable but I was wondering if I could stop the query WITHOUT rolling back…
Brian
  • 79
  • 12
0
votes
0 answers

Persisting @ElementCollection to Database while transaction rollback

I dont know why my List of embeddable objects persists to database despite transaction rollback. I have my Entity User with List of Embeddable Role. When I'm persisting user with the same username as already existing in database, i see an exception…
0
votes
0 answers

Rollback db operations spanning across separate db sessions, when one of the operations fail

I need to call a db procedure 3 times. All 3 calls will be in 3 different db sessions. The requirement is such that if any of the 3 calls fail, all three transactions should roll back. The respective commits should happen only when all 3 procedures…
0
votes
1 answer

How to reliably make sure both local and remote copies of data are updated, even if server fails halfway

This is an infrastructure question. I have a Java web app that allows users to make 'transactions'. This transaction first calls a remote service and updates info there, and once it receives an ack from the remote service saying that the info has…
0
votes
1 answer

PHP/Laravel rolling back transaction later in time?

Is there a way to roll back a transaction later in time? I want to make a function, where the user can upload an excel file and than the data it contains converted into sql inserts inside a transaction. If there is an error, I can roll back the…
szab.kel
  • 2,356
  • 5
  • 40
  • 74
0
votes
1 answer

is there a bug in my rollback system?

I have a set of unassigned variables and by branching and propagating I want to find the correct value assignments. When propagation fails, I'll branch back and undo the propagation. To undo the propagation, I use a commit/rollback system, where…
Albert Hendriks
  • 1,979
  • 3
  • 25
  • 45
0
votes
1 answer

Entity Framework TransactionScope rollback issue

I'm using Entity Framework with a TransactionScope. It looks like I'm having a problem involving all of my changes not rolling back if there is a deadlock issue once calling the Complete() method for the TransactionScope. Note, within this…
donpmill
  • 137
  • 1
  • 7
0
votes
2 answers

JDBC rollback method not behaving like expected

I'm developing a software in Java processing data in a MySQL database and I'm facing an issue due to a rollback call not doing what I was expecting ... My function is composed of two queries and I need to rollback if the second query is not executed…
Ko2r
  • 1,541
  • 1
  • 11
  • 24
0
votes
1 answer

ROLLBACK ORACLE does not work

I've a very minimalistic script that does not work. SET TRANSACTION NAME 'anyname'; DELETE FROM V_RECHNUNG WHERE recno=207; INSERT INTO V_RECHNUNG (recno) VALUES (207); ROLLBACK; SELECT * FROM V_RECHNUNG ORDER BY RECNO DESC; I don't understand why…
Benjamin Eckstein
  • 884
  • 2
  • 9
  • 19
0
votes
0 answers

Killing ALL user connections to the database SQL 2005 with rollback

The issue is that there are certain users that keep certain applications open instead of shutting down their PCs overnight - this keeps locks on tables and that has an impact on other systems that rely on the tables being in an 'unlocked' state to…
Jonathan
  • 11
  • 1
  • 3