Force repair of Content Database using PowerShell
Problem
Your content database has corrupted and you are not able to access some pages / subsites / documents.
Solution
Try the following to see if it fixes your problem:
- Run SharePoint Management Shell
- Type Get-SpDatabase | fl name,id
- Locate the offending database and copy its ID
- Enter the following PowerShell commands to fix your content database.
$db = Get-SPDatabase (Content Database ID) $db.Repair($false) $db.Update() |
You can also repair corrupt SharePoint database by following methods:
1. Stsadm operation – Databaserepair: It detects and removes orphaned items from content databases in Windows SharePoint Services.
2. Stellar Phoenix SharePoint Recovery: It uses advanced algorithm to scans & repairs corrupt SharePoint database.
Thanks,