In this post, we’ll fix “The operation cannot be performed on database because it is involved in a database mirroring” issue that may be raised during running SharePoint Configuration Wizard.
SharePoint Configuration failed: The operation cannot be performed on database “Wss_Logging” because it is involved in a database mirroring session or an availability group, some operations are not allowed.
You may also like to check SharePoint 2016: Failed to create the configuration database.
The operation cannot be performed on database because it is involved in a database mirroring
When I tried to patch a SharePoint 2016 farm where Always on Availability group, the SharePoint Configuration wizard failed in step 8 or 9 with this error:
The operation cannot be performed on database “Wss_Logging” because it is involved in a database mirroring session or an availability group, some operations are not allowed.
You might also like to read The transaction log for database SharePoint_Config is full due to LOG_BACKUP.
Simply, It’s a SharePoint system database that keeps usage and health data logs of SharePoint farm.
- It’s also used by the Health analyzer to raise the farm warning and issues.
- It’s a part of the Usage and Health Monitoring Service.
- You can configure which data should be added to the WSS_Logging database through
- Open Central Administration > Click on Monitoring.
- Below “Reporting.”, click on Configure “Usage and health data collection“.
- Check which data should be logged from the “Event to Log” list.
Note: The Wss_Logging database the only SharePoint database that can be customized to extract your custom reports and creating views, otherwise, Please don’t touch the SharePoint databases to avoid losing the Microsoft support.
The operation cannot be performed on database “Wss_Logging”
First of all, you should be aware of AFTER applying a SharePoint patch and BEFORE running the SharePoint Configuration wizard, the Wss_Logging database must be removed from the Availability group.
This is because the databases that added to the availability group can’t be altered, and when you are running the SharePoint Configuration Wizard, there are many alter operations that will be triggered on the Wss_Logging.
So that you got this error “the operation cannot be performed on database “Wss_Logging” because it is involved in a database mirroring session or an availability group“
Note: the Wss_Logging database supported in the Always on Availability group, but this is NOT recommend. because it will cause a big load on your network.
Fix: The operation cannot be performed on database “Wss_Logging” Solution
- Remove SharePoint Wss_Logging database from the Availability Group.
- Run the SharePoint Configuration Wizard.
- Re-add the Wss_Logging database to the Availability Group again.
You might also like to read Windows Server AppFabric is not correctly configured in SharePoint 2016
- Open SQL Server > Connect to your instance.
- Expand “Always On Availability Group” > “Availability Database”.
- Right-click on the “Wss_Logging” database.
- Select “Remove Database from Availability Group”, follow the wizard.
Add Wss_Logging database to the Availability Group
- Open SQL Server > Connect to your instance.
- Expand “Always On Availability Group”.
- Right-click on “Availability Database”.
- Select “Add Database”, follow the wizard.
Conclusion
In conclusion, we have fixed the SharePoint Configuration Wizard: The operation cannot be performed on database because it is involved in a database mirroring issue for the Wss_Logging database by excluding this database from the availability group during patching.
Applies To
- SharePoint 2019.
- SharePoint 2016.
- SharePoint 2013.
You might also like to read
- SharePoint 2016: Failed to create the configuration database. An exception of type Microsoft.SharePoint.Upgrade.
- Failed to create the SharePoint Configuration Database.
- Cannot connect to database master at SQL server in SharePoint.
- SharePoint Preparation Tool Download Error.
Have a Question?
If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.
Pingback: SharePoint 2019: SQL Server Recommendations | SPGeeks
A lot of thanks for all your valuable hard work on this website. Enjoy the remaining portion of the new year. You’re conducting a fantastic job.
Thanks for your kind words ♥