Windows Server Installation
On this page
Install Relational Migrator to run as an unattended server on Windows. When running as an unattended server, Relational Migrator binds to any IP and port on the server and exposes it as a web application.
About this Task
Relational Migrator uses the following file locations on Windows:
Configuration file
c:\Users\<username>\AppData\Local\MongoDB\Relational Migrator\Data\user.properties
Downloaded JDBC Drivers
c:\Users\<username>\AppData\Local\MongoDB\Relational Migrator\Data\Drivers
Log files
c:\Users\<username>\AppData\Local\MongoDB\Relational Migrator\Data\Logs\migrator.log
Steps
Install Relational Migrator
Log in to the server.
You can log into the server interactively or using Remote Desktop Protocol (RDP). For more information on logging into the server using Remote Desktop Protocol (RDP), see Connect to your Windows Instances using RDP.
Download the Relational Migrator
.msi
installer.Download the Relational Migrator
.msi
installer to the target machine or remotely copy it over to the instance. Find the latest Relational Migrator installer on the release page.Launch the installer and follow the local machine install instructions.
Enable Relational Migrator to run as an unattended server.
In your
user.properties
file, uncommentspring.profiles.active: unattended
. Youruser.properties
file is located inC:\Users\<Username>\AppData\Local\mongodb\Relational Migrator\Data
.(Optional) Update TLS/SSL configuration properties.
In your
user.properties
file, uncomment and update TLS/SSL configuration properties.It is recommended that the unattended server installation is supplemented with TLS/SSL configuration because Relational Migrator can be bound to any IP and port on the server. For additional information, see TLS/SSL Configuration Properties.
(Optional) Update the port that Relational Migrator runs on.
By default, Relational Migrator is configured to run on port
8278
. To change the port Relational Migrator runs on, update theserver.port
line in youruser.properties
file to specify your preferred port.Run Relational Migrator from its installed location or any shortcuts that were created during the installation process.
(Optional) Check logs for errors or other information.
The logs are located in
C:\Users\<Username>\AppData\Local\mongodb\Relational Migrator\Data\Logs
.When running Relational Migrator as a system service, the path is under the service user’s home directory. The local system user’s profile is located at
C:\Windows\System32\config\systemprofile
.
Run as a System Service
When you install Relational Migrator on a Windows server, you can set up Relational Migrator to run as a system service. When running Relational Migrator as a system service, Relational Migrator automatically starts when the server starts.
Launch the Service Manager of your choice.
These steps use NSSM (a free service manager utility).
From a command prompt, run
.\nssm install RelationalMigrator
.From the Application tab, choose the path and startup directory of the installed
MongoDB Relational Migrator.exe
.From the Details tab, enter MongoDB Relational Migrator as the service’s display name.
From the Log on tab, keep the default local system account or choose a specific account to run the service under.
Click Install service.
Launch
services.msc
.Find the newly-installed MongoDB Relational Migrator service and click Start Service.
Note
When the startup mode is Automatic, the service starts automatically when the computer next restarts.
Enable External Access
To allow incoming connections on the same port as Relational Migrator, enable external access with Windows Defender Firewall.
Open Windows Defender Firewall with Advanced Security.
Select Inbound Rules. Click New Rule.
Select Port. Click Next.
Select TCP, Specific Local Ports, and enter the port number. Click Next.
Select Allow the connection. Click Next.
Select the desired network profiles. Click Next.
Enter a name for the rule. Click Finish.