A transaction log is a physical file in which SQL server stores the details of all transactions and data modifications performed on the database. In the event of disaster, that causes SQL server to shutdown unexpectedly (Power failure/hardware failure), the transaction log is used to bring the database in a consistent state while restarting the server. On restarting the server, database goes through the recovery process.
During this recovery process, the transaction log is used to make sure that all committed transactions are written to respective data file (rolled forward) and rollback the uncommitted transaction.
Logically transaction log is a set of log records. Each record is identified by a log sequence number (LSN). The new log records
are always written at the logical end of log file with a LSN which is greater than the previous one.
Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.
Get Started
Comments
Leave a Comment