2013-10-03 34 views
1

是否可以设置TENACITY & SLEEP for TERADATA通过JAVA JDBC调用FASTLOADCSV?
我的JDBC连接字符串是

jdbc:teradata://99.99.99.99/TMODE=ANSI,CHARSET=UTF8,TYPE=FASTLOADCSV,LOG=INFO,SESSIONS=1

可以执行FASTLOAD脚本时设置这些选项如下所示: -
By default the Tenacity feature is not turned on. The feature is turned on by the script command: Tenacity n;
使用Teradata jdbc驱动程序设置FASTLOADCSV Tenacity&Sleep

Where n specifies the number of hours FastLoad continues trying to logon. The n specification must be greater than zero. If zero is entered, Teradata FastLoad responds with an error message and terminates. During the Tenacity duration, FastLoad tries to log on every 6 minutes by default. The 6 minute default can be changed by using the script command: Sleep m;

Where m specifies the number of minutes Teradata FastLoad sleeps before retrying the logon operation. The m specification must be greater than zero. If zero is entered, Teradata FastLoad responds with an error message, and terminates.

Below is an example of Tenacity usage. Suppose the commands in the script are: Tenacity 1;

Sleep 15;

The Tenacity duration is 60 minutes and the Sleep interval is 15 minutes.

可以通过JDBC执行FASTLOADCSV当这些选项SBE集?

回答

1

我不认为这些选项存在,因为FASTLOADCSV与FastLoad不一样,它只是使用低级FastLoad 协议

您可能必须在程序中实现睡眠和韧度逻辑,在连接时检查2633(?)错误。

+0

这就是我所担心的。我们看;可能发生:com.teradata.jdbc.jdbc_4.util.JDBCException:[Teradata JDBC驱动程序] [TeraJDBC 14.00.00.21] [错误1384] [SQLState HY000]在 itializing FastLoad中发生故障,然后我们得到[Error 1383] [ SQLState HY000]在为目标数据库表创建FastLoad资源时发生了 异常链中的下一个故障。发现了882个AMP并创建了0个连接和0个PreparedStatement(s),其中 SESSIONS = 1,但创建的所有FastLoad资源现在都已关闭。 – Hector

+0

然后我们收到; [错误2633] [SQLState HY000]正在运行的加载/卸载任务太多:稍后再试 – Hector