SQL Developer 中执行TimesTen查询超时问题的解决

SQL*Developer成功连到TimesTen后,执行一个大查询,约60秒后,查询被中断,报错为:

TT6111 Error: SQL statement has reached its timeout limit and has been terminated

通过ttconfiguration查询到在SQL*Developer中的相关超时配置,发现PLSQL_TIMEOUT是默认值,而SQLQueryTimeout为59,不是默认值0(即无超时)。由于此处执行的是SQL 语句,而非过程,因此PLSQL_TIMEOUT与本问题无关:

Command>call ttconfiguration  
...  
PLSQL_TIMEOUT 30   
SQLQueryTimeout 59  
...

在连接属性中设置SQLQueryTimeout 为120,失败,错误为:

Query Timeout must be numeric; if the Network Timeout is non-zero, the Query Timeout must be greater than zero and less than the Network Timeout, else if the Network Timeout is zero, the Query Timeout must be greater than or equal to zero.

这个错误不是很明显,我发现只要设成59以下的可以成功,否则失败。
查阅了MOS,发现了原因,即SQLQueryTimeout 必须小于TTC_Timeout。然后在连接属性中同时设置这两个值,并且将TTC_Timeout设大一些就解决了。

这里写图片描述

最后补充一点,在TimesTen中暂无方法检测TTC_timeout的设定值,如果你设置了它,你自然知道它的值;否则,它的默认值是60秒。这也是在SQL Developer中为何将sqlquerytimeout设置为59的原因

参考

  • How To Resolve This Error: TT6111 Error: SQL statement has reached its timeout limit and has been terminated? (Doc ID 1606951.1) To BottomTo Bottom
  • HOWTO : Understand Configuring PLSQL_TIMEOUT and TTC_Timeout (Doc ID 1471574.1)

猜你喜欢

转载自blog.csdn.net/stevensxiao/article/details/80290316