use strict; use warnings; use Inline Java => <<'END'; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.io.PrintWriter; public class TeradataConnectionTest { public static void testConnection(String jdbcUrl, String username, String password) { try { DriverManager.setLogWriter(new PrintWriter(System.out)); //DriverManager.registerDriver(new com.teradata.jdbc.TeraDriver()); Did not work //Class.forName("com.teradata.jdbc.TeraDriver"); Did not work // Class.forName("com.ncr.teradata.TeraDriver"); Did not work Connection connection = DriverManager.getConnection(jdbcUrl, username, password); System.out.println("Connected to Teradata!"); // Perform your database operations here connection.close(); } catch (SQLException e) { // Print the stack trace or error message e.printStackTrace(); System.err.println("SQLException: " + e.getMessage()); } catch (Exception e) { // Handle other exceptions e.printStackTrace(); } } } END # Your Teradata connection details my $jdbcUrl = "jdbc:teradata://172.28.130.20/TMODE=TERA,DBS_PORT=1025,CHARSET=UTF8,LOGMECH=LDAP,SSLMODE=ALLOW;TeraDriver=com.teradata.jdbc.TeraDriver"; my $username = "XXXXX"; my $password = "XXXXX"; # Call the Java method to test the connection TeradataConnectionTest->testConnection($jdbcUrl, $username, $password);