Due to some refurbishments in our environment, I wanted to uninstall the redundant SharePoint Server 2019 Standard. Unfortunately, the connection to the SQL Server can't be established. The connection itself seems to be necessary to uninstall SharePoint (I think it is required so the server itself is no longer joined to the SharePoint Farm). Is there any workaround known how to uninstall the server without SQL connection? This is a Single Server Farm (two-tier design with separated SQL Server) so there are no other servers involved.
2 Answers
I rarely uninstall the SharePoint environment, but what I have remembered uninstalling SharePoint Product doesn't remove the SharePoint databases it just de-attach them, then you will need to remove it manually from your SQL Server instance.
So, if you have a single SharePoint server, there is no need to remove the server from the farm
. however, you should make sure that the SQL instance is up and running and reachable to can uninstall SharePoint.
In your case, you should first solve the SQL serve connectivity issue, and make sure that
- The DB is up and running
- the SQL port (default:1433) is opened and you can reach the DB server from the SP server
- SQL services si started.
Below are helpful articles that would help to solve the connectivity issue
- Cannot connect to the configuration database SharePoint 2016
- This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database
- How to Check SQL Server Connectivity between Application Server and Database Server
After solving the SQL issue, you should follow the below steps to uninstall SP 2019
Uninstall SharePoint 2019 from the Control Panel
- Make sure that the current user is a farm Administrators group or a member of the Administrators group on the local computer.
- On the machine that runs SharePoint Server, log on as a local or domain administrator.
- Start Control Panel. In the Programs area, click Uninstall a program.
- In the Uninstall or change a program dialog, click Microsoft SharePoint Server 2016 or Microsoft SharePoint Server 2019. Click Change.
- On the Change your installation of Microsoft SharePoint Server page, click Remove, and then click Continue.
- Follow the uninstallation wizard with its warning and confirmation dialogs.
After uninstalling SharePoint Product from the control panel, you have the choice to manually do the following:
- Delete IIS sites.
- Delete remaining SharePoint Installation folders and their logs.
- Remove SharePoint databases from the database server if it was accessible. (In your case it's not reachable)
Here's what you can do if you have a working SharePoint Server and are OK with deleting the VM and/or re-installing Windows on the non-working SharePoint Server.
Open Central Admin on a SharePoint Server that is able to connect to SQL, go to Manage servers in this farm, then click Remove Server for the specific server that cannot connect to SQL.
From there, delete the VM/reinstall Windows Server on the broken server.