23.10.2012 Views

Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Rollback (data management) 87<br />

Rollback (data management)<br />

In database technologies, a rollback is an operation which returns the database to some previous state. Rollbacks are<br />

important for database integrity, because they mean that the database can be restored to a clean copy even after<br />

erroneous operations are performed. They are crucial for recovering from database server crashes; by rolling back<br />

any transaction which was active at the time <strong>of</strong> the crash, the database is restored to a consistent state.<br />

In <strong>SQL</strong>, ROLLBACK is a command that causes all data changes since the last BEGIN WORK, or START<br />

TRANSACTION to be discarded by the relational database management system (RDBMS), so that the state <strong>of</strong> the<br />

data is "rolled back" to the way it was before those changes were made.<br />

A ROLLBACK statement will also release any existing savepoints that may be in use.<br />

In most <strong>SQL</strong> dialects, ROLLBACKs are connection specific. This means that if two connections are made to the<br />

same database, a ROLLBACK made in one connection will not affect any other connections. This is vital for proper<br />

concurrency.<br />

The rollback feature is usually implemented with a transaction log, but can also be implemented via multiversion<br />

concurrency control.<br />

A cascading rollback occurs in database systems when a transaction (T1) causes a failure and a rollback must be<br />

performed. Other transactions dependent on T1's actions must also be rolled back due to T1's failure, thus causing a<br />

cascading effect.<br />

References<br />

• "ROLLBACK Transaction" [1] , Micros<strong>of</strong>t <strong>SQL</strong> Server.<br />

• "Sql Commands" [2] , Micros<strong>of</strong>t <strong>SQL</strong> Server.<br />

See also<br />

• Savepoint<br />

• Commit<br />

• Norton Ghost<br />

References<br />

[1] http://msdn2.micros<strong>of</strong>t.com/en-us/library/ms181299.aspx<br />

[2] http://www.pantz.org/s<strong>of</strong>tware/mysql/mysqlcommands.html

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!