FIX: Recovery takes longer than expected for a database in a SQL Server 2008 or in a SQL Server 2008 R2 environment

Article translations Article translations
Article ID: 2524743 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

In a Microsoft SQL Server 2008 or Microsoft SQL Server 2008 R2 environment, database recovery may take a very long time in phase 1, the Analysis phase. This issue typically occurs when many transactions occur between the start and the end of the last complete checkpoint before SQL Server shuts down. For example, millions of transactions may occur.

When this problem occurs, an error message that resembles the following is logged in the SQL Server error log:
Recovery of database 'mydatabase' (5) is 0% complete (approximately 1234 seconds remain). Phase 1 of 3. This is an informational message only. No user action is required.

A long recovery issue may also occur if one or more long-running transactions are rolling back or if too many virtual log files (VLFs) are in your transaction log. For more information about slow performance when you recover a database, click the following article number to view the article in the Microsoft Knowledge Base:
2455009 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 R2

CAUSE

The issue occurs because the hash table is not generated with enough hash buckets. Therefore, it takes a long time to search through hash chains.

RESOLUTION

To resolve this issue, apply this hotfix.

Cumulative update information

SQL Server 2008 Service Pack 3

The fix for this issue was first released in Cumulative Update 1 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:
2617146 Cumulative update package 1 for SQL Server 2008 Service Pack 3
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:
2629969 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 3 was released
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.

SQL Server 2008 R2

The fix for this issue was first released in Cumulative Update 9. 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:
2567713 Cumulative Update package 9 for SQL Server 2008 R2
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:
981356 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

SQL Server 2008 R2 Service Pack 1

The fix for this issue was first released in Cumulative Update 2 for SQL Server 2008 R2 Service Pack 1. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2567714 Cumulative Update package 2 for SQL Server 2008 R2 Service Pack 1
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:
2567616 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

SQL Server 2008 Service Pack 2

The fix for this issue was first released in Cumulative Update 5 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:
2555408 Cumulative update package 5 for SQL Server 2008 Service Pack 2
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:
2402659 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 2 was released
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.

SQL Server 2008 Service Pack 1

The fix for this issue was first released in Cumulative Update 15 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:
2555406 Cumulative update package 15 for SQL Server 2008 Service Pack 1
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:
970365 The SQL Server 2008 builds that were released after SQL Server 2008 Service Pack 1 was released
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.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

You must have Microsoft SQL Server 2008 Service Pack 2 installed to apply this hotfix.

Restart information

You may have to restart the computer after you apply this hotfix. However, the SQL Server process will be restarted.

Replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported x86-based versions of SQL Server 2008
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Sqlservr.exe2007.100.4286.042,793,83227-May-201121:57x86
For all supported x64-based versions of SQL Server 2008
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Sqlservr.exe2007.100.4286.057,736,04027-May-201119:02x64
For all supported IA-64-based versions of SQL Server 2008
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Sqlservr.exe2007.100.4286.0111,166,31227-May-201108:14IA-64


WORKAROUND

To work around this issue, do one of the following:
  • Wait for the recovery to be completed.
  • Restore the database from backups.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about checkpoints and the I/O from an instance of the Database Engine, visit the following Microsoft Developer Network (MSDN) website:
Writing Pages
For more information about the process of copying data from a backup and applying logged transactions to the data to roll it forward to the target recovery point, visit the following Microsoft Developer Network (MSDN) website:
Understanding How Restore and Recovery of Backups Work in SQL Server

Properties

Article ID: 2524743 - Last Review: October 18, 2011 - Revision: 4.0
APPLIES TO
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Enterprise Evaluation
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2008 R2 Express with Advanced Services
Keywords: 
kbautohotfix kbqfe kbhotfixserver kbfix kbsurveynew kbbug kbexpertiseinter KB2524743

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com