Events
9 Apr, 3 pm - 10 Apr, 12 pm
Code the Future with AI and connect with Java peers and experts at JDConf 2025.
Register NowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article describes how to move the Microsoft Entra Connect database from the local SQL Server Express server to a computer running remote SQL Server. You can use the steps described in this article to accomplish this task.
In this scenario, Microsoft Entra Connect version 1.1.819.0 is installed on a single Windows Server 2016 domain controller. Microsoft Entra Connect is using the built-in SQL Server 2012 Express Edition for its database. The database will be moved to a SQL Server 2017 server.
Use the following steps to move the Microsoft Entra Connect database to a computer running remote SQL Server:
On the Microsoft Entra Connect server, go to Services and stop the Microsoft Entra ID Sync service.
Go to the %ProgramFiles%\Microsoft Azure AD Sync\Data folder and copy the ADSync.mdf and ADSync_log.ldf files to the computer running remote SQL Server.
Restart the Microsoft Entra ID Sync service on the Microsoft Entra Connect server.
Uninstall Microsoft Entra Connect by going to Control Panel > Programs > Programs and Features. Select Microsoft Entra Connect, and then select Uninstall.
On the computer running remote SQL Server, open SQL Server Management Studio.
Right-click Databases and select Attach.
In Attach Databases, select Add and go to the ADSync.mdf file. Select OK.
When the database is attached, go back to the Microsoft Entra Connect server and install Microsoft Entra Connect.
When the MSI installation is finished, the Microsoft Entra Connect wizard starts in express settings mode. Select the Exit icon to close the page.
Open a new Command Prompt window or PowerShell session. Go to the folder <drive>\program files\Microsoft Azure AD Connect. Run the command .\AzureADConnect.exe /useexistingdatabase
to start the Microsoft Entra Connect wizard in Use existing database setup mode.
In Welcome to Microsoft Entra Connect, review and agree to the license terms and privacy notice, and then select Continue.
In Install required components, the Use an existing SQL Server option is enabled. Specify the name of the SQL Server instance that's hosting the ADSync database. If the SQL engine instance that's used to host the ADSync database isn't the default instance in SQL Server, you must specify the name of the SQL engine instance.
Also, if SQL browsing isn't enabled, you must specify the SQL engine instance port number. For example:
In Connect to Microsoft Entra ID, you must provide the credentials of a Hybrid Identity Administrator for your directory in Microsoft Entra ID.
We recommend that you use an account in the default onmicrosoft.com
domain. This account is used only to create a service account in Microsoft Entra ID. The account isn't used after the wizard is finished.
In Connect your directories, the existing Windows Server Active Directory (Windows Server AD) forest that's configured for directory sync is listed with a red X icon beside it. To sync changes from Windows Server AD, an Active Directory Domain Services (AD DS) account is required. Select Change Credentials to specify the AD DS account for the Windows Server AD forest.
The Microsoft Entra Connect wizard can't retrieve the credentials of the AD DS account that are stored in the ADSync database because the credentials are encrypted. The credentials can be decrypted only by the earlier instance of the Microsoft Entra Connect server.
In the dialog, choose one of the following options:
Enter the credentials for an Enterprise Admin and let Microsoft Entra Connect create the AD DS account for you.
Create the AD DS account yourself and enter its credentials in Microsoft Entra Connect.
After you select an option and enter the credentials, select OK.
After the credentials are entered, the red X icon is replaced with a green checkmark icon. Select Next.
In Ready to configure, select Install.
When installation is finished, the Microsoft Entra Connect server is automatically enabled for staging mode. We recommend that you review the server configuration and pending exports for unexpected changes before you disable staging mode.
Events
9 Apr, 3 pm - 10 Apr, 12 pm
Code the Future with AI and connect with Java peers and experts at JDConf 2025.
Register NowTraining
Module
Implement directory synchronization tools - Training
This module examines the Microsoft Entra Connect Sync and Microsoft Entra Cloud Sync installation requirements, the options for installing and configuring the tools, and how to monitor synchronization services using Microsoft Entra Connect Health.
Certification
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Documentation
Install Microsoft Entra Connect by using an existing ADSync database - Microsoft Entra ID
This topic describes how to use an existing ADSync database.
Install Microsoft Entra Connect using SQL delegated administrator permissions - Microsoft Entra ID
This topic describes an update to Microsoft Entra Connect that allows for installation using an account that only has SQL dbo permissions.
How to import and export Microsoft Entra Connect configuration settings - Microsoft Entra ID
This article describes frequently asked questions for cloud provisioning.