I have successfully connected to teradata from standalone java application using jdbc.
But fails to establish connection using RJDBC.
> jdrv <- JDBC(driverClass="com.teradata.jdbc.TeraDriver", classPath="~/mydrivers/td/terajdbc4.jar:~/mydrivers/td/tdgssconfig.jar")
> conn <- dbConnect(jdrv,"jdbc:teradata://TDServer/TMODE=ANSI,CHARSET=UTF8,uid=tduser,pwd=passwd")
Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url), :
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 14.00.00.21] [Error 1032] [SQLState HY000] Single Sign-On NOT supported for Mechanism TD2.
Found a thread talking about this error but from WebSphere:
This thread suggests to update TD Gateway. If it is the Gateway settings, how would we explain Standalone Java-JDBC Application was successful, connecting to TD ?
Any explanation would help me make a good case with my TD Admins to change the Gateway setting.
This thread also suggests to check the connection string. Same exact connection string works, again, in Standalone Java-JDBC Application ?
What is RJDBC doing different than JDBC using the same drivers ?
Has anyone had any success connecting from R to TeraData using RJDBC ?
you need to specify
and tdgssconfig.jar in the ClassPath
This worked perfect. Thank you very much.
> tdConnect("mytd", "tduser", "passwd", "sys_calendar", "jdbc")
> tdf <- td.data.frame("calendar")
> my.stats <- td.stats(tdf,"year_of_calendar", c("cnt","min","max","mean"))
col xcnt xmin xmax xmean
1 year_of_calendar 73414 1900 2100 2000