Select the product you need help with
FIX: It takes a long time to restore a database in SQL Server 2008 R2 or in SQL Server 2008 or in SQL 2012Article ID: 2653893 - View products that this article applies to. On This PageMicrosoft distributes Microsoft SQL Server 2008 R2 Service Pack 1 (SP1) or Microsoft SQL Server 2008 or Microsoft SQL Server 2012 fixes in one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security updates that were included with the previous SQL Server 2008 R2 Service Pack 1 (SP1) or SQL Server 2008 or Microsoft SQL Server 2012 update release. SYMPTOMSIt might take a long time to restore a database in Microsoft SQL Server 2008 R2 or in Microsoft SQL Server 2008 or in Microsoft SQL Server 2012. CAUSEThis issue occurs because it takes a long time to build the Virtual Log File (VLF) list when there are many VLFs in the database. RESOLUTIONCumulative update informationSQL Server 2012The fix for this issue was first released in Cumulative Update 1 for SQL Server 2012. For more information about this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:2679368 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 2012 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/2679368/LN/
)
Cumulative update package 1 for SQL Server 20122692828 You must apply a SQL Server 2012 hotfix to an installation of SQL Server 2012.
(http://support.microsoft.com/kb/2692828/LN/
)
The SQL Server 2012 builds that were released after SQL Server 2012 was released SQL Server 2008 Service Pack 2The fix for this issue was first released in Cumulative Update 8 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:2648096 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/2648096/LN/
)
Cumulative update package 8 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 2008 Service Pack 3The fix for this issue was first released in Cumulative Update 3 for SQL Server 2008 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:2648098 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/2648098/LN/
)
Cumulative update package 3 for SQL Server 2008 Service Pack 32629969 Microsoft SQL Server 2008 hotfixes are created for specific SQL Server service packs. You must apply a SQL Server 2008 Service Pack 3 hotfix to an installation of SQL Server 2008 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/2629969/LN/
)
The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released Cumulative update package 11 for SQL Server 2008 R2The fix for this issue was first released in Cumulative Update 11. 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: 2633145 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/2633145/
)
Cumulative update package 11 for SQL Server 2008 R2981356
(http://support.microsoft.com/kb/981356/
)
The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was releasedCumulative update package 4 for SQL Server 2008 R2 SP1The fix for this issue was first released in Cumulative Update 4. For more information about how to obtain this cumulative update package for SQL Server 2008 R2 SP1, click the following article number to view the article in the Microsoft Knowledge Base:2633146 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 SP1 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/2633146/
)
Cumulative update package 4 for SQL Server 2008 R2 SP12567616
(http://support.microsoft.com/kb/2567616/
)
The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 SP1 was releasedSTATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. 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 log sequence numbers (LSN), visit the following MSDN website: General information about log sequence numbers
(http://msdn.microsoft.com/en-us/library/ms190729(SQL.90).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
(http://www.sqlskills.com/BLOGS/KIMBERLY/post/Transaction-Log-VLFs-too-many-or-too-few.aspx)
WORKAROUND
PropertiesArticle ID: 2653893 - Last Review: April 12, 2012 - Revision: 4.0 APPLIES TO
| Article Translations
|


Back to the top








