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


In reply to Re^2: Strange behaviour with DBD::Oracle by mrdvt92
in thread Strange behaviour with DBD::Oracle by Fairchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.