FIX: Incorrect result when you use the BCP utility to export data from a SQL Server 2008 R2 instance to a data file

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

On This Page

Symptoms

Assume that you try to use the Bulk Copy Program (BCP) utility to export data from an instance of Microsoft SQL Server 2008 R2 to a data file. However, an error occurs when the BCP utility fetches several rows of data. For example, the following "824" error is generated in the SQL Server error log:
Date Time spid51 Error: 824, Severity: 24, State: 2.
Date Time spid51 SQL Server detected a logical consistency-based I/O error: incorrect pageid (expected 1:43686; actual 0:0). It occurred during a read of page (1:43686) in database ID 23 at offset 0x0000001554c000 in file 'FilePath\Filename'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
In this situation, the BCP utility incorrectly returns the value "0," which indicates that the data export operation was successful.

Note This issue only affects the BCP utility. Other bulk insertion methods handle the error message correctly.

Resolution

Cumulative update information

Cumulative update 5 for SQL Server 2008 R2 Service Pack 2 (SP2)

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

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 how to troubleshoot "824" errors in SQL Server, click the following article number to view the article in the Microsoft Knowledge Base:
2015756 How to troubleshoot Msg 824 in SQL Server
For more information about how to use the BCP utility in Microsoft SQL Server 2008 R2, go to the following MSDN website:
How to use the BCP utility in SQL Server 2008 R2

Properties

Article ID: 2790668 - Last Review: February 18, 2013 - Revision: 1.0
Applies to
  • Microsoft SQL Server 2008 R2 Service Pack 2, when used with:
    • Microsoft SQL Server 2008 R2 Enterprise
    • Microsoft SQL Server 2008 R2 Developer
    • Microsoft SQL Server 2008 R2 Standard
Keywords: 
kbqfe kbfix kbsurveynew kbexpertiseadvanced KB2790668

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