Tuesday, 14 July 2015 00:00

Repairing a Damaged Microsoft SQL Server Database

Rate this item
(0 votes)

Symptoms

You may receive the following message in your Microsoft SQL Server Logs:

A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated.

In particular, you may find this error appears in your Microsoft SQL Server logs while performing an XML Backup, which subsequently fails.

Diagnosis

You may receive this message even if the correct isolation level is set. Execute the following query (replacing confluence-database with your database name):

SELECT is_read_committed_snapshot_on FROM
sys.databases WHERE name= 'confluence_database';

If this query returns a value of 1, it means the correct isolation level is set. If it's not set, please refer to our Database setup for Microsoft SQL Server documentation (https://confluence.atlassian.com/display/DOC/Database+Setup+for+SQL+Server#DatabaseSetupforSQLServer-Step3.SetupyourSQLServerdatabaseanduser) - particularly "Setting up the Database".
You should also check the database for consistency by running the following query:
DBCC checkdb
If this query indicates that the database requires repair, proceed to the resolution.
[Note: We've seen this problem occur in Microsoft SQL Server 2014, which is unsupported at time of writing. Please ensure that you're running on a database listed on our Supported Platforms page.
Cause
The database may be corrupted (hence the read errors) and may require repair.
Resolution
  • Shut down Confluence
  • Complete a full database backup
  • Run each query individually, replacing confluence-database with your database name:
ALTER DATABASE "confluence-database" SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
DBCC CHECKDB('confluence-database', 'repair_allow_data_loss');
ALTER DATABASE "confluence-database" SET MULTI_USER;
Restart Confluence

Reference: https://confluence.atlassian.com/display/CONFKB/Repairing+a+Damaged+Microsoft+SQL+Server+Database

Last modified on Friday, 17 July 2015 08:54
Data Recovery Expert

Viktor S., Ph.D. (Electrical/Computer Engineering), was hired by DataRecoup, the international data recovery corporation, in 2012. Promoted to Engineering Senior Manager in 2010 and then to his current position, as C.I.O. of DataRecoup, in 2014. Responsible for the management of critical, high-priority RAID data recovery cases and the application of his expert, comprehensive knowledge in database data retrieval. He is also responsible for planning and implementing SEO/SEM and other internet-based marketing strategies. Currently, Viktor S., Ph.D., is focusing on the further development and expansion of DataRecoup’s major internet marketing campaign for their already successful proprietary software application “Data Recovery for Windows” (an application which he developed).

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.