Forum OpenACS Development: Getting OpenACS to run with Oracle 9i

Collapse
Posted by Dirk Gomez on
I am trying to get OpenACS to run with Oracle 9i and I am having a bit of troubles. I suppose something in my environment is bogus, maybe someone can give me a pointer. Here's the logfile snippet:

[18/Jan/2004:11:46:55][21799.1024][-main-] Error: ora8.c:1143:ora_open_db: error in `OCISessionBegin ()': ORA-01017: invalid username/password; logon denied

SQL: [nil]

It's aolserver3_3_1_ad13, I compiled the driver against the Oracle 9i libs, my environment looks sane:

ORACLE_SID=ora92
ORACLE_BASE=/home/oracle
ORACLE_TERM=xterm
ORA_NLS33=/home/oracle/ora92/ocommon/nls/admin/data
ORACLE_HOME=/home/oracle/ora92

LD_LIBRARY_PATH sits correctly too.

And last but not least:

sqlplus openacs_head/foo@ora92

works fine too, so the TNS listener has been started duly as well.

My ini file has this

if { $database == "oracle" } {
    set db_user              openacs_head
    set db_password          foo
} else {
...
ns_section ns/db/pool/pool1
ns_param  maxidle            1000000000
ns_param  maxopen            1000000000
ns_param  connections        5
ns_param  verbose            $debug
ns_param  extendedtableinfo  true
ns_param  logsqlerrors      $debug
if { $database == "oracle" } {
    ns_param  driver            ora92
    ns_param  datasource        {}
    ns_param  user              $db_name
    ns_param  password          $db_password
}

Someone a good idea?

Collapse
Posted by Bruno Mattarollo on

Hey Dirk,

Just a guess but if you say that your sqlplus command line works fine with the @ORACLE_SID at the end, try modifying your:

ns_param datasource {}
to add the ORACLE_SID and see if that works.

Collapse
Posted by Brian Fenton on
Hi Dirk,

what's your tnsnames.ora entry look like? Try adding an identical one called ora92.world and also check for spaces or tabs preceeding the entry.

Also, check the line where you reference your Oracle .so file in AOLserver's ini file.

Brian

Collapse
Posted by Brian Fenton on
Oh yes, seeing as your datasource is blank, what do you get when you run sqlplus on the command line without a SID i.e. just sqlplus openacs_head/foo ?
Collapse
Posted by Dirk Gomez on
I tracked it down. None of it - the line

ns_param  user              $db_name

needs to read

ns_param  user              $db_user

Thanks for your help!