All Forums General
AshaMR 6 posts Joined 04/16
14 Apr 2016
Set tenacity and sleep in Tearadata JDBC

Hello,
How to set tenacity ans sleep parameters in terdata JDBC ?
Thanks

Asha
Fred 1096 posts Joined 08/04
14 Apr 2016

For Teradata utilities, it is generally recomended to use Utility Throttles rather than the old Tenacity / Sleep approach.
 
If you require similar behavior, the JDBC application could be coded to explicitly recognize a 2633 database error code, sleep, and retry. Such functionality is not available in the driver itself.

AshaMR 6 posts Joined 04/16
14 Apr 2016

Thanks for the reply. I tried using GOVERN=ON in the connection URL inorder to delay the fastload job when the limit is reached. But the delay is not happening. Could you please suggest any other parameter ?

Asha

AshaMR 6 posts Joined 04/16
14 Apr 2016

I get the following exception :

java.sql.SQLException: [Teradata Database] [TeraJDBC 15.10.00.09] [Error 2633] [SQLState HY000] Too many load/unload tasksrunning: try again later

I tried using GOVERN=ON in the connection URL inorder to delay the fastload job when the limit is reached. But the delay is not happening. Could you please suggest any other parameter ?

Asha

Fred 1096 posts Joined 08/04
17 Apr 2016

It appears you don't have utility throttles defined in workload management.
 
In that case, the logic to catch the 2633 error, sleep, and retry would have to be added to the Java application coding.

tomnolan 594 posts Joined 01/08
18 Apr 2016

Fred is correct -- "tenacity" and "sleep" functionality are NOT provided by the Teradata JDBC Driver, and if you want that kind of functionality in your application, then you must code your application to behave that way.

ToddAWalter 316 posts Joined 10/11
18 Apr 2016

Or better yet, get the DBA/admin folks for your system to enable utility throttles in the database.

AshaMR 6 posts Joined 04/16
18 Apr 2016

Thanks for the reply. I will try the option suggested.

Asha

AshaMR 6 posts Joined 04/16
19 Apr 2016

DBA has enabled utility throttles in the database. How can i set the delay parameter because i am still getting the SQL exception !

Asha

tomnolan 594 posts Joined 01/08
19 Apr 2016

The Viewpoint User Guide is available here:
http://developer.teradata.com/viewpoint/reference/user-guide
 
In the Teradata Viewpoint 15.11 User Guide, you will want to review Chapter 33 "Workload Management".
 

AshaMR 6 posts Joined 04/16
20 Apr 2016

We have enabled 'delay' checkbox in utility limit. Can we set any number as to how long the request will be in delay queue ?

Asha

tomnolan 594 posts Joined 01/08
21 Apr 2016

Carrie's blog has some additional information about this topic. She lists the benefits of Utility Limits (a.k.a. Utility Throttles) over the old tenacity and sleep approach.
https://developer.teradata.com/blog/carrie/2009/05/utility-throttles-you-won-t-regret-it
 
I checked with the Viewpoint team and confirmed that it is not possible to specify a delay duration for a Utility Limit. When the delay checkbox is checked, a utility job will be delayed indefinitely until a utility job slot becomes available.
 
As Carrie noted in her blog, delayed utility jobs are kept in a FIFO queue. When a utility job slot becomes available, the delayed utility job at the head of the queue is released.
 

You must sign in to leave a comment.