Home » Developer & Programmer » Precompilers, OCI & OCCI » ORA-00607: Internal error occurred while making a change to a data block
ORA-00607: Internal error occurred while making a change to a data block [message #242259] Fri, 01 June 2007 06:50 Go to next message
adii28
Messages: 2
Registered: June 2007
Junior Member
hey,

I am trying to do this, using oci connect to a database in THREADED env and after processing some selects and updates, close the connection. The application then sleeps for a few and connects again to the database.
The issue is the app runs fine for few hours but then crashes sometimes with no error and sometimes i get this

ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [17], [20], [], [], [], [], []
ORA-00604: error occurred at recursive SQL level
1

Here is a snapshot of my code.

i have wrapped oci calls and use them as shared libs.
* connect module - this is how i create the env and connect to db
if (!oci_env_created) {
    r=OCIEnvCreate( &conn->env, 
          OCI_DEFAULT |
          OCI_THREADED
        , 0, 0, 0, 0, 0, 0); 

    if (r != OCI_SUCCESS) {
      strcpy(errmsg,"Could not create environment (OCIEnvCreate)";
      goto clean_up;
    }
    oci_env_created = 1;
  }

  OCIHandleAlloc(conn->env, (dvoid**)&conn->err, OCI_HTYPE_ERROR,   0, 0);
  OCIHandleAlloc(conn->env, (dvoid**)&conn->srv, OCI_HTYPE_SERVER,  0, 0);
  OCIHandleAlloc(conn->env, (dvoid**)&conn->svc, OCI_HTYPE_SVCCTX,  0, 0);
  OCIHandleAlloc(conn->env, (dvoid**)&conn->ses, OCI_HTYPE_SESSION, 0, 0);

r=OCIServerAttach(conn->srv, conn->err, dbname, strlen((const char*)dbname), (ub4) OCI_DEFAULT);
  if (r != OCI_SUCCESS) {
    checkerr(conn->err, r, errmsg);
    goto clean_up;
  }

    OCIAttrSet(conn->svc, OCI_HTYPE_SVCCTX, conn->srv, 0, OCI_ATTR_SERVER,  conn->err);

  OCIAttrSet(conn->ses, OCI_HTYPE_SESSION, username, strlen((const char*)username), OCI_ATTR_USERNAME, conn->err); 
  OCIAttrSet(conn->ses, OCI_HTYPE_SESSION, password, strlen((const char*)password), OCI_ATTR_PASSWORD, conn->err); 

  if ( (r=OCIAttrSet((dvoid *) conn->svc, (ub4) OCI_HTYPE_SVCCTX, (dvoid *) conn->ses, (ub4) 0, (ub4) OCI_ATTR_SESSION, conn->err)) ) {
    checkerr(conn->err, r,errmsg);
    goto clean_up;
  }

  r=OCISessionBegin (conn->svc, conn->err, conn->ses, OCI_CRED_RDBMS, OCI_DEFAULT);
  if (r != OCI_SUCCESS) {
    checkerr(conn->err, r,errmsg);
    goto clean_up;
  }


* following is the code for terminating the connection

if ((r = OCIHandleFree((dvoid*) sh, (ub4) OCI_HTYPE_STMT))) {
      checkerr(conn->err, r, (text*)errmsg);
      return 0;
    }
	if ((r = OCISessionEnd(conn->svc, conn->err, conn->ses, OCI_DEFAULT))) {
      checkerr(conn->err, r, (text*)errmsg);
      return 0;
    }
    if ((r = OCIServerDetach(conn->srv, conn->err, OCI_DEFAULT))) {
      checkerr(conn->err, r, (text*)errmsg);
      return 0;
    }
    if ((r = OCIHandleFree((dvoid*) conn->svc, (ub4) OCI_HTYPE_SVCCTX))) {
      checkerr(conn->err, r, (text*)errmsg);
      return 0;
    }
    if ((r = OCIHandleFree((dvoid*) conn->srv, (ub4) OCI_HTYPE_SERVER))) {
      checkerr(conn->err, r, (text*)errmsg);
      return 0;
    }
    if ((r = OCIHandleFree((dvoid*) conn->err, (ub4) OCI_HTYPE_ERROR))) {
      return 0;
    }
    return 1;


any insight is appreciated
thanks
Re: ORA-00607: Internal error occurred while making a change to a data block [message #242700 is a reply to message #242259] Mon, 04 June 2007 13:33 Go to previous message
adii28
Messages: 2
Registered: June 2007
Junior Member
Ok,
I do not get the error
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [4194], [17], [20], [], [], [], [], []
ORA-00604: error occurred at recursive SQL level
1

anymore. This was traced down to a fault with the DB setup.

But the issue of app crashing without any error message from ORACLE is still happening.
Are there known issues with running OCI in Threaded mode?
I have separate env handles for each thread, and establish a separate connection.

thanks
Previous Topic: Procob not found
Next Topic: how to update BLOB using OCCI (C++)?
Goto Forum:
  


Current Time: Mon Dec 05 06:35:36 CST 2016

Total time taken to generate the page: 0.12562 seconds