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.
Questions tagged [rollback]
1545 questions
9
votes
1 answer
ZFS: Rollback snapshot but keep newer snapshots
I have following ZFS Snapshots:
data/server/dev1@snap1
data/server/dev1@snap2
data/server/dev1@snap3
If i want to rollback to snap1, i would do the following:
zfs rollback data/server/dev1@snap1
but ZFS returns:
more recent snapshots or bookmarks…

Vince
- 1,133
- 3
- 17
- 34
9
votes
2 answers
What happens if you don't roll back a transaction in Hibernate?
Everything I read about Hibernate states that you must roll back a transaction and close the session when an error occurs, and there's usually some variation of the following code (taken from Hibernate's docs) given as an example:
Session sess =…

John Williams
- 113
- 1
- 6
9
votes
1 answer
Are CREATE TABLE statements in SQL Server immune to ROLLBACK?
I have a database that I "release" weekly, meaning I post a backup people can start from, and I post an update script they can use to upgrade from last week's (so they can keep their current data, as much as possible). This script of course…

Atario
- 1,371
- 13
- 24
9
votes
2 answers
How to rollback a transaction in Entity Framework
string[] usersToAdd = new string[] { "asd", "asdert", "gasdff6" };
using (Entities context = new Entities())
{
foreach (string user in usersToAdd)
{
context.AddToUsers(new User { Name = user });
}
try
{
…

Shimmy Weitzhandler
- 101,809
- 122
- 424
- 632
8
votes
1 answer
Spring nested @Transactional method and rollback
I have a @Service class which has a @Transactional method that calls another @Transactional method on the same class. I was testing rollback behavior for this and I found that it wasn't working properly. The code looks something like…

JayPea
- 9,551
- 7
- 44
- 65
8
votes
4 answers
JPA transaction rollback retry and recovery: merging entity with auto-incremented @Version
I'd like to recover after a failed transaction.
Now, of course after any rollback, all entities become detached and the entity manager is closed. However, the UI still holds the detached entities. Obviously we can't just throw away the user's…

Peter Davis
- 761
- 7
- 13
8
votes
1 answer
Is it necessary to rollback if commit fails?
This seems like a simple enough question, yet I couldn't find any definitive answers specific for MySQL. Look at this:
$mysqli->autocommit(false); //Start the transaction
$success = true;
/* do a bunch of inserts here, which will be rolled back…
user6531200
8
votes
1 answer
TFS merge doesn't pick up rollback changeset(s)
I've had the following TFS issue:
I've created the new branch from MAIN branch. During the time some changesets (let specify them from CS-1 to CS-2) have happened on the new branch.
In one moment I had modification on MAIN branch and this…

Vlada
- 141
- 1
- 7
8
votes
5 answers
Rollback and Scheduling in Database?
If we use the Timestamp Ordering for concurrency control in following scheduling:
My TA says T2,T3,T5 is Run and T4,T1 is Rollback. I think it's false.
any expert could help us? (i.e, in this schedule which of the Transaction Rollback and which…
user4591951
8
votes
3 answers
How to rollback the effect of last executed mysql query
I just ran a command
update sometable set col = '1';
by mistake without specifying the where condition.
Is it possible to recover the previous version of the table?

Rohit Banga
- 18,458
- 31
- 113
- 191
8
votes
4 answers
Transactions don't rollback
I am call two methods, the first one update a table and the next one insert a record in another table. When the second transaction fails the EJB is not doing the rollback of the first transaction.
This is my backing…

John Alexander Betts
- 4,718
- 8
- 47
- 72
8
votes
2 answers
PDO: Transactions don't roll back?
I am going through this tutorial about PDO and have come to the point about transactions. Skipping the connection parts, I have this php code:
try
{
$db->beginTransaction();
$db->exec('DROP TABLE IF EXISTS animals');
$db->exec('CREATE…

Svish
- 152,914
- 173
- 462
- 620
8
votes
3 answers
What is the mechanism for Transaction Rollback in sql server?
What is the mechanism for Transaction Rollback in sql server?

masoud ramezani
- 22,228
- 29
- 98
- 151
8
votes
3 answers
use of ROLLBACK command in Oracle
I created table
SQL>CREATE TABLE Student
(
StudID NUMBER(6),
StudName VARCHAR2(25),
JoinDate DATE
);
Table created.
SQL>INSERT INTO Student
VALUES (123,'JOHN',SYSDATE);
1 row created.
SQL>DELETE Student;
1 row deleted.
How…

bibhudash
- 91
- 1
- 2
- 5
8
votes
3 answers
Hibernate persist failure with PostGIS Geometry
Related to previous question. I have a Spring Roo application using Hibernate to write a Geometry object to a PostGIS database using JTS. I believe I've fixed the problems I had in defining my Geometry object, and now Hibernate is executing its…

orlade
- 2,060
- 4
- 24
- 35