Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Q: Compiling multi-threaded OCI app on AIX.

Q: Compiling multi-threaded OCI app on AIX.

From: <serg_at_msu.ru>
Date: Tue, 07 Dec 1999 20:24:21 +0300
Message-ID: <384D42C5.F2DADDDF@msu.ru>


Hello!

Have anybody compiled multi-threaded OCI application on AIX using xlc_r or xlC_r? According to Oracle documentation OCI libraries are thread-safe since Oracle 7.3. My environment is Oracle 7.3.4 and AIX 4.2.
I can compile the program by xlC_r but during the execution it terminates with:

ORA-01041: internal error. hostdef extension doesn't exist

When compiling by xlc it works fine. The prgram is as follows:

#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>

#include <ociapr.h>

#define HDA_SIZE 256

int
main()
{

        Lda_Def lda;
        ub1 hda[HDA_SIZE];
        text *uid = (unsigned char *)"user";
        text *passwd = (unsigned char *)"password";
        text *dbinst = (unsigned char *)"db_alias";

        opinit(OCI_EV_TSF);

        if( olog(&lda, (unsigned char *)&hda,
                         uid, -1, passwd, -1, dbinst, -1,
                         OCI_LM_DEF) )
        {
                unsigned char msg[128];
                sb2 errcode = ((Cda_Def *)&lda)->rc;
                (void) oerhms(&lda, errcode, msg, (sword) sizeof msg);
                fprintf(stderr, "%s\n", msg);
                exit(1);
        }

/* skipped */

        ologof(&lda);
        return 0;

}

Any hints will be useful.

Thanks in advance,
Serguei Afonin, MSU Received on Tue Dec 07 1999 - 11:24:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US