DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2574699 - Last Review: April 1, 2012 - Revision: 5.0

Hotfix Download Available
View and request hotfix downloads
 

On This Page

Microsoft distributes Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008 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 2008 R2 or SQL Server 2008 fix release.

SYMPTOMS

Microsoft SQL Server 2008 R2 or Microsoft SQL Server 2008 might mark database data files as sparse even when the physical files are marked as not sparse in the file system.

Notes
  • To determine whether the database data files are marked as sparse in the SQL Server metadata, run the following statement, and then check whether the Is_Sparse column is set to a nonzero value in the result set:
    Use
    <database name>
    select is_sparse , physical_name from sys.database_files
  • To query the status of the physical files in the file system, run the following Windows command after the database is offline:
    fsutil sparse queryflag 
    <files path>\<database file>
    If you receive the following output, the file is marked as sparse in the file system:
    This file is set as sparse.
  • Both the SQL Server metadata and the file system metadata must be marked as sparse for only database data files that are part of a database snapshot.

CAUSE

This issue occurs because the file system incorrectly marks a whole database data file as sparse after an alternative stream that was originally marked as sparse is removed. The alternative stream is removed when a DBCC CHECKDB command ends.

Notes
  • Internal Database Snapshot Usage is an NTFS feature that is used by the DBCC CHECKDB family of commands. When you run DBCC commands, the database engine creates a database snapshot alternative stream and brings it to a transactional consistent state. The DBCC command runs checks against the alternative stream. The alternative stream is dropped after the DBCC command is finished.
  • The design that causes this issue was introduced in Windows Server 2003 in which Windows volume-level backups are used to back up database files. SQL Server metadata stores a copy of the sparse attributes for the data files in the system tables. However, SQL Server does not update the Is_Sparse information after the sparse attribute is removed from the file system.
  • This issue also occurs after you migrate a database from Windows Server 2003 to a later version of a Windows operating system.

    For example, you migrate databases from Windows Server 2003 to Windows Server 2008 or to Windows Server 2008 R2.

RESOLUTION

To resolve this issue in SQL Server 2008 R2 or in SQL Server 2008, apply the following hotfix, and then bring the database online. When database is brought online, SQL Server checks whether the metadata of the physical database file is marked as sparse in the file system. If it is marked as not sparse, the SQL Server metadata is updated.

Note To remove sparse attributes from the file system, copy the database files, and then use the new copy of the files for the database. For more information about this process, visit the following MSDN website:
How to remove sparse attributes from the file system (http://blogs.msdn.com/psssql/archive/2009/09/23/did-your-backup-program-utility-leave-your-sql-server-running-in-an-squirrely-scenario.aspx)

Cumulative update information

SQL Server 2008 Service Pack 3

The fix for this issue was first released in cumulative update package 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  (http://support.microsoft.com/kb/2617146/LN/ ) 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  (http://support.microsoft.com/kb/2629969/LN/ ) 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 Service Pack 1

The fix for this issue was first released in cumulative update package 16 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:
2582282  (http://support.microsoft.com/kb/2582282/LN/ ) Cumulative update package 16 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  (http://support.microsoft.com/kb/970365/LN/ ) 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.

SQL Server 2008 Service Pack 2

The fix for this issue was first released in cumulative update package 6 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:
2582285  (http://support.microsoft.com/kb/2582285/LN/ ) Cumulative update package 6 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  (http://support.microsoft.com/kb/2402659/LN/ ) 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 R2 CU9

The fix for this issue was first released in cumulative update package 9 for SQL Server 2008 R2. 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  (http://support.microsoft.com/kb/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  (http://support.microsoft.com/kb/981356/ ) The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 was released

SQL Server 2008 R2 Service Pack 1 CU2

The fix for this issue was first released in cumulative update package 2. 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:
2567714  (http://support.microsoft.com/kb/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 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:
2567616  (http://support.microsoft.com/kb/2567616/ ) The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is 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 (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

To apply this hotfix, you must have SQL Server 2008 R2 installed.

Restart requirement

You do not have to restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global 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.

Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Sqlservr.exe2009.100.1800.0121,829,21608-Jul-201111:55IA-64
Sqlservr.exe2009.100.1800.062,027,61608-Jul-201112:28x64
Sqlservr.exe2009.100.1800.042,911,58408-Jul-201113:22x86

STATUS

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

MORE INFORMATION

The following table provides more information about the products or tools that automatically check for this condition on your instance of SQL Server and on the versions of the SQL Server product against which the rule is evaluated.
Collapse this tableExpand this table
Rule softwareRule titleRule descriptionProduct versions against which the rule is evaluated
System Center AdvisorSQL Server database files marked as sparse files
System Center Advisor checks if this SQL Server instance contains database files that are marked as sparse. Only database snapshot files should be marked as files. If normal database files are marked as sparse, then Advisor generates an alert. Advisor relies on the is_sparse column in the catalog view sys.master_files. Review the details that are provided in the “Information Collected” section of the advisor alert, and check the sparse status at the OS level for the affected files. After you clear the OS sparse status, you can apply the hotfix discussed in this article to refresh the SQL Server metadata and synchronize with the OS settings.

SQL Server 2008

SQL Server 2008 R2

SQL Server 2012

REFERENCES

For more information about DBCC commands, visit the following MSDN website:
General information about DBCC commands (http://msdn.microsoft.com/en-us/library/ms188796.aspx)
For more information about the Fsutil statement, visit the following MSDN website:
General information about the Fsutil statement (http://msdn.microsoft.com/en-us/library/ff621563(v=WS.10).aspx)
For more information about this issue in Windows Server 2003, click the following article numbers to view the articles in the Microsoft Knowledge Base:
973886  (http://support.microsoft.com/kb/973886/en-US/ ) You cannot restore large files in the NTFS file system when all the data streams that have sparse attributes are deleted in the 64-bit version of Windows XP SP2 or in Windows Server 2003 SP2
932021  (http://support.microsoft.com/kb/932021/en-US/ ) Error message when you run the "chkdsk" command together with the "/v" switch on a Windows Server 2003-based computer: "Correcting sparse file record segment <number>"

APPLIES TO
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Express
  • Microsoft SQL Server 2008 R2 Workgroup
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Workgroup
Keywords: 
kbautohotfix kbqfe kbhotfixserver kbfix kbexpertiseadvanced kbsurveynew KB2574699
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support