Exception occored when using JDBC FastExport

Database
N/A

Exception occored when using JDBC FastExport

Hi,

  I'm using JDBC FastExport, my database and jdbc driver are both 14. My database url is jdbc:teradata://db/DATABASE=test,TMODE=ANSI,CHARSET=UTF8,TYPE=FASTEXPORT,spoolmode=nospool,  I got an exception when runing the program:http://developer.teradata.com/doc/connectivity/jdbc/reference/current/samp/T20307JD.java.txt

  Message: [Teradata JDBC Driver] [TeraJDBC 14.00.00.12] [Error 1262] [SQLState HY000] The next failure(s) in the exception chain occurred while creating FastExport resources for statement SELECT L_INDEX, L_SMALLINT, L_DATE, L_TEXT FROM T20306JD. Found 48 AMP(s) and created 0 FastLoadConnection(s) and 0 FastLoadPreparedStatement(s) with SESSIONS=0, but all FastExport resources that were created have now been closed.com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 14.00.00.12] [Error 1262] [SQLState HY000] The next failure(s) in the exception chain occurred while creating FastExport resources for statement SELECT L_INDEX, L_SMALLINT, L_DATE, L_TEXT FROM T20306JD. Found 48 AMP(s) and created 0 FastLoadConnection(s) and 0 FastLoadPreparedStatement(s) with SESSIONS=0, but all FastExport resources that were created have now been closed.

  The same program can be run successfully on TD12. Is there anyone have any idea about what's going on?

Thanks

Toify

Tags (3)
1 REPLY
Teradata Employee

Re: Exception occored when using JDBC FastExport

You listed the parameter spoolmode=nospool in your JDBC connection URL, but there is no such Teradata JDBC Driver connection parameter. You should remove that. Your application cannot choose whether or not to use FastExport direct with no spooling, because JDBC FastExport leaves that decision up to the Teradata Database.

I just tested sample program T20307JD with Teradata Database 14.00.00.15 and Teradata JDBC Driver 14.00.00.14, and it worked OK -- see the output below. The SQLWarning in the output is expected, because it indicates that the Teradata Database chose to use FastExport direct with no spooling.

Please post the entire output from your run of sample program T20307JD, if you still need assistance with troubleshooting this.

Thanks,

--Tom

Sample T20307JD starting: Fri Aug 03 06:44:59 PDT 2012

 Looking for the Teradata JDBC driver...

 Teradata JDBC driver loaded.

 Attempting to connect to Teradata...

 Connection to Teradata established.

 Creating a Statement object...

 Created a Statement object.

 Creating table T20307JD...

 Created table T20307JD.

 Creating a PreparedStatement object for INSERT...

 Created a PreparedStatement object for INSERT...

 Creating a PreparedStatement object for SELECT...

 Created a PreparedStatement object for SELECT...

 Binding data rows...

 Inserting data rows...

 Binding parameter marker...

 Selecting data rows...

  T20307JD row 1, col 1: L_INDEX=1

  T20307JD row 1, col 2: L_SMALLINT=11

  T20307JD row 1, col 3: L_DATE=2008-01-18

  T20307JD row 1, col 4: L_TEXT=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

*** SQLWarning caught ***

SQL State = HY000, Error Code = 1298

java.sql.SQLWarning: [Teradata JDBC Driver] [TeraJDBC 14.00.00.14] [Error 1298] [SQLState HY000] FastExport WITH NO SPOOL is being used for statement SELECT L_INDEX, L_SMALLINT, L_DATE, L_TEXT FR

OM T20307JD WHERE L_SMALLINT=?

        at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeSQLWarning(ErrorFactory.java:286)

        at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeSQLWarning(ErrorFactory.java:261)

        at com.teradata.jdbc.jdbc.fastexport.FastExportManagerPreparedStatement.execute(FastExportManagerPreparedStatement.java:1159)

        at com.teradata.jdbc.jdbc.fastexport.FastExportManagerPreparedStatement.executeQuery(FastExportManagerPreparedStatement.java:1216)

        at T20307JD.main(T20307JD.java:202)

 Closing PreparedStatement object for SELECT...

 PreparedStatement object for SELECT closed.

 Closing PreparedStatement object for INSERT...

 PreparedStatement object for INSERT closed.

 Closing Statement object...

 Statement object closed.

 Closing Connection to Teradata...

 Connection to Teradata closed.

Sample T20307JD finished. Fri Aug 03 06:45:23 PDT 2012