Hello Colin Slaughter,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you are having error 2005: The ADSync service failed to successfully start and is attempting to retry the operation.
The error suggests that the Microsoft Entra Connect Sync service is failing to connect to a SQL Server instance during startup. This is likely because:
- SQL Server Express or LocalDB didn't install or configure correctly during the Entra Connect setup.
- The Sync service is trying to connect to a non-existent or misconfigured SQL instance.
Below are the steps to resolve this issue:
- The Sync service relies on SQL Server Express (or a manually specified SQL Server instance) installed during setup. First, confirm whether SQL Server is correctly installed and running.
- Open the Services console (
services.msc
) and look for:
-
MSSQL$ADSync
(SQL Server for Entra Connect).
-
ADSync
(the Azure AD Sync Service).
If these services are missing, SQL Server installation likely failed. I recommend that you uninstall Microsoft Entra Connect, remove any residual files, and attempt the installation again.
- Ensure the required SQL Server instance (
localhost\ADSync
or similar) is present.
Open SQL Server Management Studio (SSMS) and connect to the server:
Server name: .\ADSync or localhost\ADSync
Authentication: Windows Authentication
If connection fails, the SQL Server instance might not exist or may need to be repaired.
Also, recommend that if no SQL instance is available, proceed to reinstall SQL Server Express manually - https://www.microsoft.com/en-us/sql-server/sql-server-downloads
- Manually install SQL Server Express if the automatic setup failed.
- Download SQL Server Express from the official website.
- Choose default installation settings unless specific configurations are needed.
- During Microsoft Entra Connect installation:
- Select the Custom option.
- Provide the details of the manually installed SQL Server instance.
- For example, if you need code: Installation Command for SQL Express.
SQLEXPR_x64_ENU.exe /QUIET /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=ADSync /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"
- If SQL Server is installed but the service cannot connect, verify network configurations.
- Open SQL Server Configuration Manager.
- Enable TCP/IP under
SQL Server Network Configuration
.
- Restart the SQL Server service.
- Open SQL Server Configuration Manager.
- Enable TCP/IP under SQL Server Network Configuration.
- Restart the SQL Server service.
- And for Firewall Rule for SQL Server, Run the following command to open the necessary ports:
netsh advfirewall firewall add rule name="SQL Server" dir=in action=allow protocol=TCP localport=1433
- Review detailed logs in the Event Viewer:
- Navigate to
Windows Logs > Application
.
- Look for errors related to
ADSync
or SQL Server
.
I recommend that you check the error details to refine your troubleshooting steps or identify missing components.
- If the above steps fail, reset the installation:
- Uninstall Microsoft Entra Connect.
- Remove leftover folders (
C:\Program Files\Microsoft Azure AD Sync
).
- Clean the registry:
- Open
regedit
.
- Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Installer\Products
and delete entries related to Entra Connect.
- Reinstall Entra Connect, ensuring SQL Server is properly installed or manually configured. Warning: Editing the registry can cause system issues. Proceed with caution.
Alternative solution if these steps don't resolve the issue:
- Instead of relying on SQL Server Express, install a full SQL Server Standard or Enterprise edition for better control over the setup.
- If reinstallation fails, collect all error logs and open a support case with Microsoft for detailed diagnostic assistance.
I hope this is helpful! Do not hesitate to let me know if you have any other questions.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.