I have an active Oracle operation which is taking too long. How can I programmatically cancel the operation without terminating the session?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The OCI library provides this functionality. The canonical example is a client pressing control-C during the long-running operation, getting control of the program back through
the signal handler, and then cancelling the long-running operation.
Internally, the client will send an urgent message over the TCP connection,
and the server side will process the termination via a SIGURG handler. The
client operation will receive this status.
OCIBreak()http://docs.oracle.com/cd/B10500_01/appdev.920/a96584/oci16m96.htm
http://docs.oracle.com/cd/A97630_01/appdev.920/a96584/oci02bas.htm
(at “Cancelling Calls”)
conn.cancel()http://cx-oracle.sourceforge.net/html/connection.html