The operation cannot be performed on database because it is involved in a database mirroring

The operation cannot be performed on database because it is involved in a database mirroring

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.

The operation cannot be performed on database because it is involved in a database mirroring

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.

The operation cannot be performed on database Wss_Logging

You might also like to read The transaction log for database SharePoint_Config is full due to LOG_BACKUP.


What’s the Wss_Logging database in SharePoint?

Simply, It’s a SharePoint system database that keeps usage and health data logs of SharePoint farm.

Wss_Logging database in SharePoint
  • 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.
Configure Usage and health data collection in SharePoint 2019

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

  1. Remove SharePoint Wss_Logging database from the Availability Group.
  2. Run the SharePoint Configuration Wizard.
  3. 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

Remove SharePoint Wss_Logging database from the Availability Group

  • 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.
Remove WSS_Logging database from Availability group

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.
Add WSS_Logging database from Availability group

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
Have a Question?

If you have any related questions, please don’t hesitate to ask it at deBUG.to Community.

3 thoughts on “The operation cannot be performed on database because it is involved in a database mirroring”

  1. Pingback: SharePoint 2019: SQL Server Recommendations | SPGeeks

  2. TyrellPendergraph

    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.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top