Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Strange behaviour with DBD::Oracle

by Anonymous Monk
on Sep 04, 2011 at 13:01 UTC ( #924073=note: print w/ replies, xml ) Need Help??


in reply to Strange behaviour with DBD::Oracle

That makes no kind of sense :) echo command success or failure has nothing DBI or oracle


Comment on Re: Strange behaviour with DBD::Oracle
Re^2: Strange behaviour with DBD::Oracle
by mrdvt92 (Acolyte) on Sep 04, 2011 at 21:17 UTC

    The oracle client is a fussy thing.

    You have to have the environemnt configured correctly. But, if you are running SUID root the environment is not available to you. Catch 22!

    My complany has packaged all of this mess away with RPM wrappers around the oracle instant clients that I cannot believe are not part of normal distributions.

    For shell folks

    echo -e "#Name: %{name}\n#Summary: %{summary}\n#Version: %{version}\ne +xport ORACLE_HOME=/usr/lib/oracle/%{version}/%{client_folder}\nexport + LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:/usr/lib/oracle/%{version}/%{clien +t_folder}/lib" >> "$RPM_BUILD_ROOT"%{_sysconfdir}/profile.d/oracle-en +vironment.sh

    For http scripts

    echo -e "#Name: %{name}\n#Summary: %{summary}\n#Version: %{version}\nS +etEnv ORACLE_HOME /usr/lib/oracle/%{version}/client64\nSetEnv LD_LIBR +ARY_PATH /usr/lib/oracle/%{version}/client64/lib" >> "$RPM_BUILD_ROOT +"%{_sysconfdir}/httpd/conf.d/oracle-environment.conf

    For suid scripts

    cp tnsnames.ora "$RPM_BUILD_ROOT"%{_sysconfdir} echo -e "/usr/lib/oracle/%{version}/%{client_folder}/lib" > "$RPM_BUIL +D_ROOT"%{_sysconfdir}/ld.so.conf.d/oracle-instantclient11.2-ldconfig. +conf ldconfig

    Mike

    mrdvt92

Re^2: Strange behaviour with DBD::Oracle
by mje (Curate) on Sep 05, 2011 at 08:22 UTC
    echo command success or failure has nothing DBI or oracle

    except that the example code uses Perl backticks and that can be affected by signal disposition.

      The code , as presented, doesn't mess with signals, and even if it did, echo still has nothing to do with DBI or DBD::Oracle

        I know the code "as presented" does not mention signals but the code it uses under the hood does. I think you'll find Oracle's instant client library changes the disposition of some signals and as Perl backticks uses system (which relies on SIGCHLD) it is relevant to the post and probably the answer.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-10-30 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls