Select the product you need help with
FIX: Slow performance when you recover a database if there are many VLFs inside the transaction log in SQL Server 2005, in SQL Server 2008 or in SQL Server 2008 R2Article ID: 2455009 - View products that this article applies to. Microsoft distributes Microsoft SQL Server 2005, 2008 and 2008 R2 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005, 2008 and 2008 R2 fix release. On This PageSYMPTOMSConsider the following scenario:
CAUSEThese issues occur because the Virtual Log Files (VLFs) in a transaction log file might cause slow performance when SQL Server scans through these VLFs during the following operations:
Note The VLFs are the divisions or segments that are used internally by SQL Server in the transaction log file. RESOLUTIONCumulative update informationSQL Server 2008 R2The fix for this issue was first released in Cumulative Update 6. For more information about how to obtain this cumulative update package for SQL Server 2008 R2, click the following article number to view the article in the Microsoft Knowledge Base:2489376 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/2489376/
)
Cumulative Update package 6 for SQL Server 2008 R2 981356
(http://support.microsoft.com/kb/981356/
)
The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was releasedSQL Server 2008 Service Pack 1The fix for this issue was first released in Cumulative Update 12 for SQL Server 2008 Service Pack 1. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:2467236 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/2467236/LN/
)
Cumulative update package 12 for SQL Server 2008 Service Pack 1970365 Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 1 hotfix to an installation of SQL Server 2008 Service Pack 1. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.
(http://support.microsoft.com/kb/970365/LN/
)
The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released SQL Server 2008 Service Pack 2 The fix for this issue was first released in Cumulative Update 2 for SQL Server 2008 Service Pack 2. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:2467239 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/2467239/LN/
)
Cumulative update package 2 for SQL Server 2008 Service Pack 22402659 Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 2 hotfix to an installation of SQL Server 2008 Service Pack 2. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.
(http://support.microsoft.com/kb/2402659/LN/
)
The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 2 was released SQL Server 2005 Service Pack 3The fix for this issue was first released in Cumulative Update 13 for SQL Server 2005 Service Pack 3. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:2438344 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/2438344/LN/
)
Cumulative update package 13 for SQL Server 2005 Service Pack 3960598 Microsoft SQL Server 2005 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 3 hotfix to an installation of SQL Server 2005 Service Pack 3. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.
(http://support.microsoft.com/kb/960598/LN/
)
The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 3 was released SQL Server 2005 Service Pack 4The fix for this issue was first released in Cumulative Update 1 for SQL Server 2005 Service Pack 4. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:2464079 Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2005 fix release. Microsoft recommends that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/2464079/LN/
)
Cumulative update package 1 for SQL Server 2005 Service Pack 42485757 Microsoft SQL Server 2005 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2005 Service Pack 4 hotfix to an installation of SQL Server 2005 Service Pack 4. By default, any hotfix that is provided in a SQL Server service pack is included in the next SQL Server service pack.
(http://support.microsoft.com/kb/2485757/LN/
)
The SQL Server 2005 builds that were released after SQL Server 2005 Service Pack 4 was released STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
WORKAROUNDInstall this hotfix and restart SQL Server might improve the recovery performance. For example, the performance might be improved for the following operations after you install this hotfix and restart SQL Server:
If you cannot install this hotfix, you can perform the following workarounds to mitigate an existing issue and to prevent a future occurrence. Mitigate an existing issue
Prevent a future occurrence
MORE INFORMATIONYou can check the number of VLF segments by reviewing the SQL error log file and then by finding the log sequence number (LSN) in each transaction log backup file. The first digits before the colon symbol in the LSNs correspond to the number of the LSN. For example, the first number in the first informational message for the LSN is 1. However, the first number in the second informational message for the LSN is 100001. In this scenario, there are 100,000 VLFs that are used between the time of the first informational message and of the second informational message. Therefore, the logged fragmented transaction log that has many Virtual Log Files (VLFs) resembles the following: {Log was backed up. Database: mydbname, creation date(time): 2010/07/08(12:36:46), first LSN: 1:5068:70, last LSN: 1:5108:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'C:\folder\logbackup1.trn'}). This is an informational message only. No user action is required. Log was backed up. Database: mydbname, creation date(time): 2010/07/08(15:36:46), first LSN: 100001:5108:1, last LSN: 100002:5108:1, number of dump devices: 1, device information: (FILE=2, TYPE=DISK: {'C:\folder\logbackup2.trn'}). This is an informational message only. No user action is required.} REFERENCESFor more information about the physical architecture of the transaction log, visit the following MSDN website: General information about the physical architecture of the transaction log For more information about log sequence numbers (LSN), visit the following MSDN website:
(http://technet.microsoft.com/en-us/library/ms179355.aspx)
General information about log sequence numbers For more information about the 1413 error when database mirroring starts, visit the following MSDN website:
(http://msdn.microsoft.com/en-us/library/ms190729(SQL.90).aspx)
General information about the 1413 error when database mirroring starts For more information about how a log file structure can affect database recovery time, visit the following MSDN website:
(http://blogs.msdn.com/b/grahamk/archive/2008/05/09/1413-error-when-starting-database-mirroring-how-many-virtual-log-files-is-too-many.aspx)
How a log file structure can affect database recovery time For more information about the transaction log VLFs, visit the following MSDN website:
(http://blogs.msdn.com/b/psssql/archive/2009/05/21/how-a-log-file-structure-can-affect-database-recovery-time.aspx)
General information about the transaction log file For more information about how to create a database snapshot, visit the following MSDN website:
(http://www.sqlskills.com/BLOGS/KIMBERLY/post/Transaction-Log-VLFs-too-many-or-too-few.aspx)
How to create a database snapshot For more information about the Incremental Servicing Model for SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
(http://msdn.microsoft.com/en-us/library/ms175876.aspx)
935897 For more information about the naming schema for SQL Server updates, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/935897/
)
An Incremental Servicing Model is available from the SQL Server team to deliver hotfixes for reported problems822499 For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/822499/
)
New naming schema for Microsoft SQL Server software update packages824684
(http://support.microsoft.com/kb/824684/
)
Description of the standard terminology that is used to describe Microsoft software updatesPropertiesArticle ID: 2455009 - Last Review: August 30, 2011 - Revision: 4.0 APPLIES TO
| Article Translations
|


Back to the top








