Redgate Flyway

Tutorial - Connect using Windows integrated authentication

This tutorial shows you how to connect Flyway to SQL Server using Windows Integrated Authentication.

Prerequisites:

  • A SQL Server instance accessible from the machine running Flyway
  • A Windows domain account with the necessary database permissions
  • The machine running Flyway must be joined to the same Active Directory domain as the SQL Server (or a trusted domain)


This is the default authentication type for SQL Server connections in Flyway Desktop.

Simply ensure that Windows authentication is selected from the Authentication dropdown

Set integratedSecurity=true  in your JDBC URL. No user  or password  fields are needed.

Either define the environment in TOML and reference the environment from the command-line

[environments.production]
url = "jdbc:sqlserver://my-server:1433;databaseName=mydb;integratedSecurity=true"
flyway info -environment=production

Or specify the JDBC URL inline

flyway info -url="jdbc:sqlserver://my-server:1433;databaseName=mydb;integratedSecurity=true"



Didn't find what you were looking for?