Connect to SQL Server
This page shows how to save a new SQL Server connection from the Connections page. You can use a saved connection for any Relational Migrator task that requires connecting to a database.
About this Task
To save a new SQL Server connection in Relational Migrator, you must:
Identify your database connection string or database information.
Connect to SQL Server.
Important
To plan your migration and map your SQL Server schema to a
MongoDB schema, you must connect using an account with the correct
read
permissions.
To migrate data, you must connect to your SQL Server database using a service account with the required permissions.
For information on database configuration and required permissions, see Configure SQL Server.
Steps
Database Connection String
The SQL Server connection string looks like:
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
For example, the test
SQL Server database running on localhost
at
port 1433
uses the following connection string:
jdbc:sqlserver://localhost:1433;databaseName=test
Windows Integrated Authentication
To enable Windows Integrated Authentication, add integratedSecurity=true;
to the URI options.
Leave the Username and Password fields blank. Windows Integrated Authentication connects
to the database using the credentials of the user who launched the Relational Migrator executable.
TLS
JDBC connections to SQL Server use Transport Layer Security (TLS) by default.
The encrypt property controls TLS. To disable it, set encrypt=false;
.
When TLS is enabled, the driver tries to validate the server's certificate by default.
To implicitly trust the server certificate, set trustServerCertificate=true;
.
Note
To learn more about SQL Server connection strings, see:
databaseName Property Behavior
In a SQL Server connection string, use the databaseName
property to
specify the database to connect to. If you omit the databaseName
property, the connection still succeeds but you can only see objects in
the default dbo
schema in all databases.
If you specify the databaseName
property, you can see tables from
all schemas within the specified database.
Connect to SQL Server
To create a connection string, enter the following:
Field | Value |
---|---|
Host | The host IP or DNS name. |
Port | The port number. |
Database | The database name. If blank, you only see objects in the default
|
Authentication | By default, this is set to SQL Server. Set to Windows to enable Windows Integrated Authentication, using the credentials of the user who launched the Relational Migrator executable. This disables the Username and Password fields. |
Username and Password | The credentials to use for authentication. Disabled if Authentication is set to Windows. Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection. |
General / SSL toggle | View SSL settings for the connection. To use SSL, you must first uncomment and update the |
SSL: Use SSL | Enable or disable SSL. |
SSL: Trust server certificate | With SSL enabled, check this to trust the stored certificate. Leave unchecked to verify the server certificate against a trusted Certificate Authority. |
Learn More
Relational Migrator relies on the open-source Debezium connector to capture row-level changes. For more details, see Debezium MySQL.
For information about supported databases and versions, see Source Databases and Versions.
For information on managing saved connections, see Manage Database Connections.
For information on Relational Migrator projects, see Create and Manage Projects.