When I was provisioning the User profile Synchronization service in SharePoint 2013, the UPS service got stuck on starting status for more than 4 hours and identified the “Failed to configure MIIS post database” in the SharePoint log file.
“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”
For the above issue, found that SQL Native client 2008 R2 didn’t installed on the SharePoint server which is the prerequisite of SharePoint 2013.
After I installed SQL 2008 R2 Native Client on the SharePoint Server 2013 and then able to re-provision the user profile synchronization service successfully.