Relational Database Connection Strings
On this page
Note
URIs in Relational Migrator are optional. You can use the connection string forms to enter your connection details instead of manually providing URIs.
To analyze a schema or start a migration job, Relational Migrator must connect to your relational database. To connect to your source database, Relational Migrator requires a JDBC-formatted connection string. This document describes the URI formats for defining connections to relational database systems.
Relational Migrator can connect to the following relational database systems:
Relational Migrator's connection form contains fields where you can specify a username and password for the connection. The form obscures passwords and is more secure than specifying plaintext credentials in the URI.
MySQL
The general form for a MySQL connection string is:
jdbc:mysql://<host:port>/<database>?<properties>
For example, consider the following connection string:
jdbc:mysql://host1:3306/test
The preceding connection string specifies these connection details:
Property | Value |
---|---|
Host | host1 |
Port | 3306 |
Database | test |
Note
To learn more about MySQL connection strings, see:
Oracle
The general form for an Oracle connection string is:
jdbc:oracle:thin:@<host:port>:SID
For example, consider the following connection string:
jdbc:oracle:thin:@prodHost:1521:ORCL
The preceding connection string specifies these connection details:
Property | Value |
---|---|
Host | prodHost |
Port | 1521 |
SID (System Identifier) | ORCL |
Note
To learn more about Oracle connection strings, see:
PostgreSQL
The general form for a PostgreSQL connection string is:
jdbc:postgresql://<host:port>/<database>?<properties>
For example, consider the following connection string:
jdbc:postgresql://localhost:5432/pg-demo
The preceding connection string specifies these connection details:
Property | Value |
---|---|
Host | localhost |
Port | 5432 |
Database | pg-demo |
Note
To learn more about PostgreSQL connection strings, see:
SQL Server
The general form for a SQL Server connection string is:
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
For example, consider the following connection string:
jdbc:sqlserver://localhost:1433;databaseName=test
The preceding connection string specifies these connection details:
Property | Value |
---|---|
Host | localhost |
Port | 1433 |
databaseName | test |
Using 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.
Using 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.
Sybase ASE
The general form for a Sybase ASE connection string is:
jdbc:jtds:sybase://[host]:[port]/[databaseName]
Note
To learn more about Sybase ASE connection strings, see:
DB2
The general form for a DB2 connection string is:
jdbc:db2://<hostname>:<port>/<database>;
For example, consider the following connection string:
jdbc:db2://localhost:50000/mydb2database;
The preceding connection string specifies these connection details:
Property | Value |
---|---|
Host | localhost |
Port | 50000 |
Database | mydb2database |
Note
To learn more about DB2 connection strings, see: