Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reconnection issue for Oracle ODBC Driver

3281761Aug 20 2016 — edited Sep 21 2016

Hi,

I'm working on oracle odbc driver.

I have an oracle database created which being accessed by windows application.

Application is working fine with proper internet connection but when network fails abruptly I need to restart the application to make the db services accessible.

So, when network or communication related issues occurs, I'm trying to re initialize the database.

To reset the database I'm doing following things/steps:

1. freeing all sql statement handlers being used.

2. disconnecting odbc handlers

3. freeing odbc handlers

4. then connecting odbc

5. allocating and binding the sql statement handlers

Is there anything I'm missing? or any sequence goes wrong?

Getting following errors when I'm trying to reset the database after network failure:

ERR - SQL State: 08S01, Native Err: 3113, Msg: [Oracle][ODBC][Ora]ORA-03113: end-of-file on communication channel

<re initialising data>

ERR - ODBC hstmt1 SQLBindParameter() pos: 16 failed.

ERR - SQL State: HY090, Native Err: 0, Msg: [Microsoft][ODBC Driver Manager] Invalid string or buffer length

ERR - SQLExecute(hstmt2) failed.

These are being thrown when there is no any db operation (like select or fetch) in process, just a initialization is being processed.

But while data is being processed and if network fails, then on reseting the db it throws Invalid Cursor State error.

Sometimes database reset operation gets successfully done with the above steps but after that it throws errors below,

ERR - SQL State: HY010, Native Err: 0, Msg: [Microsoft][ODBC Driver Manager] Function sequence error

ERR - ODBC SQLFetch() failed.

<processing>...

ERR - SQL State: 24000, Native Err: 0, Msg: [Oracle][ODBC]Invalid cursor state.

<processing>...

ERR - SQL State: 07001, Native Err: 1008, Msg: [Oracle][ODBC][Ora]ORA-01008: not all variables bound

ERR - SQL State: 01S02, Native Err: 0, Msg: [Oracle][ODBC]Option value changed.

ERR - SQL State: 07001, Native Err: 1008, Msg: [Oracle][ODBC][Ora]ORA-01008: not all variables bound

ERR - SQLExecute(hstmt3) failed.

Please, help me how to reset the database on communication and invalid cursor state error? and is there any way to check if cursor is already opened?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2016
Added on Aug 20 2016
1 comment
1,292 views