Repairing a Damaged Microsoft SQL Server Database
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.
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 - particularly "Setting up the Database".
You should also check the database for consistency by running the following query:
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.
The database may be corrupted (hence the read errors) and may require repair.
- Confluence をシャットダウンします。
- Complete a full database backup
Run each query individually, replacing
confluence-databasewith your database name:
ALTER DATABASE "confluence-database" SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
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:
ALTER DATABASE "confluence-database" SET MULTI_USER;
- Confluence を再起動します。