Transaction Log Management

Transaction logs assist in recovering database integrity in the event of system failure. Log records for a single database are maintained on one or more operating-system files called log files, which are serial recordings of all modifications that have occurred in the database and of which transaction performed each modification.

A log file grows continuously as logged operations occur in the database. For some large operations, the file records only the fact that the operation took place. The log file records the commit or rollback of each transaction. This allows SQL Server to roll a transaction either back or forward.

Rolling a transaction back occurs when SQL Server is backing out of an incomplete transaction. SQL Server restores the database to the state it was in before the transaction began by reversing the sequence of alterations.

Rolling a transaction forward occurs when SQL Server is restoring a transaction log. Modifications to the database are applied in the same sequence in which they originally occurred. At the end of this process, the database is in the same state it was in at the time the log was backed up.

The SQL Server 7.0 transaction log manager features these improvements: