Query Timeout again....

Connectivity

Query Timeout again....

Hello,
I am creating a reporting application that requires me to connect to a Teradata DW. know on small queries it works great but when it comes to the larger ones is where i have the issues. I know the default is 30 Sec but nothing i do seems to fix the problem.

I have tried the TDcommand.connection timeout but it doesn't seem to like me it say the connection does exist even though i just pull info from it on a small query here is a sample:

Dim ds As System.Data.DataSet = New System.Data.DataSet

Dim OConn As Teradata.Client.Provider.TdConnection = New TdConnection()
Dim da As Teradata.Client.Provider.TdDataAdapter
Dim sql1 As String = "select names from empolyees"

OConn.ConnectionString = "Data Source=Teradatatest.net;User ID=123456;Password=teradata;"
da = New Teradata.Client.Provider.TdDataAdapter(sql1, OConn)
OConn.Open()

Dim cmd As Teradata.Client.Provider.TdCommand = New Teradata.Client.Provider.TdCommand
cmd.CommandTimeout = 0 <- errors here "Connection doesn't exist"

da.Fill(ds)

Me.GridView1.DataSource = ds
Me.GridView1.DataBind()

as you can see above i am running a query against the TDW and filling a DS which i attach to a Gridview so i can make sure its working.

my questions are.

1) what am i doing wrong above?
2) can i set the Teradata connection/query timeout another way? as i would rather create the dataset files in VS gui so i can attached to my control instead of coding everything.

thanks,
Matt
3 REPLIES
Teradata Employee

Re: Query Timeout again....

TdDataAdapter(String, TdConnection) constructor is used to initialize the DataAdapter. Therefore TdDataAdapter creates an internal TdCommand object and initializes it with the SQL String.

Set the command timeout on TdDataAdapter.SelectCommand property; for example adapter.SelectCommand.CommandTimeout = 900;

Re: Query Timeout again....

Using TeraDataExpress VMWare v14.00.00.01 and Teradata JDBC driver 14.00.00.30, I am receiving the following error when trying to run a small query:

ODI-1227: Task SrcSet0 (Loading) fails on the source TERADATA connection MACYS.

Caused By: com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 14.00.00.30] [Error 804] [SQLState 08S01] Socket communication failure for Packet receive Sat Feb 16 08:36:12 EST 2013 socket orig=192.168.197.128 local=0.0.0.0/0.0.0.0:55697 remote=/192.168.197.128:1025 keepalive=unavailable nodelay=unavailable receive=unavailable send=unavailable linger=unavailable traffic=unavailable concurrent=3 contimeout=10000 conwait=1000 connecttime=2 connecttotaltime=2 connectattempts=1 connectfailures=0 failurecache={} cid=158ad1c sess=1052 java.io.IOException: Incomplete LAN message header: read 0 bytes   at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:674)   at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:831)   at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:144)   at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:122)   at com.teradata.jdbc.jdbc_4.statemachine.PreparedStatementController.run(PreparedStatementController.java:49)   at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:380)   at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:322)   at com.teradata.jdbc.jdbc_4.TDPreparedStatement.doPrepExecuteQuery(TDPreparedStatement.java:182)   at com.teradata.jdbc.jdbc_4.TDPreparedStatement.executeQuery(TDPreparedStatement.java:2359)   at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)   at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)   at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)   at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)   at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)   at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)   at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)   at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)   at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)   at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)   at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)   at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)   at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)   at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)   at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)   at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)   at java.lang.Thread.run(Thread.java:662) 

               at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:93)

               at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:68)

               at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeIoJDBCException(ErrorFactory.java:206)

               at com.teradata.jdbc.jdbc_4.util.ErrorAnalyzer.analyzeIoError(ErrorAnalyzer.java:61)

               at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:838)

               at com.teradata.jdbc.jdbc_4.statemachine.StatementReceiveState.action(StatementReceiveState.java:144)

               at com.teradata.jdbc.jdbc_4.statemachine.StatementController.runBody(StatementController.java:122)

               at com.teradata.jdbc.jdbc_4.statemachine.PreparedStatementController.run(PreparedStatementController.java:49)

               at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:380)

               at com.teradata.jdbc.jdbc_4.TDStatement.executeStatement(TDStatement.java:322)

               at com.teradata.jdbc.jdbc_4.TDPreparedStatement.doPrepExecuteQuery(TDPreparedStatement.java:182)

               at com.teradata.jdbc.jdbc_4.TDPreparedStatement.executeQuery(TDPreparedStatement.java:2359)

               at oracle.odi.query.JDBCTemplate.executeQuery(JDBCTemplate.java:189)

               at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:89)

               at oracle.odi.runtime.agent.execution.sql.SQLDataProvider.readData(SQLDataProvider.java:1)

               at oracle.odi.runtime.agent.execution.DataMovementTaskExecutionHandler.handleTask(DataMovementTaskExecutionHandler.java:70)

               at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)

               at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)

               at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)

               at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)

               at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)

               at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)

               at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)

               at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)

               at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)

               at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)

               at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)

               at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)

               at java.lang.Thread.run(Thread.java:662)

Caused by: java.io.IOException: Incomplete LAN message header: read 0 bytes

               at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.read(TDNetworkIOIF.java:674)

               at com.teradata.jdbc.jdbc_4.io.TDPacketStream.readStream(TDPacketStream.java:831)

               ... 24 more

JDBC Driver Info:  com.teradata.jdbc.TeraDriver

JDBC URL:  jdbc:teradata://192.168.44.128

I can successfully ping the database and reverse engineer the table structure, so I'm not sure what to do to resolve this error.  Any ideas?

Peter

Teradata Employee

Re: Query Timeout again....

Peter, this thread was regarding the .NET Data Provider for Teradata. Please create a new thread for your issue. Thanks.