Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Cron revisited

by Old_Gray_Bear (Bishop)
on Jan 10, 2013 at 17:41 UTC ( #1012709=note: print w/ replies, xml ) Need Help??


in reply to Re: Cron revisited
in thread Cron revisited

You Said "What I'm trying to understand is why the script works on one server but not another ..."

Are the two servers configured the same? Exactly the same? Are you sure? (I'll bet they aren't.)

----
I Go Back to Sleep, Now.

OGB


Comment on Re^2: Cron revisited
Re^3: Cron revisited
by tweetiepooh (Friar) on Jan 16, 2013 at 09:14 UTC

    Sorry to disturb your hibernation but I know the 2 aren't the same and have stated such in the original posting. Just about everything has changed - OS version, database client, Perl version.

    What I'm trying to figure is what element of that would cause the script to fail in cron on one server but not the other. My feeling is that it's the database client.

      I don't know the cause of your problem, but I've had success with the Solaris/Perl/OracleInstantClient/cron combination by including a BEGIN block in my perl code as below:
      BEGIN { unless (($ENV{BEGIN_BLOCK}) or $^C) { $ENV{ORACLE_HOME} = '/usr/local/instantclient'; $ENV{LD_LIBRARY_PATH} = '/lib:/usr/local/instantclient:/usr/local/ +lib'; $ENV{TNS_ADMIN} = '/apps/admin'; $ENV{BEGIN_BLOCK} = 1; exec 'env',$0,@ARGV; } }
      Obviously you should set your ORACLE_HOME and LD_LIBRARY_PATH env variables to the correct ones for your installations in the above. Note that the TNS_ADMIN env variable tells you where to look for tnsnames.ora.
        :) Thanks buddy I covered that already, and that type of thing usually yields an error message of : failed to load ...so ... Dynaloader ... library not found

        The error message tells you what needs fixing :)

        Thanks for the sane reply. I've now implemented something similar. What was puzzling me was that on version of Client worked without these shenanigans. My feeling now is that is could be a change within the Oracle software rather than the Perl side of things so that, as compiled, Perl can see the library it calls but that library can't see its dependencies.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2014-11-26 12:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (170 votes), past polls