When you uninstall Azure AD Connect, you are presented with the below screen. This screen provides an option to uninstall the following supporting components:
- Microsoft SQL Server 2012 Command Line Utilities
- Microsoft SQL Server 2012 Native Client
- Microsoft SQL Server 2012 Express LocalDB
Azure AD Connect comes with a SQL Server Express LocalDB installation to store its ADSync database. In its database, Azure AD Connect stores the configuration of its connectors, its connector spaces and its metaverse.
These components are installed with Azure AD Connect, unless you’ve specified to Use an existing SQL Server on the Install required components screen, when installing Azure AD Connect using Customize settings.
When SQL Server Express is not used for anything else than storing the ADSync database, SQL Server Express LocalDB and its tools and native client can be uninstalled together with Azure AD Connect.
Determining the SQL Server Express databases
To determine if SQL Server Express LocalDB can be uninstalled together with Azure AD Connect, we need to determine the SQL Server Express LocalDB databases instances that are running.
We don’t need to install the Microsoft SQL Server Management Studio (SSMS) on the Windows Server running Azure AD Connect to get the required information.
We can use the following line in a Command Prompt (cmd.exe) window:
The above command provides the databases running on the Azure AD Connect installation. If only Azure AD Connect uses a SQL Server Express, you’d expect the following databases:
The .\ADSync database is the database instance we’d expect from Azure AD Connect.
The v11.x database is a database instance is an automatic Microsoft SQL Server Express LocalDB instance that comes with the installation of Microsoft SQL Server Express LocalDB.
If additional database instances are returned, then SQL Server Express LocalDB is in use by an additional program on the Windows Server. Do not uninstall the additional components in this case.
Uninstalling Azure AD Connect can throw you a curve ball now and then. Be sure you make the right choices.