Dmitry Khalatov
Dmitry Khalatov

Reputation: 4369

Oracle - OCI query timeout

Is there any way to set a timeout on Oracle OCI calls (OCIStmtExecute for example) ?

Thanks

Upvotes: 3

Views: 7555

Answers (3)

AXE Labs
AXE Labs

Reputation: 4541

PHP's OCI module can do it according to this comment:

http://www.php.net/manual/en/function.oci-connect.php#84144

Upvotes: -1

user199543
user199543

Reputation: 1

Timeouts can be set on oracle server side, but not through any OCI APIs.

Upvotes: 0

Quassnoi
Quassnoi

Reputation: 425371

There is no way provided by OCI itself.

You can create a Timer and issue an OCIBreak() on timeout.

OCIBreak() is thread safe and signal safe.

Upvotes: 5

Related Questions