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
6
votes
1 answer
Should I rollback failed SELECT statements or commit successful ones?
Out of habit I've been using try/catch blocks in my application code for all SQL queries, with a rollback at the beginning of the catch block. I've also been committing those which are successful. Is this necessary for SELECTs? Does it free up…

aw crud
- 8,791
- 19
- 71
- 115
6
votes
3 answers
How to use savepoints in oracle procedure
I have multiple updates and insert statements in a procedure.
Please refer below example:
Procedure Example
--code
Update 1
insert 1
Update 2
Update 3 --Suppose exception occurs
Now i want to rollback to before 1st update statement means no update…

Tajinder
- 2,248
- 4
- 33
- 54
6
votes
1 answer
What is the point of "ROLLBACK TRANSACTION named_transaction"?
I've read through MSDN on ROLLBACK TRANSACTION and nesting transactions. While I see the point of ROLLBACK TRANSACTION savepointname, I do not understand ROLLBACK TRANSACTION transactionname.
It only works when transactionname is the outermost…

Chris Simmons
- 6,924
- 5
- 31
- 47
6
votes
2 answers
How does mysqli::commit & mysqli::rollback work?
I've read the online php manual but I'm still not sure of the way these two functions work: mysqli::commit & mysqli::rollback.
The first thing I have to do is to:
$mysqli->autocommit(FALSE);
Then I make some…

Ariel
- 1,222
- 2
- 14
- 25
6
votes
2 answers
Heroku releases - how to roll forward after rolling back?
Heroku has a "releases" feature that allows you to roll back to a specific deployment release. I've seen a lot of info about rolling back, but how do you roll forward again after rolling back?
Basically, I'd like to roll back to a particular release…

XåpplI'-I0llwlg'I -
- 21,649
- 28
- 102
- 151
6
votes
2 answers
Git Deployment: How to rollback to previous stable version of my app?
I am seriously thinking to use git as my deployment method. Currently I work alone so conflicts is not a problem in my case. Lets say that I followed the steps to replicate a workflow that connects my localhost, my bitbucket account and my live…

George D.
- 1,630
- 4
- 23
- 41
6
votes
1 answer
Can you use mysqli prepared statements and transactions together?
All I want to know is if you can use mysqli's prepare, execute, and rollback together?
$m = new mysqli($dbhost,$dbuser,$dbpassword,$dbname);
$m->autocommit(FALSE);
$stmt = $m->prepare("INSERT `table` (`name`,`gender`,`age`) VALUES…

Joseph Pahl
- 61
- 2
6
votes
2 answers
Rollback SQL Server 2012 Sequence
I have a SQL Server 2012 Sequence object:
/****** Create Sequence Object ******/
CREATE SEQUENCE TestSeq
START WITH 1
INCREMENT BY 1;
I have a SP that runs some queries inside a transaction:
BEGIN TRAN
SELECT NEXT VALUE FOR dbo.TestSeq

VAAA
- 14,531
- 28
- 130
- 253
6
votes
1 answer
Difference between abort and rollback?
What is the difference between abort and rollback in transaction management?

user1583846
- 83
- 2
- 6
6
votes
1 answer
if @@Trancount > 0 is not working
I'm using SQL Server 2012 and I wrote a small stored procedure with rollback transaction. My procedure is as follows:
ALTER PROCEDURE [dbo].[uspInsertEmployee]
@EmpId int,
@EmployeeName varchar(50),
@DeptId int
AS
BEGIN
BEGIN TRY
insert into…

Harsha
- 1,161
- 4
- 18
- 38
5
votes
3 answers
Are all statements in a stored procedure ONE transaction
If a stored procedure contains multiple statements e.g. first an insert, then an update and finally a deletes and the stored procedure gets killed in the middle of the delete, does the insert and update also have to be rolled back? Or does it only…

xhr489
- 1,957
- 13
- 39
5
votes
1 answer
SQL Server: Are physical operations rolled back after ROLLBACK?
What are the effects of ROLLBACK TRANSACTION on physical ordering of data in pages? Are physical operations also rolled back when ROLLBACK is addressed?

jrara
- 16,239
- 33
- 89
- 120
5
votes
2 answers
How to get rollback to use the older image instead of staying on the newest (externally built)?
We are moving our build process outside our OpenShift 3.11 cluster and have noticed that when wanting to rollback to an older deployment the docker image used is not the old one but the newest one known to OpenShift.
I saw for images built by an…

Thorbjørn Ravn Andersen
- 73,784
- 33
- 194
- 347
5
votes
2 answers
jenkins rollback previous version of deploy
Here is the thing. I have some jenkins pipeline jobs in that deploy some java backend apps. The pipelines are run by scripts from SCM. This scripts are the ones that grab the development team code and:
1- checkout that code
2- compile and create…

Chanafot
- 736
- 4
- 22
- 46
5
votes
1 answer
P4 - rollback to previous revision for files in a folder if revision is different for all files
How to rollback to previous revision for files in a folder together if revision of all the files is different using command line?
I have a requirement to rollback all the files inside a folder which also contains a sub folder and the revision of all…

pmann
- 629
- 2
- 9
- 17