All Forums

Covers all topics related to Teradata database connectivity, including the use of client technologies such JDBC, ODBC, .NET Provider etc. For articles, blogs and more, see the Connectivity section of this site.

You must login to post to the forums.
NullPointerException in TdgssConfigApi Topic by jai 20 Jan 2006

Hi, We are using Teradata driver with JBoss-3.2.3 application server. We have a datasource deployed on the server. We are seeing the following exception when getConnection is invoked on the datasource:Caused by: java.lang.NullPointerException at com.ncr.teradata.jtdgss.TdgssConfigApi.InquirePropertiesForMech(DashoA13*..) at com.ncr.teradata.TeraEncrypt.getClientDefaultMech( at at com.ncr.teradata.jdbc_4.TDSession.connect( at com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalConnection.( at com.ncr.teradata.TeraDriver.connect( at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection( exception occurs very frequently. Does anyone know the reason/solution for the same?Thank you.

3 replies, 2 years ago
JDK 1.3 and JDBC 3.03 Topic by Natalia 06 Apr 2006

Hello!I have a system development on JDK 1.3 and I need to use JDBC 3.03 to connect to Teradata V2R6.1.I try but I couldn't and the documentation says that I need JDK 1.4.Do you know if it is possible? I can't change JDK.Thanks a lot.

1 reply, 2 years ago
Connect to Teradata database from web application using JDBC Topic by Jaguar 10 May 2006

Hi , can anyone provide me the jdbc settings (to be given in unix environment) that are required to connect to Teradata database from a web application.Also is there any way in which i can invoke teradata scripts within oracle pl-sql scripts.can anyone pls provide me with details of the settings?any info. provided would be appreciated.Thnx

2 replies, 2 years ago
Inserting strings in UTF-8 Teradata using JDBC Topic by Vesoni 23 Jun 2006

Hi,How can insert UTF-8 bytes in Teradata in java using Teradata JDBC drivers?When I try with setBytes(int index, bytes[]) methodI get Conversion bteween BYTE data and other types is illegal.Any help?Veso

2 replies, 2 years ago
teradata data source connection on Websphere on Windows Topic by Paulo 18 Aug 2006

I am trying to set a Websphere 5 application server data source to connect to a teradata db elsewhere. I can use jdbc/odbc connections fine in this server to connect to that same db. But when I try using the data source connection I get:"E SRVE0026E: [Servlet Error]-[Can't find library terajni 'terajni.dll' in java.library.path".The configuration I am using works in another box. A UNIX based Websphere application server. My computer has Windows XP and I tried type-2 and type-4 drivers with similar results. Last download was Does anyone know the solution for this issue? Any clues?

1 reply, 2 years ago
FastLoad from Java Topic by c3800s 15 Nov 2006

Hello,I want to connect a Java application to a Teradata DB (via JDBC) and insert about one million records in a table, but I need the fastest way to do it.I've tried to insert using the executeUpdate method of the PreparedStatement interface, but the insert ratio was 20 records per second.The last JDBC driver includes a package with the classes that make possible to execute FastLoad from Java which would be the solution I need.The problem is that there is no documentation for this way of insertion from a Java application (at least, I couldn't find it) and I want to know how to do it.I've tried this code, but I've got an error:---------TeraDriver tdDriver = (TeraDriver)Class.forName("com.ncr.teradata.TeraDriver").newInstance();DriverManager.registerDriver(tdDriver);//With the PARTITION parameter I specify I'll use FastLoad and the DriverManager will return a FastLoadConnectionConnection con = DriverManager.getConnection("jdbc:teradata://servername/PARTITION=FASTLOAD", "user", "pwd");con.setAutoCommit(false);//The FastLoadConnection will return a FastLoadPreparedStatementPreparedStatement stmt = con.prepareStatement( "INSERT INTO TABLE (" + "FIELD1, " + "FIELD2, " + "FIELD3, " + "FIELD4" + ") " + "VALUES (?, ?, ?, ?)");//Iterates over a collectionwhile(it.hasNext()) { o =; stmt.setString(1, o.getField1()); stmt.setString(2, o.getField2()); stmt.setDouble(3, o.getField3()); stmt.setDate(4, new Date(o.getField4().getTime())); stmt.addBatch();}//Finally, I execute FastLoadint [] numInserts = stmt.executeBatch();----------------------The executeBath throws an Exception:[NCR] [Teradata DBMS] : The DBS restarted between FastLoad or MLoad requests.Please help!Thanks a lot.PD: Sorry for my English

1 reply, 2 years ago
JDBC driver for WAS 6.1 Topic by sassman 14 Mar 2007

Any idea on when the JDBC driver will be certified for WAS 6.1? Is the certification process underway?Thanks!

1 reply, 2 years ago
Is it possible to do connection pooling and recognize the user at the same time? Topic by Allan Pomeroy 07 May 2007

We want to use connection pooling in Teradata JDBC, but also to set the user context for each SQL statement to reflect the individual user on behalf of whom the application is making the individual request, in a way that can be recognized by our database views so they can use the individual userid to enforce row-level security. Is this possible in Teradata? If so, how do we accomplish it?I searched the Archives and read the JDBC user manual. Unfortuantely I didn't see an answer in either of those sources. I'd appreciate any help you can offer.ThanksAllan Pomeroy

1 reply, 2 years ago
JDBC error: Error tdgss-stack-trace-begin Topic by jsergey 19 Jul 2007

I really don't know how to fix this problem because I don't know, what is the problem???Caused by: java.sql.SQLException: [NCR] [Teradata JDBC Driver] : TeraEncrypt: Error tdgss-stack-trace-begin>>> java.lang.NullPointerExceptionat com.ncr.teradata.jtdgss.TdgssConfigApi.GetInforForOID(DashoA14*..)at com.ncr.teradata.jgssp2td2.Td2Context.GetTrailerBytes(DashoA14*..)at com.ncr.teradata.jgssp2td2.Td2Context.BuildInitMsg(DashoA14*..)at com.ncr.teradata.jgssp2td2.Td2Context.initSecContext(DashoA14*..)at com.ncr.teradata.jtdgss.TdgssContext.initSecContext(DashoA14*..)at com.ncr.teradata.TeraEncrypt.initSecContext(<< at com.ncr.teradata.jdbc_4.util.ErrorFactory.makeDriverJDBCException( com.ncr.teradata.jdbc_4.util.ErrorFactory.makeDriverJDBCException( com.ncr.teradata.TeraEncrypt.transformException( com.ncr.teradata.TeraEncrypt.initSecContext( com.ncr.teradata.jdbc_4.statemachine.AssignState.action( com.ncr.teradata.jdbc_4.TDSession.( com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalConnection.( com.ncr.teradata.TeraDataSource.getConnection( additional information:Jdbc Driver: TeraJDBC. 6.1JVM 1.5

2 replies, 2 years ago
Problem while connectiong Teradata from Java Topic by madhuramesh 03 Oct 2007

Hi, I am trying to connect Teradata from java using Teradata JDBC Driver. I am using RAD 6.0 IDE. I am getting following exception , can anyone help me please? Exception :[10/3/07 11:15:20:581 PDT] 0000003e FreePool E J2CA0046E: Method createManagedConnectionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/TDDataSource, throwing ResourceAllocationException. Original exception: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: [NCR][Teradata JDBC Driver]:TeraConnection: getHoldability: function not supported in this version. with SQL State : HY000 SQL Code : 779 at com.ncr.teradata.ComUtil.ThrowExcp( at com.ncr.teradata.TeraConnection.getHoldability( at com.ncr.teradata.TeraLogicalConnection.getHoldability( at at at at at at at at at at at com.covansys.ebiz.ti.db.TeraDataConnectionPool.getConnection( at com.covansys.ebiz.ti.db.DatabaseConnectionManager.getConnection( at com.covansys.ebiz.ti.db.dao.DataAccessObject.getConnection( at com.covansys.ebiz.ti.db.dao.DataAccessObject.prepareDynamicStatement( at com.covansys.ebiz.ti.db.dao.DataAccessObject.readDynamic( at at at at at at at com.covansys.ebiz.query.QueryAction.executeSecure( at at com.covansys.ebiz.struts.SecureAction.execute( at org.apache.struts.action.RequestProcessor.processActionPerform( at org.apache.struts.action.RequestProcessor.process( at org.apache.struts.action.ActionServlet.process( at org.apache.struts.action.ActionServlet.doPost( at javax.servlet.http.HttpServlet.service( at javax.servlet.http.HttpServlet.service( at at at at at at at at at at at Code)) at Code)) at Code)) at$ Code)) at$ Code))Additional information :IDE : RAD 6.0Driver verson : Tera Data JDBC Driver 03.01.00Any help appreciated.-Ramesh

1 reply, 2 years ago
Incorrect characters returned in UTF8 session Topic by yulian 17 Mar 2008

When using JDBC to retrieve characters from a char column in UTF8 charset session, we get a character string of double the size of the column length. Does anyone know why and how to workaound it?For example: 1. connect to the database in UTF8 sessionjdbc:teradata://td/CHARSET=UTF82. create table and insert dataCREATE TABLE employee (empName CHAR(10));INSERT INTO empolyee values('a');3. SELECT empName from employeeThe length of empName is 20. (Wrong!)4. connect to the database in default charset sessionjdbc:teradata://td5. SELECT empName from employeeThe length of empName is 10. (Correct!)I'm using JDBC Driver and the database is V2R6.

1 reply, 2 years ago
JDBC v3.03.00.00 not passing props, including DSName Topic by dkarr-5910 05 Apr 2008

I'm helping to diagnose some issues with using the Teradata JDBC driver v3.03.00.00 from WebLogic 9.2. I believe I discovered that this version of the driver ignores the Properties object passed into the getConnection() method. Can anyone confirm that?Assuming that's true, since our WebLogic ConnectionPool setting was attempting to set the DSName property, what would be the possible impacts if that property was not set? It seems redundant to me, as our connection string is using an IP address, and the value we were attempting to set for DSName was the same IP address.I now know that the workaround for it not using the Properties is simply to append each property setting at the end of the URL (comma-separate), I'm just trying to understand what the impact would have been if the property wasn't set.

1 reply, 2 years ago
JDBC not doing cop discovery - unknown host Topic by rs131112 28 Mar 2008

I'm accessing 2 different Linux servers, same JDBC (3.02). I am not the server administrator. Using server1, I can successfully connect to the database using the "hostname", and JDBC does the "cop discovery" just like it is supposed to. On the server2, if I just use the hostname, I get an "unknown host" error message. If I specify a specific "cop" name, then I can get connected.

2 replies, 2 years ago
Does JDBC driver v3.3.0.0 silently ignore batch mode? Topic by dkarr-5910 07 Apr 2008

While searching various sites yesterday, I thought I read that the TeraData JDBC driver (at some version) has a bug that causes it to ignore "batch mode", such that multiple statements submitted in the same transaction would be sent to the database separately, instead of in a batch (batching would make it more efficient).

2 replies, 2 years ago
SQLException error codes Topic by channegan 05 May 2008

What SQLException error codes should I expect when exceeding query timeouts?Here's what I'm seeing when using JDBC...For MACRO calls, I’m using the java.sql.PreparedStatement. For STORED PROCEDURE calls, I’m using the java.sql.CallableStatement.For both MACRO and STORED PROCEDURE calls, I’m setting the timeout via the setQueryTimeout(int) method.When a MACRO exceeds the timeout threshold, I receive the following SQLException information…[NCR] [Teradata JDBC Driver] : HY000 802 : Timeout Packet stream read error: local="my server"/"my ip":"my port" remote="my server"/"my ip":"my port" cid=40e569 sess=1053567 Wed Apr 30 14:54:04 EDT 2008 vendorCode/errorCode is 802.When a STORED PROCEDURE exceeds the timeout threshold, I receive two different messages in the SQLException…[NCR] [Teradata JDBC Driver] : executeQuery error: The statement has been canceled by another thread at com.ncr.teradata.jdbc_4.util.ErrorFactory.makeDriverJDBCException( at com.ncr.teradata.jdbc_4.util.ErrorFactory.makeDriverJDBCException( at com.ncr.teradata.jdbc_4.util.ErrorAnalyzer.analyzeError( at com.ncr.teradata.jdbc_4.Statement.executeStatement( at com.ncr.teradata.jdbc_4.PreparedStatement.execute( at com.ncr.teradata.jdbc_3.ifjdbc_4.TeraLocalCallableStatement.execute( vendorCode/errorCode is 751I've also seen the same information as the MACRO timeout:[NCR] [Teradata JDBC Driver] : HY000 802 : Timeout Packet stream read error: local="my server"/"my ip":"my port" remote="my server"/"my ip":"my port" cid=1ee926 sess=1411733 Tue Apr 29 21:30:13 EDT 2008 However, I cannot recreate the last exception when debugging.Does anyone know why I'm seeing mixed results between MACRO vs STORED PROCEDURE timeouts?Does anyone know why I'm seeing mixed results between STORED PROCEDURE timeouts?What other vendorCodes/errorCodes can I expect when a query via JDBC is canceled due to a timeout?I need to be able to separate the differences between a sql timeout versus a "real" database problem. Since JDBC driver only throws SQLExceptions, I know of no other way than by inspecting SQLException attributes. I'm doing this by the following code snippet: private void processSQLExceptionForTimeOut(SQLException e) throws SQLException { if(e.getErrorCode() == 802 || e.getErrorCode() == 751 || e.getMessage().contains("Timeout Packet stream read error") || e.getMessage().contains("executeQuery error: The statement has been canceled by another thread")) { //process timeout } else { //a "real" database problem may exist? } throw e; }Let me know if you need more information in terms of Driver Version and/or MACRO/PROCEDURE definitions, or information on the Teradata software/hardware version.Thanks in advance,Chris

1 reply, 2 years ago
fastexport with JDBC Topic by kutsyy 18 Jul 2008

type=fastload will allow to use multi session fastload with JDBC driver, does anyone know if there is a way to use fastexport with JDBC?Thanks,Vadim

1 reply, 2 years ago
User Provisioning with Identity Management Systems Topic by rodrigo.vazquez 03 Aug 2011

Hi!, I'm trying to integrate Teradata with our Identity Management Solution. I would like to know the way for adding users via command line, SQL/JDBC query, API, and so on.

Best regards

2 replies, 2 years ago
JDBC Fetch Size Topic by sergiov 21 Dec 2006

Hi,I am trying to limit the number of rows that are being fetched by the result set at a time using the following code.Connection conn = DriverManager.getConnection( url, user, pass );Statement stmt = conn.createStatement();stmt.setFetchDirection( ResultSet.FETCH_FORWARD );stmt.setFetchSize( 100 );ResultSet rs = stmt.executeQuery( "SELECT * FROM table1, table2" );However, this does not seem to work. The entire result set is being loaded instead of 100 rows at a time. I am using the latest JDBC Dricer and Terdata DB version 6 release 2.I looked into the documentation for the JDBC driver and it states "the method issupported by the Teradata JDBC driver, but is not supported by the TeradataDatabase".Can anyone shed some light on this issue? or is there another way to perform this same task?Thanks

1 reply, 2 years ago
ETLAdmin jdbc Version Topic by liyongjiang5527 04 Jul 2012 etladmin jdbc odbc win7 64bit oracle

When I change my operating system to win7 64bit , I connot connect my ETL Service by ETLAdmin because of  that I cannot create a 32bit obdc connection to my orace ETL repository an more.
So I modified the ETLAdmin.jar file ,and it connects etl repository through jdbc connections instead of odbc connections.

0 replies
SSO Integration through site minder or LDAP Topic by Subhash.Gander 04 Aug 2009

In our project setup BO uses hard coded user id and password to fetch the data from teradata.
So for each user the generic ID is there in DBQL.

Now we want to integrate the SSO authentication either using LDAP or site minder.
Like if user ABC is the entered from BO then the same id should be there in DBQL rather then generic id.

Any Idea ?

7 replies, 2 years ago
Byte Field value is returing as "?" and Box Symbol in vb 6.0 Topic by ramsiva 02 Jul 2012 byte value in vb 6.0, byte value .net

Byte Field value is returning like Box Symbol with "?" Symbol , it is not in readable format in VB 6.0 after that i checked in Teradata SQL Assistant, in that byte field is returning value in readable format like 00-00-00. And i am very sure this problem is not happened due to my code problem and it is not a problem of ADO Object Library also.

2 replies, 2 years ago
.NET Data Provider, Provider Factory, cannot create DataSource Enumerator Topic by ysrinu 24 Jun 2012 odbc, .net data provider, provider factory, datasource enumerator

I have added reference to Teradata.Client.Provider (.NET Data Provider for Teradata, Runtime v2.0.50727) to my Visual Studio C# 2010 project
Now, i want to get list of all ODBC names for Teradata

I included the namespace for Teradata.Client.Provider

1 reply, 2 years ago
python / odbc connection to TD Topic by vijaynori 21 Jun 2012 teradata, odbc, python


Windows setup: (tdicu, TeraGSS, tdodbc), Python-2.7.3, pyodbc-3.0.3


I am able to extract data from using tdxodbc.  The following piece of python code also works fine -- 



>>> import pyodbc

0 replies
Problem with starting teradata 13.0 service control Topic by yaragalaramesh 19 Jun 2012 i need immediate solution please





    I installed Teradata 13.0 express edition after completion of installation for few days it is working good.

1 reply, 2 years ago
Problem with starting teradata 13.0 service control Topic by yaragalaramesh 19 Jun 2012 i need immediate solution please





    I installed Teradata 13.0 express edition after completion of installation for few days it is working good.

0 replies