Not able to connect to Aster database through jdbc driver using java

716 views Asked by At

I am trying to connect to Aster server with jdbc drivers from java. I have added already the Jar files to the classpath.

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.*;

public class TeradataJDBCConnection {

      public static void main(String[] args) throws Exception {

          Class.forName("com.asterdata.ncluster.Driver");

          String url="jdbc:ncluster://<ip_address>:2406/test";

    Connection conn=DriverManager.getConnection(url, "user123", "test");    
   }

}

But I am getting the below error.

    Exception in thread "main" java.sql.SQLException: [AsterData][ASTERJDBCDSII](34) : Failed to connect to 10.99.186.92. Please check the host address. ()
    at com.asterdata.ncluster.jdbc.core.NClusterConnection.connect(Unknown Source)
    at com.simba.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
    at com.simba.jdbc.common.AbstractDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at Tera.TeradataJDBCConnection.main(TeradataJDBCConnection.java:17)
Caused by: com.asterdata.ncluster.jdbc.core.MuleException: [AsterData][ASTERJDBCDSII](34) : Failed to connect to 10.99.186.92. Please check the host address. ()
    ... 6 more
2

There are 2 answers

0
Ramineni Ravi Teja On BEST ANSWER

No bug in the code. Everything is running fine. Download the jdbc driver from here. https://aster-community.teradata.com/docs/DOC-2254

0
Neeraj Sharma On

You could also download the driver from here: http://downloads.teradata.com/download/aster/aster-client-tools-for-windows

You can use the jar noarch-aster-jdbc-driver from AsterJDBC__indep_indep.06.10.00.02.zip file. This jar file works for my connection.