Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Make sure that you federated the on-premise Active Directory Federation Services (AD FS) with the Azure Active Directory in the cloud.

  2. Make the connection from a domain-joined machine that is federated with Azure Active Directory. You can access an Azure SQL Database without entering credentials when you're logged in to a domain-joined machine. Additionally, a database user representing your Azure Active Directory principal, or one of the groups to which the user belongs to, needs to exist in the database and have the CONNECT permission.

  3. Install the OLE DB driver from this link:

    https://docs.microsoft.com/en-us/sql/connect/oledb/download-oledb-driver-for-sql-server?view=sql-server-ver15

    Driver. This msi installer should add adal.dll to System32 and Syswow64 folders.

  4. Install the ODBC Driver from this link:
    https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15

  5. Ensure that the SQL Server JDBC Driver Authentication Library is in \Windows\System32. The file is named mssql-jdbc_auth-<version>.x64.dll where <version> is a version number for the file.

    1. If the mssql-jdbc_auth-<version>.x64.dll library is not already in \Windows\System32, it can be extracted from the following file (if you have installed the SQL Server JDBC Driver for Liquibase Enterprise/Datical): <datical-install>\plugins\com.datical.db.drivers.mssql_<version>.jar

    2. Using an archive utility, open or extract the com.datical.db.drivers.mssql_<version>.jar file to access its contents.

    3. The DLL is located in the following archive location: com.datical.db.drivers.mssql_1.0.24.jar\auth\x64\mssql-jdbc_auth-<version>.x64.dll

    4. Put the mssql-jdbc_auth-<version>.x64.dll file in \Windows\System32

  6. Make sure sqlcmd (version 13.1 or higher) is installed and on your PATH. You can install it from the following link:https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15To install sqlcmd, go to the sqlcmd Utility page.

Info

For more information about the configuration of the ActiveDirectoryIntegrated authentication, see Connecting using ActiveDirectoryIntegrated authentication.

8. To create a connection with the Active Directory Integrated mode in the Liquibase Enterprise/Datical DB GUI, select the following:

  • Connection Type - Azure SQL Database

  • Security – Active Directory Integrated Security

Also, enter your hostname, port, application name, database name, and instance name.

9. You can test the connection either by using the “Test Connection” Test Connection button in the GUI or by running “hammer
hammer testConnect <dbDef>” <dbDef> from the command line.

Troubleshooting for connection errors

...

If you get the error “Login failed to authenticate the user in Active Directory (Authentication=ActiveDirectoryIntegrated)”, you may need to add a mssql-jdbc_auth-<version>.x64.dllentry in the Windows registry:

  • Enter Registry Editor in the Windows search box on the taskbar and open the Registry Editor app. If you are prompted by User Account Control, select Yes.

    • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSJDBCAUTHDLL, double-click the TargetDir file, and then add the following path:

      Code Block
      C:\\WINDOWS\\System32\\mssql-jdbc_auth-<version>.x64.dll
    • Select OK to save the changes.

...