Forum OpenACS Q&A: AOLserver and Oracle 9i

Collapse
Posted by Niels Hallenberg on
Hi there,

I have a question regarding support for Oracle 9i in AOLserver. I'am currently using AOLserver v. 3.4 and v. 2.5 of the oracle driver originally distributed by ArsDigita accessing an Oracle 8.1.7 database. My question is whether I can upgrade Oracle to 9i and still use AOLserver and the Oracle driver?

I have been browsing serveral forums here at OpenACS, Google and AOLserver.com looking for information about AOLserver accessing Oracle 9i. I understand that the OpenACS source code does not work with Oracle 9i, but I can't figure out whether the Oracle driver works with Oracle 9i. It seems that the latest version is 2.6 (found in the AOLserver CVS repository) and that it was released before Oracle 9i. I have read a few recent postings about the driver here at OpenACS and it seems that the Oracle driver has only been in the AOLserver CVS repository (at SourceForge) for a few month.

It is not a problem for me that the OpenACS code does not work with Oracle 9i, because my focus is very different. I'am a co-developer of SMLserver (www.smlserver.org) which is basically a plugin to AOLserver that makes it possible to script with Standard ML instead of Tcl, and we are facing two problems:

  1) we would like to support Oracle 9i. Is this really a problem?

  2) we would like to support bind-variables, clobs and function calls to Pl/SQL which are not supported by the AOLserver DB API. This means that we must extend the driver code in order to support these functionalities in Standard ML - in the same way that the current driver support these functionalities in special Tcl-functions. This raises my next question: What version of the driver should we base our implementation on (I guess the answer i v. 2.6)?

Even though that I'am not asking a question directly related to OpenACS (which by the way is a very impressive system), I know that you have a huge knowledge base about these issues and hope that you will respond to my question

Sincerely Yours

Niels Hallenberg (mailto:nh@it-c.dk)

Collapse
Posted by Jeff Davis on
I believe the driver works fine in 9i (and if not please post bugs at sourceforge).  The sourceforge version is the
currently maintained version and has a number of bug fixes and
code cleanup beyond what was in the last aD release.
Collapse
Posted by Doug Harris on
We run AOLserver3.3+ad13 with Oracle 9i. I've got it working fine with two different oracle drievers -- one linked with 8i client libraries, one with 9i client libraries.

As for bind variables, clobs & function calls, we use ACS, so we've got it. The oracle driver may already have that for you. I just did a quick scan of ora8.c and found:

/* this is the moby ns_ora Tcl command, it does resultrows, resultid,
   clob/blob_dml and clob/blob_dml_file, and clob/blob_get_file

   syntax:
      ns_ora dml db ?-bind set? query ?bindval1? ?bindval2? ...
      ns_ora array_dml db ?-bind set? query ?bindarray1? ?bindarray2? ...
      ns_ora clob_dml db query clob_value_1 ... clob_value_N
      ns_ora blob_dml db query clob_value_1 ... clob_value_N
      ns_ora clob_dml_file db query file_name_1 ... file_name_N
      ns_ora blob_dml_file db query file_name_1 ... file_name_N
      ns_ora clob_get_file db query file_name
      ns_ora blob_get_file db query file_name
      ns_ora write_clob db query ?nbytes?
      ns_ora write_blob db query ?nbytes?
   The query for the clob/blob_get_file should return just one value
 */
Check the archives of the aolserver mailing list over at aolserver.com. I think you'll need to join the list to view the archives, but it's painless.

Another reason to look at the archives... earlier this month there was an extensive discussion about providing support for other languages within AOLserver.

Collapse
Posted by Niels Hallenberg on
Thanks for your info.

It's right that the driver already contains support for clobs etc. but the functionality is bound to Tcl-functions (e.g., ns_ora) and we have to bind it to Standard ML functions, and this is where we have to do our own editing in the driver code.

I have just joined the AOLserver mailinglist and looks forward to some interesting discussions...

Cheers,

Niels