How to recover SharePoint FARM if the SQL Server IP changes


SharePoint users receiving the error "cannot connect to the configuration database" is very common and can be fixed by starting the SQL Server service from SQL Server Configuration Manager or from Services.msc.
But what if the SQL server IP has changed? The SQL instance goes down and SharePoint FARM cannot connect it. Let us explore how to fix it.

SharePoint SQL error cannot connect
SharePoint SQL error cannot connect


⭐ Best Practice - Always refer to SQL using Machine Name instead of IP Address



Follow below steps to re-connect the SharePoint FARM to SQL,

  1. Login to SharePoint Server and run Production Configuration Wizard
  2. Disconnect the database from SharePoint Server
  3. Login to the SQL Database Server and change the SQL Database Server IP Address
  4. Open Microsoft SQL Server Management Studio
  5. Go to SharePoint_Config database and run the following command to change the Exist database IP Address
    • Find Server Name/IP Address using following command and note the ID select * from Objects where Name LIKE \'%OLD IP ADDRESS%\'
    • Update Server IP Address using following command Begin tran
    • Update Objects set Name=\'NEW IP\' where Id=\'corresponding ID\'
    • Commit tran
    • Run SharePoint Product Configuration Wizard


Have Questions? Post them here!

Topics Coverage:


🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.

Follow Us: GitHub | Facebook | Twitter | Instagram