For PostgreSQL users - where are your DBs hosted?

Local DB Resolver

This is a very specific property resolver which only applies when trying to connect to SQL Server local DB. Local DB is only supported by the JTDS JDBC driver and can only be connected to using named pipes - you can read more about this limitation in this GitHub issue. This means that the instance name for your LocalDB will change every time the service is restarted, which would mean you'd have to edit your connection string every time too. This resolver allows you to avoid this by automatically querying for the instance name before each connection.

Settings

Setting Required Type Description
instanceName Yes String The instance name of your SQL Server local DB.

Usage

Flyway Desktop

This can be set from the connection dialog for SQL Server project by selecting the jTds driver.

Command-line

./flyway info \
-environment='development' \
-environments.development.url='jdbc:jtds:sqlserver://./development;instance=${localdb.pipeName};namedPipe=true' \
-environments.development.user='my-user' \
-environments.development.password='${localSecret.developmentPassword}' \
-environments.development.resolvers.localdb.instanceName='MSSQLLocalDB'

TOML Configuration File

[environments.development]
url = "jdbc:jtds:sqlserver://./development;instance=${localdb.pipeName};namedPipe=true"
user = "my-user"
password = "${localSecret.developmentPassword}"

[environments.development.resolvers.localdb]
instanceName = "MSSQLLocalDB"

Didn't find what you were looking for?