On Mon, 11 Mar 2002, Brian Lavender wrote: > Date: Mon, 11 Mar 2002 11:24:35 -0800 > From: Brian Lavender <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Apache::Session problem with DBD::Oracle > > I am trying to install Apache::Session and it is failing on > the DBD::Oracle tests. It is asking for a default user. Do > I need to configure Oracle for a default user? Or do I need > to set some environment variable with a user id and password? > > brian > > Here are the errors I am getting: > > t/99oracle..........DBI->connect(sgum) failed: ORA-01004: default username feature >not supported; logon denied (DBD ERROR: OCISessionBegin) at >blib/lib/Apache/Session/Store/Oracle.pm line 45 > (in cleanup) DBI->connect(sgum) failed: ORA-01004: default username feature >not supported; logon denied (DBD ERROR: OCISessionBegin) at >blib/lib/Apache/Session/Store/Oracle.pm line 45 > t/99oracle..........dubious > Test returned status 255 (wstat 65280, 0xff00) > DIED. FAILED tests 1-10 > Failed 10/10 tests, 0.00% okay >
Oracle is fairly picky about the connection info. Here's an example of one I use: use constant FooDataSource => 'dbi:Oracle:'; use constant FooDBUser => q{user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=1521))(CONNECT_DATA=(SID=sid)))}; use constant FooDBPassword => ''; use constant FooDBOptions => { RaiseError => 1, FetchHashKeyName => 'NAME_lc', LongReadLen => 3000, LongTruncOk => 1, }; my $db = DBI->connect(FooDataSource, FooDBUser, FooDBPassword, FooDBOptions); I'm also fairly sure that some environment variables should be set. If I grep my env for "ORA," I see: ORACLE_SID=<name changed to protect the innocent> ORACLE_BASE=/oracle1/app/oracle ORACLE_HOME=/oracle1/app/oracle/product/8.0.5 ORACLE_TERM=xsun5 Obviously, the $ENV{'ORACLE_SID'} matches the "SID" in the "FooDBUser" string. The above string is used from a host other than the machine that houses Oracle, so it may have more in it than you need if you're on the same machine. HTH, ky