Repairing a Damaged Microsoft SQL Server Database

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

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

1 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):

1 2 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 - particularly "Setting up the Database".

You should also check the database for consistency by running the following query:

1 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.

Solution

Resolution

  • Shut down Confluence

  • Complete a full database backup

  • Run each query individually, replacing confluence-database with your database name:

    1 ALTER DATABASE "confluence-database" SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    1 DBCC CHECKDB('confluence-database');

    As per Microsoft's documentation of DBCC CHECKDB, the report will detail what repair mode (if any) should be used to complete the repair. Note that some of the repair modes may cause data loss. Always ensure you have frequent backups, and if possible try your repairs on a test server.

    Once the repairs have been completed (if they were necessary), set the database back to multi-user mode:

    1 ALTER DATABASE "confluence-database" SET MULTI_USER;
  • Restart Confluence

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.