After migrating all the SharePoint 2013 databases to a new SQL server (2012) as per Microsoft documentation at how to change database in farms, I can't retrieve the SharePoint configuration database using Get-SPDatabase
command even though other databases like content databases and service databases are returning in the result.
I have tried with the ServerInstance, but no success. It seems that the default database (webpplication.parent.DefaultDatabase) is not set to the configuration database. But not sure how to set it now. Any ideas? The Admin account and farm account have required permissions to the SQL server roles and databases.
Also, config db is not returning with the exact database name and SQL SQL alias
Get-SPDatabase -ServerInstance SQLAliasDEV | ? {$_.Name -eq 'SharePoint_Config_SearchFarm'}
Another symptom is that browsing certain page in the central admin such as "Manage servers in this farm (FarmServers.aspx)" is throwing Object reference not set error. The underline error is pointing to connection string.
System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SharePoint.ApplicationPages.FarmServersPage.get_ConfigurationDatabaseServer() at ASP._admin_farmservers_aspx.__Render__control6(HtmlTextWriter __w, Control parameterContainer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at Microsoft.SharePoint.WebControls.AjaxDelta.RenderChildren(HtmlTextWriter output) at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) at System.Web.UI.WebControls.WebControl.Render(HtmlTe...
I've verified the web config files as well as the registry key for the Configuration database, but all look good. What other places the connection string might be stored at?