Connect to Teradata with Liquibase using TD2 authentication
Last updated: June 9, 2026
Configure Liquibase to connect to Teradata using TD2 authentication. TD2 is the default Teradata authentication mechanism. It requires only a username and password with no additional LOGMECH parameters are needed.
Before you begin
Liquibase Secure 5.1.1+
Teradata JDBC driver — The Teradata JDBC driver is not included and must be downloaded from Teradata. Place the driver in the
liquibase/libdirectory.
Procedure
Configure your liquibase.properties
Add the following to your liquibase.properties file. Be sure to:
Replace
your_changelog.xmlwith the path to your changelog fileReplace
your_hostnamewith your Teradata server hostnameReplace
your_databasewith your database nameReplace
your_usernamewith your Teradata usernameReplace
your_passwordwith your Teradata password
You can also configure optional BTEQ-specific properties:
# Path to BTEQ executable (default: bteq, assumes it is on PATH)
liquibase.bteq.path=bteq
# Timeout in seconds (-1 = no timeout)
liquibase.bteq.timeout=300Environment variables
As an alternative to liquibase.properties, set these environment variables. Be sure to replace your_hostname, your_database, your_username, and your_password with your actual values.
Create a changelog file
Create a basic changelog file to verify the connection. Be sure to:
Replace
your_authorwith your name or identifierSave the file using the same name you set for
your_changelog.xmlin Step 1
Verify the connection
Run the following command to confirm Liquibase can connect to your Teradata instance:
liquibase updateA successful response looks like:
Liquibase command 'update' was executed successfully.Store credentials with Teradata Wallet (recommended for production)
Teradata Wallet provides encrypted credential storage so that passwords are not stored in plaintext configuration files. Create a wallet entry on the host where Liquibase runs. Be sure to:
Replace
your_databasewith your Teradata database nameReplace
your_usernamewith your Teradata usernameReplace
your_passwordwith your Teradata password
tdwallet add -alias your_database -logon your_username,your_passwordThen reference the wallet alias in your JDBC URL. Consult the Teradata Wallet documentation for the exact URL syntax supported by your Teradata JDBC driver version.