You are on page 1of 1

27/12/2015

VirtualLogFiles

Virtual Log Files


SQL Server 2000

Virtual Log Files


Each transaction log file is divided logically into smaller segments called virtual log files. Virtual log files are the unit of truncation for the transaction log. When a
virtual log file no longer contains log records for active transactions, it can be truncated and the space becomes available to log new transactions.
The smallest size for a virtual log file is 256 kilobytes KB. The minimum size for a transaction log is 512 KB, which provides two 256KB virtual log files. The number
and size of the virtual log files in a transaction log increase as the size of the log file increases. A small log file can have a small number of small virtual log files for
example, a 5MB log file that comprises five 1MB virtual log files. A large log file can have larger virtual log files for example, a 500MB log file that comprises ten
50MB virtual log files.
Microsoft SQL Server 2000 tries to avoid having many small virtual log files. The number of virtual log files grows much more slowly than the size. If a log file
grows in small increments, it tends to have many small virtual log files. If the log file grows in larger increments, SQL Server creates a smaller number of larger virtual
log files. For example, if the transaction log is growing by 1MB increments, the virtual log files are smaller and more numerous compared to a transaction log
growing at 50MB increments. A large number of virtual log files can increase the time taken to perform database recovery.
As records are written to the log, the end of the log grows from one virtual log file to the next. If there is more than one physical log file for a database, the end of
the log grows through each virtual log file in each physical file before circling back to the first virtual log file in the first physical file. Only when all log files are full
will the log begin to grow automatically.
See Also
Shrinking a Database
2015 Microsoft

https://technet.microsoft.com/enus/library/aa933049(d=printer,v=sql.80).aspx

1/1

You might also like