My Oracle Support Banner

Using OCIBreak() Inside OCCI To Terminate Long-running Statements (Doc ID 566643.1)

Last updated on JUNE 27, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.8 and later
Oracle Database Cloud Schema Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Linux x86
Microsoft Windows (32-bit)
HP-UX PA-RISC (64-bit)
IBM AIX on POWER Systems (64-bit)
Oracle Solaris on SPARC (64-bit)
Linux x86-64

Goal

This OCCI Sample shows how to cancel long running statement to Database by using a monitoring thread which issues OCIBreak() after specified amount of time.

Threads have to be used because OCCI does not support non-blocking mode as OCI does

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
 Requirements
 Configuring
 Instructions
 Sample Code
 Sample Output
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.