As a part of my role at risual, every now and then I’m asked to look into an issue with on-premises SharePoint. It doesn’t happen very often, most of our clients have migrated to SharePoint Online and decommissioned their SharePoint infrastructure. Because I’m not troubleshooting SharePoint on-premises too often, some of the issues still take me by surprise. This blog is mainly for my own reference, if I need to go back and investigate the same issue but I also hope it may help someone looking for resolution to similar issues.

There were two cases I recently resolved, both related to the User Profile Synchronisation Service unable to start.

Case 1. SharePoint 2013 – One of the farm servers has recently been rebuilt, unfortunately it was the server hosting User Profile Synchronisation Service. After the rebuild and connecting back to the Farm, the User Profile Synchronisation Service would not start. Every attempt to start the service would end with the service going back to “not started” state after a few minutes.

Troubleshooting:

The first thing I checked was to make sure the Farm account was added to the right roles locally on the new server. Since the server was rebuilt, I thought this step might had been missed out. The account and role associations were fine.

The next step I tried was to go to Central Administration, attempt to start the service and check the logs. What I found was a lot of empty log files in the log directory. It looked like log files were created periodically but no information was written to those logs on the new server. This was resolved by adding the Farm Services account to the Performance Log Users local group. From that point, the diagnostic information was visible in the log.

When querying  the ULS log, it’s recommended to use ULS viewer, in my case I filtered the log by Category of User Profiles. With the filter on, I was able to see the following error message:

“Failed to set the new Service Broker on database <Sync DB> on server <Server>. Exception: The operation cannot be performed on database “<Sync DB>” because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group. ALTER DATABASE statement failed. ALTER DATABASE statement failed. Table ‘sysobjvalues’. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table ‘syssingleobjrefs’. Scan count 1, logical reads 2, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0. Table ‘sysdbreg’. Scan count 0, logical reads 4, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.”

To fix the issue, I removed the UPS Sync database from Always On Availability Groups, attempted to start the User Profile Synchronisation service (this time it started fine) and then added the UPS Sync database back to Always On Availability Groups. From there all was left to do was to configure the Synchronisation Connection.

Case 2. SharePoint 2013 – the User Profile Synchronisation Service has not worked for a while. We couldn’t establish exactly when the issue first happened. The issue was similar – every attempt to start the service would end with the service going back to “not started” state after a few minutes.

Using a similar troubleshooting procedure as before, I found the following error message in the log:

UserProfileApplication.SynchronizeMIIS: Failed to configure MIIS post database, will attempt during next rerun. Exception: System.Configuration.ConfigurationErrorsException: ERR_CONFIG_DB  at Microsoft.Office.Server.UserProfiles.Synchronization.ILMPostSetupConfiguration.ValidateConfigurationResult(UInt32 result)  at Microsoft.Office.Server.UserProfiles.Synchronization.ILMPostSetupConfiguration.ConfigureMiisStage2() at Microsoft.Office.Server.Administration.UserProfileApplication.SetupSynchronizationService(ProfileSynchronizationServiceInstance profileSyncInstance).

Quick check on SQL Server revealed that the Farm account was not added as a database owner for the UPS Sync database. After adding the Farm account with the correct role, I was able to start the User Profile Synchronisation Service and configure the synchronisation connection.

Conclusion.

I think there is only one point to raise here – if you still have an on-premises SharePoint 2013 Farm, the extended end of support is approaching fast – 11th of April 2023 and now it’s the time to start thinking about upgrade or migration.

If you would like to discuss how risual can help you to plan your migration or have any questions about Microsoft 365 get in touch today.

Thanks for reading and I hope that has been useful for you!

About the author