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
0
votes
1 answer
python sqlite check points?
I working with python sqlite3 , I found we have commit and rollback option.
Does sqlite3 allows something like check point ?
For example: Initial state is empty.
...
insert something
...
commit
....
.....
insert something
commit.
update…

webminal.org
- 44,948
- 37
- 94
- 125
0
votes
1 answer
Transaction rollback to a savepoint fails in MyBatis
I have problem rolling back to a particular savepoint using Mybatis SqlSession instance. I do not have Spring framework in my web application. Hence I am manually rolling back the transactions whenever the second insertion fails.
private…

user3305834
- 3
- 2
0
votes
1 answer
How can an application determine a rollback?
I'm trying to determine if a transaction fails from the application. How can this be done?
Further, is it possible to determine where a transaction failed, such as particular write that violates a constraint?
user1382306
0
votes
1 answer
Code first migrations - how to rollback first migration
Using code first migrations it is trivial to migrate to any given migration by using -TargetMigration [MigrationName].
But how do you rollback to before the first migration? What migration do you target for that? The first migration has a Down()…

Shumii
- 4,529
- 5
- 32
- 41
0
votes
1 answer
Sql Transaction doesn't do complete rollback
I am seeing some strange behavior which has occurred on random basis.
Here's what my store procedure basically does.
begin try
begin tran
insert into table1
update table2
insert into table3
commit tran
end…

Vinay
- 3
- 6
0
votes
1 answer
EJB 2.0 CMP : exception scenario in multiple remove calls
I have EJB 2.0 legacy code. It has a session bean:
/**
* @ejb.bean
* name="Sample"
* type="Stateless"
* view-type="both"
* @ejb.transaction
* type="Required"
* @ejb.util
* generate="physical"
*/
public abstract…

user613114
- 2,731
- 11
- 47
- 73
0
votes
1 answer
db2 stored procedure error when update statement follows rollback
I have a stored procedure where at the end I check for errors and if there are errors I perform a rollback and then update the status on the batch table to 'FAILED'. When I run the stored procedure I regularly get an SQLCODE 818 error saying there…

user3165854
- 1,505
- 8
- 48
- 100
0
votes
1 answer
Remove objects from sqlalchemy session
I have a portion of the code which does the following:
get the data from the database
perform an API call to one server
perform another API call to another server
store the results in the database (new data and change of existing ones)
Now, when…

wont_compile
- 855
- 2
- 17
- 43
0
votes
1 answer
php mysqli - insert statement after rollback to log errors not working
I have the following generic snippet of code I use to try and catch mysqli errors and put them into a table I have that would keep a log of the errors. I just put in a generic SQL statement that would error for the example:
$sql = "UPDATE table_x…

mang
- 163
- 1
- 1
- 14
0
votes
1 answer
SQL transaction in try... catch will not roll back
I'm learning to use Try... Catch and Transactions in SQL and im trying to test this out on some data that I have. From what I've learned if one execution fails, then the catch should rollback the entire batch so none of the tables in the TRY section…
0
votes
0 answers
i have error in my query commit and rollback in mysql
$objConnect = mysql_connect("localhost","root","") or die(mysql_error());
$objDB = mysql_select_db("mydatabase1");
mysql_query("BEGIN");
$strSQL = "INSERT INTO customer ";
$strSQL .="(CustomerID,Name,Email,CountryCode,Budget,Used) ";
$strSQL…

user3152777
- 1
- 1
0
votes
1 answer
.NET Complex binding revert changes
I was doing some test about complex .NET databinding, and i need to have some advice in order to rollback changes made by the user. Let's assume, for example, that i've got 2 classes in my BL layer:
"Person" represent the core person…

GiveEmTheBoot
- 534
- 9
- 24
0
votes
1 answer
Rails transaction don't rollback
I have a method that loads from xml file customers. Before the file download all customers that are not in xml file is put in the validity false. Then begins loading and updating of existing customers . I wrapped the whole method in a transaction.…

galievruslan
- 23
- 6
0
votes
1 answer
EJB CMT: Transaction does not rollback
I've the following situation:
@Stateless
public class ServiceSessionBean {
@PersistenceContext(unitName = "unit-name")
private EntityManager em;
public void method() {
Entity1 entity1 = new Entity1();
entity1.set...
…

Rafael Orágio
- 1,718
- 5
- 19
- 26
0
votes
0 answers
broke sql server VIEW, need to rollback
I did an ALTER VIEW command and it broke my view.
I want to ROLLBACK but don't know how to do this in SQL Server.
Should I just close management studio and not save anything.
Would this fix it and rollback by itself, or does it COMMIT automatically…

Angelina
- 2,175
- 10
- 42
- 82