Open Cursor Issue and Crash on using CXX API interface #376
Replies: 3 comments
-
Hi, getting ORA-1000 error means you are creating too many OCI_Statement / ocilib::Statement at the same time ! Environment:Cleanup() wraps OCI_Cleanup(). While, C or C++ init and cleanup routines should bve called once per processs, you can still call them multiple times, from the moment there are always calls in pair in the right order. I had a quick look at your repo and I see a mix of C and C ++ APIs. Either use the C or C++ API but not both. Regards, Vincent |
Beta Was this translation helpful? Give feedback.
-
Hi, I ran your code and did not get any issues (in C or C++ mode). Regards, Vincent |
Beta Was this translation helpful? Give feedback.
-
Hi @vrogier , Thank you very much for reviewing my repo. It seems I did not handle the Statement class correctly in the repo. I made a few changes, and it seems to be working. Thanks for taking the time and helping when required. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @vrogier ,
I have developed c++ application using this ocilib.
my repo: https://github.com/ranganathanrajeshkumar/ocilibTest
I have observed a few issues:
ORA-1000: Open cursor
Oacle db is configured with open cursor to 300. On basic SELECT operation using this lob consumes more cursors in runtime, sometimes I observed ORA-1000 error
Environment:CleanUP()
Should this method always be called at the end of the main application, which is very different from OCI_CleanUP()?
I have created an SQLConnection class that acts like a SQL connection pool of 10. When the application ends, if I call
Environment::CleanUP() in the class destructor, the application crashes. I need to call it at the end of the main function.
w.r.t to OCI_Cleanup() I can call it in SQLConnection destructor.
Please, I request to go through this issue and share your feedback
Thanks
Rajesh
Beta Was this translation helpful? Give feedback.
All reactions