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!
Try Out Code2care Dev Tools:


Android Java Linux Microsoft Google Python macOS Notepad++ Microsoft Teams CSS PHP SharePoint Html Linux C Programs Bootstrap jQuery Sublime Android Studio Facebook Eclipse WhatsApp News MySQL Json HowTos JavaScript FTP S3


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR -