Handle and Descriptor Attributes 您所在的位置:网站首页 实在解决不了的问题 Handle and Descriptor Attributes

Handle and Descriptor Attributes

2023-04-06 06:59| 来源: 网络整理| 查看: 265

A database round-trip call using the service context times out within the specified time in milli-seconds, if not completed. When the call times out, a network timeout error is returned. This attribute can be set dynamically. Setting this value stays effective for all subsequent round-trip calls executed using the same service context until a different value is set. To remove the timeout, the value must be set to 0.

This is a client-only change. So, for using this feature, you must use a release 18c client. This feature is database version agnostic, that is, you can use this feature with any supported version of the database.

Timeout values set in different places are effective according to the following order of precedence (where 1 is the highest precedence):

Call timeout set on the OCI handle using OCIAttrSet().

Timeout set with the OCI attributes, OCI_ATTR_SEND_TIMEOUT and OCI_ATTR_RECEIVE_TIMEOUT.

Timeout set in the sqlnet.ora file with the parameters, SQLNET.RECV_TIMEOUT and SQLNET.SEND_TIMEOUT.

Error returned to the application:ORA-03156 "OCI call timed out" The Call timeout is on each individual round-trip between OCI and Oracle Database. Each OCI method or operation may require zero or more round-trips to Oracle Database. The timeout value applies to each round-trip individually, not to the sum of all round-trips. Time spent processing in OCI before or after the completion of each round-trip is not counted.

If the time from the start of any round-trip to the completion of the same round-trip exceeds the timeout value, then the operation is halted and an Oracle error is returned.

In the case where an OCI operation requires more than one round-trip and each round-trip takes less than the timeout value, then no timeout occurs, even if the sum of all round-trip calls exceeds the timeout value.

If no round-trip is required, the operation will never be interrupted.

After a timeout occurs, OCI attempts to clean up the internal connection state. The cleanup is allowed to take another timeout value. If the cleanup was successful, an ORA-3156 will be returned and the application can continue to use the connection.

For small values of the timeout value, the connection cleanup may not complete successfully within the additional timeout period. In this case an ORA-3113 is returned, and the following OCI call using the same connection gets an ORA-3114 and the connection will no longer be usable. It should be released.

Alternatively, the OCI_ATTR_BREAK_ON_NET_TIMEOUT attribute can additionally be set to FALSE. This setting drops the connection, eliminating calls to OCIBreak() and OCIReset() when a timeout occurs.

Note:

When call timeout is set, then ora-12161 may be returned while reading a large amount of data. This error must be treated as ora-3136.


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有