rollback

How can you temporarily roll back a single file to a known good state in svn?

I'm currently trying to return a single file to the state of a previous revision in subversion. I don't want to commit the file, just leave it as a modification to the working copy for a bit. How would I do that? Edit: It was suggested that I use checkout, but if I run the command that I would expect to work I get: $ svn help checkou...

How to use down()\rollback with database migration tools?

At my shop right now, we're trying to automate our deployment process. We're handling database migrations using a Rails-like migrations tool. One issue we're struggling with is how to automate rollbacks. For code, we can simply change the symlinked current version of the project to point to the old version (this is a web application, so ...

EJB3 transaction rollback

I'm using CMT in EJB3 state-less session beans. Also I've created my own Exception having the annotation "@ApplicationException (rollback=true)". Do I have to use "context.setRollbackOnly()" when I want to rollback the transaction? Can I just rollback the transaction by throwing an exception inside public method in the bean? If so (the...

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 something on the database side? The select statements aren't altering any data so it seems ...

problem using @Transactional annotation

I am trying to use the declarative transaction management feature provide by Spring. I have set the spring configs and beans as described in reference documentation (i.e including AOP, tx namespaces and using the <tx:annotation-driven /> tag) and am using the @Transactional annotation on the method I want to be made transactional. This ...

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 TABLE animals (' .'animal_id MEDIUMINT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY,' ...

Hibernate save() and transaction rollback

Hi, In Hibernate when i save() an object in a transaction, and then i rollback it, the saved object still remains in the DB. It's strange because this issue doesn't happen with the update() or delete() method, just with save(). Here is the code i'm using: DbEntity dbEntity = getDbEntity(); HibernateUtil.beginTransaction(); Session sessi...

SQL Queries for Creating a rollback point and to rollback to that specific point

Hi, As per my project requirement i want to perform two operation Password Change Unlock Account(Only unlocking account, no password change!) I want return success only if both the transactions succeeds. Say if password change succeeds and unlock fails i cannot send success or failure. So i want to create a rollback point before pas...

Transactions in codeigniter with multiple tables.

Hey SO, I'm new to transactions in general, but especially with CodeIgniter. I'm using InnoDB and everything, but my transactions aren't rolling back when I want them to. Here's my code (slightly simplified). $dog_db = $this->load->database('dog', true); $dog_db->trans_begin(); $dog_id = $this->do...

Rolling Back a Transaction with MySQL Connector in VB.net

Hey all- I have one multi-row INSERT statement (300 or so sets of values) that I would like to commit to the MySQL database in an all-or-nothing fashion. insert into table VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9); In some cases, a set of values in the command will not meet the criteria of the table (duplicate key, for example). When...

Is there an automatic way to generate a rollback script when inserting data with LINQ2SQL?

Let's assume we have a bunch of LINQ2SQL InsertOnSubmit statements against a given DataContext. If the SubmitChanges call is successful, is there any way to automatically generate a list of SQL commands (or even LINQ2SQL statements) that could undo everything that was submitted at a later time? It's like executing a rollback even though ...

Rolling back file moves, folder deletes and mysql queries

This has been bugging me all day and there is no end in sight. When the user of my php application adds a new update and something goes wrong, I need to be able to undo a complex batch of mixed commands. They can be mysql update and insert queries, file deletes and folder renaming and creations. I can track the status of all insert comm...

NHibernate Session per Call in WCF - How to Rollback

I've implemented some components to use WCF with both an IoC Container (StructureMap) and the Session per Call pattern. The NHibernate stuff is most taken from here: http://realfiction.net/Content/Entry/133. It seems to be OK, but I want to open a transaction with each call and commit at the end, rather than just Flush() which how it...

Why are transactions not rolling back when using SpringJUnit4ClassRunner/MySQL/Spring/Hibernate

I am doing unit testing and I expect that all data committed to the MySQL database will be rolled back... but this isn't the case. The data is being committed, even though my log was showing that the rollback was happening. I've been wrestling with this for a couple days so my setup has changed quite a bit, here's my current setup. Lo...

How can i Rollback for files/folders corresponding to the changes done?

I am using PHP and Mysql I have PHP script in which I rollback all the data in the database such data all the old value be reset to the database if update is done, and all new value gets deleted if new insert has been done. Now my goal is to perform the same process with files/folders associated with the changes done, I am not able to ...

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

Should I commit or rollback a transaction that creates a temp table, reads, then deletes it?

To select information related to a list of hundreds of IDs... rather than make a huge select statement, I create temp table, insert the ids into it, join it with a table to select the rows matching the IDs, then delete the temp table. So this is essentially a read operation, with no permanent changes made to any persistent database tabl...

C# - Rollback SqlTransaction in catch block - Problem with object accessability

Hi there. I've got a problem, and all articles or examples i found seem to not care about it. I want to do some database actions in a transaction. What i want to do is very similar to most examples: using (SqlConnection Conn = new SqlConnection(_ConnectionString)) { try { Conn.Open(); SqlTransaction Trans = Conn....

Can I Rollback a restore ? SQL Server

Hi, Is there anyway to rollback a restore which performed by mistake? (using a different databases' backup file) SQL Server Thanks... ...

Transactions in MVC asp.net

Hi, Was wondering if there are any transactions support in asp.net for MVC 2? i.e. commit & rollback? I have a few slightly risky db transacts which i'd prefer firmed up with transactions. could the system transactions namespace be incorporated into a respository of db calls? ...