Help with DBIx::SearchBuilder::Handle::Oracle...

Luis Campos de Carvalho monsieur_champs at
Fri Dec 9 19:16:51 GMT 2005

--- John Costello <cos at> escreveu:

> It usually doesn't hurt to club DBI with 
> environment variables.  (That may not be David's point, 
> but it is my opinion.)  I typically set ORACLE_SID,
> ORACLE_HOME, and TWO_TASK and shake an angry fist 
> at the script for good measure.  TWO_TASK is 
> used for remote connections (which is what I'm 
> up to). 

  Well, that doesn't work. (even with the angry fist shaking)
  All my Oracle-related variables are correctly setted up, but the error message stills the same.

> It appears that you are connecting to a database 
> local to your web server (yes?),

  Yes, you're right. 
  But the local Oracle database listens on the network interfaces only, and I want to connect to
it trough TCP.

> in which case TWO_TASK shouldn't be an necessary.

  I'm using the 'dbi:Oracle:host=XXX.XXX.XXX.XXX;sid=SIDNAME' DSN form, and I think this makes DBI
do what I mean.

> A little searching for "OCIEnvNlsCreate" and "perl"
> led me to several notes ... um, heck--read this 
> sequence of posts, including Malka Cymbalista's last 
> two posts and Michael Chase's follow-on note 
> <>.  > They explain the situation
better.  This appears to 
> be from dbi-users, though it doesn't say so.

  Well, this makes me think, and I tried run the rt/bin/standalone_httpd script as user apache
(and all correct permissions). The result was the same error (OCIEnvNlsCreate).

  Given that I got a good connection to the database using rt/bin/standalone_http as root, this is
obviously an access permiossions problem.

> Boiled down, the answer is: check the web server 
> user's permissions to the oracle libs (one 
> possible problem) and if necessary put your 
> environment declarations in mod-perl's

  Nice deduction, Sherlock! 
  Now I need a way to make the right permission changes so I can access the required libraries.
First try was use /usr/bin/ldd and makes it print the required libraries each dependency from needs to work. 

  I can't figure out nothing wrong with those file permissions, and wasn't able to list the other
required libraries. 

  Does anybody have any extra tips to me?
  Many thanks in advance.

Luis Campos de Carvalho
Member of "São Paulo Perl Mongers",
Unix SysAdmin & OCP/DBA Oracle


Yahoo! doce lar. Faça do Yahoo! sua homepage. 

More information about the mailing list