Forum OpenACS Q&A: Oracle 9i and Oracle Driver

Collapse
Posted by Barry Books on
I'm moving an ACS site to 9i and Aolserver 4.0. I've built nsoracle-2.6 and linked with the oci9 libs and I started getting this in my logs. It appears from the Oracle site there is a change in the drivers that requires initilizing bind variables. I'm assuming this requires a driver change. Does anyone have a patch?
[17/Sep/2003:14:32:28][2360.6][-conn:openacs::2] Error: SQL():
ora8.c:3370:ora_tcl_command: error in `OCIStmtExecute ()': ORA-01480: trailing null missing from STR bind value

The code is

       set out [ns_ora exec_plsql $db  {
        declare
                status  number;
                line    varchar2(4000);
                ret     varchar2(32000);
        begin
                status := 0;
                ret := ' ';

                while  status = 0  loop
                        dbms_output.get_line(line,status);
                        if ( status = 0 ) then
                                ret :=  ret ||  line || '
'; end if; end loop; :1 := ret; end; } ]
Collapse
Posted by Guan Yang on
Could you possibly post the Makefile you used to compile nsoracle-2.6 with Oracle 9i? I haven't been able to do this.

Guan

Collapse
Posted by Barry Books on
I don't have the 2.6 code anymore. I have compiled the 2.7 driver with 9i. I do recall having compile problems with 2.6. If you post the problem I might remember what I did to fix it
Collapse
Posted by Don Baccus on
People have been running OpenACS with 9i for months now, if not a year.  I don't know if a later version of the driver is needed or not, though.
Collapse
Posted by Guan Yang on
Don,

Thanks, that's reassuring to know. I didn't know that any OpenACS users ran 9i.

Maybe not, but in any case nsoracle-2.6 doesn't compile "out of the box" with 9i client. I'm trying to work out how to compile it.

Guan

Collapse
Posted by Barry Books on
Get the 2.7 driver. The 2.6 driver predates 9i and you are correct it does not compile.
Collapse
Posted by Guan Yang on
The 2.7 driver won't work either - it triggers bug #1720.
Collapse
Posted by Tom Ayles on

Guan, I think the 2.7 driver (as a tarball from the sourceforge page) works fine with 9i, and it's the latest nsoracle from CVS that causes this bug. There's a bit more in this thread.